[Mesa-dev] [PATCH 3/6] glsl: move layout qualifier validation out of the parser

Emil Velikov emil.l.velikov at gmail.com
Fri Nov 6 05:16:21 PST 2015


On 5 November 2015 at 11:17, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> From: Timothy Arceri <timothy.arceri at collabora.com>
>
> This is in preperation for compile-time constant support.
typo "preparation"

>
> Also fix up the locations for some of the extension checking
> error messages in the parser. We now correctly give the location
> of the layout qualifier identifier rather than the integer constant.
>
> The validation is moved to two locations, for validation on variables the
> checks are moved to the ast to hir pass and for qualifiers that apply to the
> shader the validation is moved into glsl_parser_extras.cpp.
>
> In order to do validation at the later stage in glsl_parser_extras.cpp we
> need to temporarily add a field in ast_type_qualifier to keep track of the
> parser location, this will be removed in a following patch when we
> introduce a new type for storing the comiple-time qualifiers.
>
> Also as the set_shader_inout_layout() function in glsl parser extras is
> normally called after all validation is done we need to move the code that
> sets CompileStatus and InfoLog otherwise the newly moved error messages will
> be ignored.
Personally I would split the validate_layout_qualifiers() introduction
and the CompileStatus/InfoLog movement into separate patches.

Feel free to ignore, if others don't share my sentiment
-Emil


More information about the mesa-dev mailing list