[Mesa-dev] [PATCH v2 18/28] nir/linker: fill is_shader_storage for uniforms

Alejandro PiƱeiro apinheiro at igalia.com
Thu Sep 27 09:51:57 UTC 2018


---
 src/compiler/glsl/gl_nir_link_uniforms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c
index 1a491dc2e5d..00995fb3f76 100644
--- a/src/compiler/glsl/gl_nir_link_uniforms.c
+++ b/src/compiler/glsl/gl_nir_link_uniforms.c
@@ -369,6 +369,8 @@ nir_link_uniform(struct gl_context *ctx,
       if (uniform->hidden)
          state->num_hidden_uniforms++;
 
+      uniform->is_shader_storage = nir_variable_is_in_ssbo(state->current_var);
+
       /* @FIXME: the initialization of the following will be done as we
        * implement support for their specific features, like SSBO, atomics,
        * etc.
@@ -379,7 +381,6 @@ nir_link_uniform(struct gl_context *ctx,
       uniform->array_stride = -1;
       uniform->row_major = false;
       uniform->builtin = false;
-      uniform->is_shader_storage = false;
       uniform->atomic_buffer_index = -1;
       uniform->top_level_array_size = 0;
       uniform->top_level_array_stride = 0;
-- 
2.14.1



More information about the mesa-dev mailing list