[Mesa-dev] [PATCH v2 0/8] SSBO optimizations
Kristian Høgsberg Kristensen
krh at bitplanet.net
Thu Oct 22 11:36:55 PDT 2015
Here's an updated and expanded ssbo optimization series. I found a bit
of low-hanging fruit around dynamic ssbo array indexing. I removed the
IMM shortcut in emit_uniformize() and added the constant propagation
for the read and write opcodes. The result is the same for constant
indexing, and it helps dynamic indexing a little bit.
There's still a redundant MOV in the dynamic case that I'm going to
punt on for now. We want to copy propagate the scalar surface index
into the send instruction, but that fails as that's considered
!can_do_source_mods(), but the surface index argument isn't part of
the payload and can accept misc strides and modifiers.
I also took a look at ssbo stores and made it write out contiguous
channels in the writemask together, in particular, the common case of
writing a vec4 goes from 4 to 1 write instruction.
Kristian Høgsberg Kristensen (8):
i965: Don't use message headers for untyped reads
i965/fs: Read all components of a SSBO field with one send
i965/fs: Use unsigned immediate 0 when eliminating
SHADER_OPCODE_FIND_LIVE_CHANNEL
i965/fs: Don't uniformize surface index twice
i965/fs: Avoid scalar destinations in emit_uniformize()
i965/fs: Drop offset_reg temporary in ssbo load
i965/fs: Optimize ssbo stores
i965/fs: Allow copy propagating into new surface access opcodes
src/mesa/drivers/dri/i965/brw_eu_emit.c | 3 +-
src/mesa/drivers/dri/i965/brw_fs.cpp | 4 +-
src/mesa/drivers/dri/i965/brw_fs_builder.h | 8 +-
.../drivers/dri/i965/brw_fs_copy_propagation.cpp | 15 ++++
src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 91 +++++++++-------------
5 files changed, 58 insertions(+), 63 deletions(-)
--
2.6.2
More information about the mesa-dev
mailing list