mesa/src/compiler
Pierre-Eric Pelloux-Prayer 2bc933f7d5 glsl/nir/linker: fix shader_storage_blocks_write_access
shader_storage_blocks_write_access was computed using the buffer indices
in the program but ShaderStorageBlocksWriteAccess is used with the shader
buffers.

So if a VS had 3 SSBOs and a FS had 4, the mask for VS was 0x3 (correct) but
the mask for the FS was 0x78 instead of 0x15.

Fix this by substracting the index of the first shader buffer in the program's
buffers.

Fixes: 79127f8d5b ("glsl: set ShaderStorageBlocksWriteAccess in the nir linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6184
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15552>
2022-03-28 11:06:31 +02:00
..
clc clc: Use kernel_arg_type_qual string to add const type qualifier to arg metadata 2021-11-15 07:47:00 -08:00
glsl glsl/nir/linker: fix shader_storage_blocks_write_access 2022-03-28 11:06:31 +02:00
isaspec isaspec: add gen-based leaf bitset separation 2022-02-12 13:46:07 -05:00
nir nir: Teach nir_divergence_analysis about Intel-specific intrinsics 2022-03-26 00:28:19 +00:00
spirv spirv: Implement the function portion of the Linkage capability 2022-03-23 10:24:31 +00:00
builtin_type_macros.h glsl: add vec5 glsl types 2022-01-18 16:10:35 +08:00
glsl_types.cpp glsl: add vec5 glsl types 2022-01-18 16:10:35 +08:00
glsl_types.h compiler/types: Add a texture type 2021-10-16 05:49:34 +00:00
meson.build spirv: Use a single binary for gtests 2021-10-20 17:55:36 +00:00
nir_gl_types.h nir: remove gl.h include from nir headers. 2022-01-19 21:54:58 +00:00
nir_types.cpp nir: remove gl.h include from nir headers. 2022-01-19 21:54:58 +00:00
nir_types.h nir: remove gl.h include from nir headers. 2022-01-19 21:54:58 +00:00
shader_enums.c compiler: Extract num_mesh_vertices_per_primitive function. 2022-02-14 11:13:42 +01:00
shader_enums.h nir: Introduce workgroup_index and ability to lower workgroup_id to it. 2022-03-08 17:36:31 +00:00
shader_info.h spirv: Implement the function portion of the Linkage capability 2022-03-23 10:24:31 +00:00