[Mesa-dev] [PATCH 09/23] glsl/parser: Handle image memory qualifiers.

Paul Berry stereotype441 at gmail.com
Wed Dec 11 13:29:44 PST 2013


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

> ---
>  src/glsl/glsl_parser.yy | 83
> +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 83 insertions(+)
>
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index e436b16..e207510 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -1298,6 +1298,63 @@ layout_qualifier_id:
>        /* Layout qualifiers for ARB_shader_image_load_store. */
>        if (state->ARB_shader_image_load_store_enable ||
>            state->is_version(420, 0)) {
> +         if (!$$.flags.i) {
> +            struct {
> +               const char *name;
> +               GLenum format;
> +               glsl_base_type base_type;
> +            } map[] = {
>

Let's make this array static const so that the compiler doesn't generate
code to initialize it every time this code path is taken.

With that changed, 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/82564c98/attachment.html>


More information about the mesa-dev mailing list