Skip to content

WIP: glsl: allow redeclaring variables as 'precise invariant'

Erik Faye-Lund requested to merge kusma/mesa:invariant_precise into master

There's seems to be nothing in the GLSL (ES) specifications that disallow redeclaring a variable as both 'precise' and 'invariant' in the same statement. But the way the parse-rules are structured this fails to parse, because this is handled in single_declaration, which has an exhaustive list of qualifiers here, and it does not include an option with both.

So let's factor out the precise/invariant handling from the type_qualifier rule so we can reuse it, as there's some intricate subtleties here.

For reference: glslangValidator already allows this.

Signed-off-by: Erik Faye-Lund erik.faye-lund@collabora.com

Edited by Erik Faye-Lund

Merge request reports

Loading