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

Nicolai Hähnle nhaehnle at gmail.com
Wed Apr 26 07:55:04 UTC 2017


With Timothy's suggestion:

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

On 24.04.2017 12: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);
>


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list