[Mesa-dev] [PATCH V2 08/12] glsl: add process_qualifier_constant() helper

Emil Velikov emil.l.velikov at gmail.com
Tue Nov 10 05:46:23 PST 2015


On 8 November 2015 at 22:34, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> From: Timothy Arceri <timothy.arceri at collabora.com>
>
> This helper is similar to the function added as part of the
> ast_layout_expression class but will be used when only the
> ast_expression type is required for the qualifier.
>
> ast_expression is used if qualifier can't have mulitple declorations
> or if all but he newest qualifier is simply ignored.
> ---
>  src/glsl/ast_to_hir.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>
> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
> index 5643c86..21a956d 100644
> --- a/src/glsl/ast_to_hir.cpp
> +++ b/src/glsl/ast_to_hir.cpp
> @@ -2261,6 +2261,48 @@ validate_matrix_layout_for_type(struct _mesa_glsl_parse_state *state,
>     }
>  }
>
> +bool
> +process_qualifier_constant(struct _mesa_glsl_parse_state *state,
> +                           YYLTYPE *loc,
> +                           const char *qual_indentifier,
> +                           ast_expression *const_expression,
> +                           unsigned *value, int minimum_value)
Unless I missed any patches, minimum_value is always 0 (same goes for
the process_qualifier_constant in previous patch). Perhaps just drop
the argument ? Obviously can be done on top of the series as resolving
the conflicts might be a bit painful.

-Emil


More information about the mesa-dev mailing list