diff options
author | Eric Anholt <[email protected]> | 2013-02-15 19:49:32 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-02-19 10:34:03 -0800 |
commit | 4c64f65f5d990a83af383790221c242d7195b5a0 (patch) | |
tree | 8be828870d8387cfea64b74c474fb740074e57f9 /src | |
parent | c2a6e529c3bc9e62ad93beb1f5ae427dbbba8a38 (diff) |
i965/fs: Enable CSE on uniform pull constant loads.
Improves on a major performance regression for the dolphin wii emulator
from its move to using UBOs. Performance in the UBO codepath (as
replayed through apitrace) is up 21.1% +/- 2.3% (n=26/29).
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_cse.cpp | 3 |
1 files changed, 3 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 a13ca362699..44479d8e9ff 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp @@ -66,6 +66,7 @@ is_expression(const fs_inst *const inst) case BRW_OPCODE_LINE: case BRW_OPCODE_PLN: case BRW_OPCODE_MAD: + case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD: case FS_OPCODE_CINTERP: case FS_OPCODE_LINTERP: return true; @@ -136,8 +137,10 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb) } /* dest <- temp */ + assert(inst->dst.type == entry->tmp.type); fs_inst *copy = new(ralloc_parent(inst)) fs_inst(BRW_OPCODE_MOV, inst->dst, entry->tmp); + copy->force_writemask_all = inst->force_writemask_all; inst->replace_with(copy); /* Appending an instruction may have changed our bblock end. */ |