[Mesa-dev] [PATCH 09/18] i965: Simplify num_sources_from_inst().
Matt Turner
mattst88 at gmail.com
Tue Nov 22 19:59:43 UTC 2016
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
More information about the mesa-dev
mailing list