[Mesa-dev] [PATCH v2 15/31] glsl: allow bindless samplers/images as varying variables

Timothy Arceri tarceri at itsqueeze.com
Wed Apr 26 04:01:03 UTC 2017


Please add the spec quote that I suggested in patch 7 to the comment 
above this switch. With that:

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

On 24/04/17 20:35, Samuel Pitoiset wrote:
> The ARB_bindless_texture spec says:
> 
>     "Replace Section 4.1.7 (Samplers), p. 25"
> 
>     "Samplers may be declared as shader inputs and outputs, as uniform
>      variables, as temporary variables, and as function parameters"
> 
> and,
> 
>     "Replace Section 4.1.X, (Images)"
> 
>     "Images may be declared as shader inputs and outputs, as uniform
>      variables, as temporary variables, and as function parameters."
> 
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>   src/compiler/glsl/ast_to_hir.cpp | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
> index 5ef99bf504..423a6b98c1 100644
> --- a/src/compiler/glsl/ast_to_hir.cpp
> +++ b/src/compiler/glsl/ast_to_hir.cpp
> @@ -3975,6 +3975,11 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
>         case GLSL_TYPE_UINT64:
>         case GLSL_TYPE_INT64:
>            break;
> +      case GLSL_TYPE_SAMPLER:
> +      case GLSL_TYPE_IMAGE:
> +         if (state->has_bindless())
> +            break;
> +         /* fallthrough */
>         default:
>            _mesa_glsl_error(loc, state, "illegal type for a varying variable");
>            break;
> 


More information about the mesa-dev mailing list