From 7e7c40ff98cc2b930bc3113609ace5430f2bdc95 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 26 Oct 2011 12:59:33 -0700 Subject: i965/vs: Add vec4_instruction::is_tex() query. Copy and pasted from fs_inst::is_tex(), but without TXB. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 10 ++++++++++ src/mesa/drivers/dri/i965/brw_vec4.h | 1 + 2 files changed, 11 insertions(+) (limited to 'src/mesa') 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 @@ -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() { 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(); }; -- cgit v1.2.3