diff options
author | Eric Anholt <[email protected]> | 2011-09-01 16:21:14 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-09-08 21:40:39 -0700 |
commit | cc9eb936c220267b6130b705fc696d05906a31df (patch) | |
tree | 967b353f13242648f5a7c1d96d8073d7ac7d25cf /src/mesa/drivers/dri/i965/brw_vec4.cpp | |
parent | 42ce13195b94d0d51ca8e7fa5eed07fde8f37988 (diff) |
i965/vs: Add support for copy propagation of the UNIFORM and ATTR files.
Removes 2.0% of the instructions from 35.7% of vertex shaders in shader-db.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 656589dee3a..436de2fea8e 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -32,6 +32,19 @@ extern "C" { namespace brw { bool +vec4_instruction::is_math() +{ + return (opcode == SHADER_OPCODE_RCP || + opcode == SHADER_OPCODE_RSQ || + opcode == SHADER_OPCODE_SQRT || + opcode == SHADER_OPCODE_EXP2 || + opcode == SHADER_OPCODE_LOG2 || + opcode == SHADER_OPCODE_SIN || + opcode == SHADER_OPCODE_COS || + opcode == SHADER_OPCODE_POW); +} + +bool src_reg::equals(src_reg *r) { return (file == r->file && |