[Mesa-dev] [PATCH v2 10/31] glsl: allow bindless samplers/images inside interface blocks

Timothy Arceri tarceri at itsqueeze.com
Wed Apr 26 02:38:14 UTC 2017


On 24/04/17 20:35, Samuel Pitoiset wrote:
> The ARB_bindless_texture spec says:
> 
>     "Modify Section 4.3.7, Interface Blocks, p. 38"
> 
>     "(remove the following bullet from the last list on p. 39, thereby
>      permitting sampler types in interface blocks; image types are also
>      permitted in blocks by this extension)"
> 
>        * sampler types are not allowed
> 
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>   src/compiler/glsl/ast_to_hir.cpp | 13 ++++++++++++-
>   1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
> index b100ded836..a63f9da912 100644
> --- a/src/compiler/glsl/ast_to_hir.cpp
> +++ b/src/compiler/glsl/ast_to_hir.cpp
> @@ -6919,7 +6919,18 @@ ast_process_struct_or_iface_block_members(exec_list *instructions,
>         assert(decl_type);
>   
>         if (is_interface) {
> -         if (decl_type->contains_opaque()) {
> +         /* The ARB_bindless_texture spec says:
> +          *
> +          * "Modify Section 4.3.7, Interface Blocks, p. 38"
> +          *
> +          * "(remove the following bullet from the last list on p. 39, thereby
> +          * permitting sampler types in interface blocks; image types are also
> +          * permitted in blocks by this extension)"
> +          *
> +          *  * sampler types are not allowed
> +          */
> +         if (decl_type->contains_atomic() ||
> +             (!state->has_bindless() && decl_type->contains_opaque())) {
>               _mesa_glsl_error(&loc, state, "uniform/buffer in non-default "
>                                "interface block contains opaque variable");

Please update the error message e.g.

"interface block contains %s variable", state->has_bindless() ? "atomic" 
: "opaque")

With that:

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

>            }
> 


More information about the mesa-dev mailing list