[Mesa-dev] [PATCH 09/18] i965: Simplify num_sources_from_inst().

Kenneth Graunke kenneth at whitecape.org
Sun Nov 27 08:42:49 UTC 2016


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().
-------------- 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/9a6c8254/attachment.sig>


More information about the mesa-dev mailing list