i965: Move is_math/is_tex/is_control_flow() to backend_instruction.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 28 Apr 2013 08:35:57 +0000 (01:35 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 29 Apr 2013 18:10:50 +0000 (11:10 -0700)
commit5e46482993dfd30b888d5219f6fecf4b4d1f42de
tree35c03e7e4b4a14c3d5e99bb28fd8b5fdb8b0d728
parenta6e7c22664c2fe9a5d0dc2088c60047fb40938ed
i965: Move is_math/is_tex/is_control_flow() to backend_instruction.

These are entirely based on the opcode, which is available in
backend_instruction.  It makes sense to only implement them in one
place.

This changes the VS implementation of is_tex() slightly, which now
accepts FS_OPCODE_TXB and SHADER_OPCODE_LOD.  However, since those
aren't generated in the VS anyway, it should be fine.

This also makes is_control_flow() available in the VS.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_shader.h
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h