[Mesa-dev] [PATCH 00/20] radeonsi: ARB_shader_image_load_store support

Nicolai Hähnle nhaehnle at gmail.com
Tue Mar 15 18:28:47 UTC 2016


Hi,

finally: ARB_shader_image_load_store (and ARB_shader_image_size) for radeonsi!
You can also find this series at
https://cgit.freedesktop.org/~nh/mesa/log/?h=images-radeonsi

You will need bleeding edge LLVM for this to work correctly, and not all
required LLVM changes have been pushed upstream yet. You can find my LLVM tree
here: https://cgit.freedesktop.org/~nh/llvm/?h=images

Structure of the series:

1. Some additional Gallium bits for the glMemoryBarrier implementation and
   two additions to tgsi/scan that make life easier.

2. Image descriptor setting and uploading.

3. LLVM IR construction and descriptor handling in the shader.

4. coherent and volatile memory accesses; restrict is not handled specially,
   because it only serves to enable additional optimizations that LLVM
   currently cannot do anyway.

5. Memory barriers and a protection against lockups that is not really required
   by the spec but is nice to have anyway.

Test coverage:
All arb_shader_image_load_store-* piglit tests pass except:

arb_shader_image_load_store-semantics, which shows some rgb10a2-related errors.
Without having looked too closely, I suspect an error in the test, because
the test expects alpha values of ~0.5.

arb_shader_image_load_store-host-mem-barrier requires atomic counters and is
skipped. I have done some separate testing of glMemoryBarrier, but it's
admittedly not exhaustive.

Warning: arb_shader_image_load_store-shader-mem-barrier exposes a bug in
an earlier version of LLVM that results in an infinite loop in the shader
(and hence a GPU hang).

I have not tested this series with any games. If somebody is aware of a game
that needs shader images but is happy without SSBO, counters, and compute
shaders, pointers and testing are appreciated.

Please review!

Thanks,
Nicolai
--
 docs/GL3.txt                                 |   4 +-
 docs/relnotes/11.3.0.html                    |   2 +
 src/gallium/auxiliary/tgsi/tgsi_scan.c       |  21 +-
 src/gallium/auxiliary/tgsi/tgsi_scan.h       |   9 +
 .../drivers/radeon/r600_pipe_common.h        |   2 +
 src/gallium/drivers/radeon/r600_texture.c    |   4 +-
 src/gallium/drivers/radeonsi/si_blit.c       |  36 +-
 .../drivers/radeonsi/si_descriptors.c        | 206 +++++-
 src/gallium/drivers/radeonsi/si_pipe.c       |   3 +-
 src/gallium/drivers/radeonsi/si_pipe.h       |   7 +
 src/gallium/drivers/radeonsi/si_shader.c     | 622 ++++++++++++++++-
 src/gallium/drivers/radeonsi/si_shader.h     |   4 +-
 src/gallium/drivers/radeonsi/si_state.c      |  75 +-
 src/gallium/drivers/radeonsi/si_state.h      |  19 +
 src/gallium/include/pipe/p_defines.h         |   7 +
 .../state_tracker/st_cb_texturebarrier.c     |  21 +-
 16 files changed, 973 insertions(+), 69 deletions(-)



More information about the mesa-dev mailing list