[Mesa-dev] [PATCH v2 22/31] glsl: allow bindless samplers/images to be initialized

Timothy Arceri tarceri at itsqueeze.com
Wed Apr 26 04:28:54 UTC 2017


On 24/04/17 20:35, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>   src/compiler/glsl/ast_to_hir.cpp | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
> index f90ae3d09a..e4d8bae2f5 100644
> --- a/src/compiler/glsl/ast_to_hir.cpp
> +++ b/src/compiler/glsl/ast_to_hir.cpp
> @@ -4293,7 +4293,8 @@ process_initializer(ir_variable *var, ast_declaration *decl,
>       *     OpenGL API; they cannot be declared with an initializer in a
>       *     shader."
>       */
> -   if (var->type->contains_opaque()) {
> +   if (var->type->contains_atomic() ||
> +       (!state->has_bindless() && var->type->contains_opaque())) {
>         _mesa_glsl_error(&initializer_loc, state,
>                          "cannot initialize opaque variable %s",
>                          var->name);

Please add spec quote to the comment and update the error message to ? 
"atomic" : "opaque" as suggested elsewhere.

With that:

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>


More information about the mesa-dev mailing list