i965/disasm: Wrap opcode_desc look-up in a function.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 28 Apr 2016 07:19:14 +0000 (00:19 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 4 May 2016 05:32:40 +0000 (22:32 -0700)
commit1530e27534831a8d1c82e0a82fe15cd9c70e61e6
tree0cc9e88a5cf3e806452b58a27aaa682bcfcebc4a
parent1cc7573162a7f0e8346d7abab50890c58a0dce9a
i965/disasm: Wrap opcode_desc look-up in a function.

The function takes a device info struct as argument in addition to the
opcode number in order to disambiguate between multiple opcode_desc
entries for different instructions with the same opcode number.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> [v1]
[v2] mattst88: Put brw_opcode_desc() in brw_eu.c instead of moving it
               there in a later patch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> [v2]
[v3] mattst88: Return NULL if opcode >= ARRAY_SIZE(opcode_descs)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_disasm.c
src/mesa/drivers/dri/i965/brw_eu.c
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_validate.c
src/mesa/drivers/dri/i965/brw_shader.cpp