i965/vs: Add vec4_instruction::is_tex() query.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 26 Oct 2011 19:59:33 +0000 (12:59 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 18 Dec 2011 20:38:56 +0000 (12:38 -0800)
Copy and pasted from fs_inst::is_tex(), but without TXB.

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

index 54ef9b6..5238ff5 100644 (file)
@@ -32,6 +32,16 @@ extern "C" {
 namespace brw {
 
 bool
+vec4_instruction::is_tex()
+{
+   return (opcode == SHADER_OPCODE_TEX ||
+          opcode == SHADER_OPCODE_TXD ||
+          opcode == SHADER_OPCODE_TXF ||
+          opcode == SHADER_OPCODE_TXL ||
+          opcode == SHADER_OPCODE_TXS);
+}
+
+bool
 vec4_instruction::is_math()
 {
    return (opcode == SHADER_OPCODE_RCP ||
index 93ccda9..eb90253 100644 (file)
@@ -276,6 +276,7 @@ public:
    ir_instruction *ir;
    const char *annotation;
 
+   bool is_tex();
    bool is_math();
 };