[Mesa-dev] [PATCH v5 45/70] glsl: atomic counters can be declared as buffer-qualified variables

Francisco Jerez currojerez at riseup.net
Mon Sep 28 03:13:42 PDT 2015


Iago Toral Quiroga <itoral at igalia.com> writes:

> From: Kristian Høgsberg <krh at bitplanet.net>
>
> ---
>  src/glsl/ast_to_hir.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index 566cc87..a364aae 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");
>        }
>     }
>  

Spec quote?  Declaring an atomic counter to have buffer storage is
illegal AFAIK.

> -- 
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150928/2a622cf9/attachment.sig>


More information about the mesa-dev mailing list