[Mesa-dev] [RFC PATCH 15/26] glsl: allow input memory qualifiers for images

Timothy Arceri tarceri at itsqueeze.com
Wed Apr 12 00:20:41 UTC 2017



On 12/04/17 02:48, Samuel Pitoiset wrote:
> The GL_ARB_bindless_texture spec allows images to be declared as
> shader inputs.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/compiler/glsl/ast_type.cpp | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp
> index cf84528775..b1929f7550 100644
> --- a/src/compiler/glsl/ast_type.cpp
> +++ b/src/compiler/glsl/ast_type.cpp
> @@ -276,6 +276,17 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc,
>     input_layout_mask.flags.q.sample = 1;
>     input_layout_mask.flags.q.smooth = 1;
>
> +   if (state->has_bindless()) {
> +      /* Allow to use qualifiers for images declared as shader inputs/outputs
> +       * as specified by GL_ARB_bindless_texture. */

Please put the */ on the following line.

Otherwise:

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

> +      input_layout_mask.flags.q.coherent = 1;
> +      input_layout_mask.flags.q._volatile = 1;
> +      input_layout_mask.flags.q.restrict_flag = 1;
> +      input_layout_mask.flags.q.read_only = 1;
> +      input_layout_mask.flags.q.write_only = 1;
> +      input_layout_mask.flags.q.explicit_image_format = 1;
> +   }
> +
>     /* Uniform block layout qualifiers get to overwrite each
>      * other (rightmost having priority), while all other
>      * qualifiers currently don't allow duplicates.
>


More information about the mesa-dev mailing list