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

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


With Timothy's comments addressed, patch 9 & 10:

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

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


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


More information about the mesa-dev mailing list