diff options
author | Kenneth Graunke <[email protected]> | 2013-07-25 00:30:05 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-06-10 16:38:25 -0700 |
commit | 3a439534de6d5331c1ec436d23a1a909f87c4660 (patch) | |
tree | cd30e7fb82daea045b8555068fedac3548dfbffa /src/mesa/drivers/dri/i965 | |
parent | 2c9a1518a104139f24f570ba4c134c2fb7ecf960 (diff) |
i965/fs: Allow CSE on math opcodes on Gen6+.
total instructions in shared programs: 2081469 -> 2081248 (-0.01%)
instructions in affected programs: 22606 -> 22385 (-0.98%)
No programs were hurt by this patch.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp index 94f657dd213..e0e3935a4a3 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp @@ -73,6 +73,17 @@ is_expression(const fs_inst *const inst) case FS_OPCODE_CINTERP: case FS_OPCODE_LINTERP: return true; + case SHADER_OPCODE_RCP: + case SHADER_OPCODE_RSQ: + case SHADER_OPCODE_SQRT: + case SHADER_OPCODE_EXP2: + case SHADER_OPCODE_LOG2: + case SHADER_OPCODE_POW: + case SHADER_OPCODE_INT_QUOTIENT: + case SHADER_OPCODE_INT_REMAINDER: + case SHADER_OPCODE_SIN: + case SHADER_OPCODE_COS: + return inst->mlen == 0; default: return false; } |