[Mesa-dev] [PATCH 09/18] i965: Simplify num_sources_from_inst().
Kenneth Graunke
kenneth at whitecape.org
Sun Nov 27 09:17:00 UTC 2016
On Sunday, November 27, 2016 12:42:49 AM PST Kenneth Graunke wrote:
> On Tuesday, November 22, 2016 11:59:43 AM PST Matt Turner wrote:
> > desc will always be non-NULL, because brw_validate_instructions() does
> > not attempt to validate any instructions that fail the
> > is_unsupported_inst() check.
> > ---
> > src/mesa/drivers/dri/i965/brw_eu_validate.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c
> > index d3c15da..efb1f1c 100644
> > --- a/src/mesa/drivers/dri/i965/brw_eu_validate.c
> > +++ b/src/mesa/drivers/dri/i965/brw_eu_validate.c
> > @@ -103,10 +103,8 @@ num_sources_from_inst(const struct gen_device_info *devinfo,
> > */
> > return 0;
> > }
> > - } else if (desc) {
> > - return desc->nsrc;
> > } else {
> > - return 0;
> > + return desc->nsrc;
> > }
> >
> > switch (math_function) {
> >
>
> It looks like this becomes true eventually, but it isn't at this point
> in your series.
>
> num_sources_from_inst() appears to be called before is_unsupported_inst().
>
Oh, you just need to swap the order of patches 9 and 10.
With that fixed, patches 1-13 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161127/cc5a22f6/attachment.sig>
More information about the mesa-dev
mailing list