summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-10-26 12:59:33 -0700
committerKenneth Graunke <[email protected]>2011-12-18 12:38:56 -0800
commit7e7c40ff98cc2b930bc3113609ace5430f2bdc95 (patch)
tree78798abbeb1f11e30a2cc3e5540695be4803703c /src/mesa/drivers
parentfebad1779ae5cb5c85d66c2635baea62da52d2fa (diff)
i965/vs: Add vec4_instruction::is_tex() query.
Copy and pasted from fs_inst::is_tex(), but without TXB. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp10
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h1
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 54ef9b6f0d4..5238ff53c49 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 93ccda9548a..eb90253543e 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();
};