anv: Allow storage on all formats that support typed writes

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [jlekstrand.net] - 5 May 2021 12:20 UTC

In particular, this gives us B8G8R8A8_UNORM storage support which is useful for writing WSI images from compute shaders. These formats can only be accessed in a spec-compliant way by decorating the variable NonReadable in the SPIR-V (writeonly in GLSL). If the client doesn't so decorate the variable, it'll get the null surface state where reads return 0 and writes are ignored.

b13d0eea127 anv: Allow storage on all formats that support typed writes
src/intel/vulkan/anv_formats.c | 2 +-
src/intel/vulkan/anv_image.c | 33 +++++++++++++++++++++++----------
src/intel/vulkan/genX_cmd_buffer.c | 16 +++++++++++++++-
3 files changed, 39 insertions(+), 12 deletions(-)

Upstream: cgit.freedesktop.org


  • Share