nir/linker: fill is_shader_storage for uniforms
authorAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 12 Feb 2018 14:50:18 +0000 (15:50 +0100)
committerArcady Goldmints-Orlov <agoldmints@igalia.com>
Sun, 30 Jun 2019 21:58:26 +0000 (16:58 -0500)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/gl_nir_link_uniforms.c

index e4924df0d036d7444b7167b49b696aa9664dd498..0f8911b5b818856b0faabe03706ee69994235bf5 100644 (file)
@@ -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;