From: Kenneth Graunke Date: Wed, 26 Oct 2011 19:59:33 +0000 (-0700) Subject: i965/vs: Add vec4_instruction::is_tex() query. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e7c40ff98cc2b930bc3113609ace5430f2bdc95;p=mesa.git 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 --- 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(); };