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 54ef9b6f0d4c896d577e829baba6e3d3630fd679..5238ff53c49e35fd924efdd3c85170bc37c4720a 100644 (file)
@@ -31,6 +31,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()
 {
index 93ccda9548af4cedb1fc05270ee6607c7a8813cc..eb90253543ed622e6e078f256f25cf2ca727c3d5 100644 (file)
@@ -276,6 +276,7 @@ public:
    ir_instruction *ir;
    const char *annotation;
 
+   bool is_tex();
    bool is_math();
 };