diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-10-20 23:22:27 -0700 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-10-23 09:42:28 -0700 |
commit | 8f60dc83f7edba51037662c2637f830feeea3fc6 (patch) | |
tree | 3063f78459fba849f4b1998000b9b3be006e7b40 /src/mesa/drivers | |
parent | 0cb7d7b4b7c32246d4c4225a1d17d7ff79a7526d (diff) |
i965/fs: Allow copy propagating into new surface access opcodes
Reviewed-by: Francisco Jerez <[email protected]>
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 5589716239a..97e206d3daa 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -612,6 +612,21 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry) } break; + case SHADER_OPCODE_UNTYPED_ATOMIC: + case SHADER_OPCODE_UNTYPED_SURFACE_READ: + case SHADER_OPCODE_UNTYPED_SURFACE_WRITE: + case SHADER_OPCODE_TYPED_ATOMIC: + case SHADER_OPCODE_TYPED_SURFACE_READ: + case SHADER_OPCODE_TYPED_SURFACE_WRITE: + /* We only propagate into the surface argument of the + * instruction. Everything else goes through LOAD_PAYLOAD. + */ + if (i == 1) { + inst->src[i] = val; + progress = true; + } + break; + case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD: case SHADER_OPCODE_BROADCAST: inst->src[i] = val; |