panfrost: Add SSBO system value

Graphics / Mesa 3D Graphics Library / Mesa - Alyssa Rosenzweig [] - 12 August 2019 19:42 EDT

For each SSBO index we get from Gallium/NIR, we need two pieces of information in the shader:

1. The address of the SSBO in GPU memory. Within the shader, we'll be accessing it with raw memory load/store, so we need the actual address, not just an index.

2. The size of the SSBO. This is not strictly necessary, but at some point, we may like to do bounds checking on SSBO accesses.

2efa025b055 panfrost: Add SSBO system value
src/gallium/drivers/panfrost/pan_context.c | 25 +++++++++++++++++++++++++
src/panfrost/midgard/midgard_compile.c | 12 ++++++++++++
src/panfrost/midgard/midgard_compile.h | 1 +
3 files changed, 38 insertions(+)


  • Share