summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir/nir_lower_io.c')
-rw-r--r--src/glsl/nir/nir_lower_io.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c
index 6761d5bad33..a9dd77691b2 100644
--- a/src/glsl/nir/nir_lower_io.c
+++ b/src/glsl/nir/nir_lower_io.c
@@ -86,7 +86,8 @@ nir_assign_var_locations_scalar(struct exec_list *var_list, unsigned *size)
* UBO's have their own address spaces, so don't count them towards the
* number of global uniforms
*/
- if (var->data.mode == nir_var_uniform && var->interface_type != NULL)
+ if ((var->data.mode == nir_var_uniform || var->data.mode == nir_var_shader_storage) &&
+ var->interface_type != NULL)
continue;
var->data.driver_location = location;
@@ -153,7 +154,8 @@ nir_assign_var_locations_scalar_direct_first(nir_shader *shader,
unsigned location = 0;
foreach_list_typed(nir_variable, var, node, var_list) {
- if (var->data.mode == nir_var_uniform && var->interface_type != NULL)
+ if ((var->data.mode == nir_var_uniform || var->data.mode == nir_var_shader_storage) &&
+ var->interface_type != NULL)
continue;
if (_mesa_set_search(indirect_set, var))
@@ -166,7 +168,8 @@ nir_assign_var_locations_scalar_direct_first(nir_shader *shader,
*direct_size = location;
foreach_list_typed(nir_variable, var, node, var_list) {
- if (var->data.mode == nir_var_uniform && var->interface_type != NULL)
+ if ((var->data.mode == nir_var_uniform || var->data.mode == nir_var_shader_storage) &&
+ var->interface_type != NULL)
continue;
if (!_mesa_set_search(indirect_set, var))