[Mesa-dev] [PATCH 04/14] i965/vs: Add vec4_instruction::is_tex() query.

Kenneth Graunke kenneth at whitecape.org
Thu Dec 8 17:07:55 PST 2011


Copy and pasted from fs_inst::is_tex(), but without TXB.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp |   10 ++++++++++
 src/mesa/drivers/dri/i965/brw_vec4.h   |    1 +
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 54ef9b6..5238ff5 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -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 ||
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 93ccda9..eb90253 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -276,6 +276,7 @@ public:
    ir_instruction *ir;
    const char *annotation;
 
+   bool is_tex();
    bool is_math();
 };
 
-- 
1.7.7.3



More information about the mesa-dev mailing list