aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_eu_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_eu_validate.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_validate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c
index 2de2ea1babc..75e161b19a5 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_validate.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_validate.c
@@ -300,6 +300,8 @@ static unsigned
num_sources_from_inst(const struct brw_device_info *devinfo,
const brw_inst *inst)
{
+ const struct opcode_desc *desc =
+ brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst));
unsigned math_function;
if (brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MATH) {
@@ -314,8 +316,10 @@ num_sources_from_inst(const struct brw_device_info *devinfo,
*/
return 0;
}
+ } else if (desc) {
+ return desc->nsrc;
} else {
- return opcode_descs[brw_inst_opcode(devinfo, inst)].nsrc;
+ return 0;
}
switch (math_function) {