diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_eu.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c index 6961a88c6a8..279e9571e1a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.c +++ b/src/mesa/drivers/dri/i965/brw_eu.c @@ -339,3 +339,19 @@ brw_disassemble(const struct brw_device_info *devinfo, brw_disassemble_inst(out, devinfo, insn, compacted); } } + +/* Return the matching opcode_desc for the specified opcode number and + * hardware generation, or NULL if the opcode is not supported by the device. + * XXX -- Actually check whether the opcode is supported. + */ +const struct opcode_desc * +brw_opcode_desc(const struct brw_device_info *devinfo, enum opcode opcode) +{ + if (opcode >= ARRAY_SIZE(opcode_descs)) + return NULL; + + if (opcode_descs[opcode].name) + return &opcode_descs[opcode]; + else + return NULL; +} |