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) {
-- 
2.7.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to