i965: Simplify num_sources_from_inst().
authorMatt Turner <mattst88@gmail.com>
Tue, 22 Nov 2016 05:19:50 +0000 (21:19 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 20 Jan 2017 19:40:52 +0000 (11:40 -0800)
desc will always be non-NULL, because brw_validate_instructions() does
not attempt to validate any instructions that fail the
is_unsupported_inst() check.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_eu_validate.c

index 86f0ec890127255249d1ddf4e2db317b3d81f1ba..8c2eb99f8e5e9132dcf7acc2084b6b1e071bb894 100644 (file)
@@ -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) {