[Mesa-dev] [PATCH 06/23] glsl/ast: Keep track of type qualifiers defined by ARB_shader_image_load_store.

Paul Berry stereotype441 at gmail.com
Wed Dec 11 13:25:12 PST 2013


On 26 November 2013 00:02, Francisco Jerez <currojerez at riseup.net> wrote:

> ---
>  src/glsl/ast.h        | 32 +++++++++++++++++++++++++++++++-
>  src/glsl/ast_type.cpp |  5 +++++
>  2 files changed, 36 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/ast.h b/src/glsl/ast.h
> index 5c214b6..b750bb7 100644
> --- a/src/glsl/ast.h
> +++ b/src/glsl/ast.h
> @@ -413,12 +413,23 @@ struct ast_type_qualifier {
>          unsigned prim_type:1;
>          unsigned max_vertices:1;
>          /** \} */
> +
> +        /** \name Layout and memory qualifiers for
> ARB_shader_image_load_store. */
> +        /** \{ */
> +        unsigned early_fragment_tests:1;
> +        unsigned explicit_image_format:1;
> +        unsigned coherent:1;
> +        unsigned _volatile:1;
> +        unsigned _restrict:1;
> +        unsigned read_only:1;
> +        unsigned write_only:1;
> +        /** \} */
>

As in patch 5, I'd like to see a comment next to "read_only" and
"write_only" to indicate that they correspond to the GLSL keywords
"readonly" and "writeonly".


>        }
>        /** \brief Set of flags, accessed by name. */
>        q;
>
>        /** \brief Set of flags, accessed as a bitmask. */
> -      unsigned i;
> +      uint64_t i;
>

In glsl_parser.yy's "basic_interface_block" rule there are local variables
called interface_type_mask and block_interface_qualifier that store values
from ast_type_qualifier::flags.i.  They should also be changed to uint64_t.

With those changes, this patch is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131211/f9909216/attachment-0001.html>


More information about the mesa-dev mailing list