aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsalvez <[email protected]>2015-09-23 09:04:53 +0200
committerSamuel Iglesias Gonsalvez <[email protected]>2015-09-25 08:39:22 +0200
commit586142658e2927a68ce02c44d3bdcaa628cac717 (patch)
tree1c240d42bc121645122f9652f647ceaeed5d306f /src/glsl
parent475d9c32d1331eb330c8594ed6f84e668157500e (diff)
glsl: atomic counters can be declared as buffer-qualified variables
Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ast_to_hir.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index d6071ef59fc..97c6350b1f0 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2789,7 +2789,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
}
if (var->type->contains_atomic()) {
- if (var->data.mode == ir_var_uniform) {
+ if (var->data.mode == ir_var_uniform || var->data.mode == ir_var_shader_storage) {
if (var->data.explicit_binding) {
unsigned *offset =
&state->atomic_counter_offsets[var->data.binding];
@@ -2807,8 +2807,8 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
}
} else if (var->data.mode != ir_var_function_in) {
_mesa_glsl_error(loc, state, "atomic counters may only be declared as "
- "function parameters or uniform-qualified "
- "global variables");
+ "function parameters, uniform-qualified or "
+ "buffer-qualified global variables");
}
}