summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_lower_io.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-05-18 15:47:18 +0200
committerSamuel Iglesias Gonsalvez <[email protected]>2015-07-14 07:04:03 +0200
commit6b09598d63b8b6069b230fbe8283c75cf86f711a (patch)
tree9a46888f7b9727126faeab1d536add09bb1bcce2 /src/glsl/nir/nir_lower_io.c
parent1146696f75ea0f2b49e6379c2a62602dfeb51190 (diff)
nir: add nir_var_shader_storage
Reviewed-by: Jordan Justen <[email protected]>
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))