glsl: OpenGLES GLSL 3.1 precision qualifiers ordering rules
The OpenGLES GLSL 3.1 specification uses the precision qualifier ordering rules from ARB_shading_language_420pack. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
This commit is contained in:
@@ -948,7 +948,8 @@ parameter_qualifier:
|
||||
if ($2.precision != ast_precision_none)
|
||||
_mesa_glsl_error(&@1, state, "duplicate precision qualifier");
|
||||
|
||||
if (!state->has_420pack() && $2.flags.i != 0)
|
||||
if (!(state->has_420pack() || state->is_version(420, 310)) &&
|
||||
$2.flags.i != 0)
|
||||
_mesa_glsl_error(&@1, state, "precision qualifiers must come last");
|
||||
|
||||
$$ = $2;
|
||||
@@ -1847,7 +1848,8 @@ type_qualifier:
|
||||
if ($2.precision != ast_precision_none)
|
||||
_mesa_glsl_error(&@1, state, "duplicate precision qualifier");
|
||||
|
||||
if (!state->has_420pack() && $2.flags.i != 0)
|
||||
if (!(state->has_420pack() || state->is_version(420, 310)) &&
|
||||
$2.flags.i != 0)
|
||||
_mesa_glsl_error(&@1, state, "precision qualifiers must come last");
|
||||
|
||||
$$ = $2;
|
||||
|
||||
Reference in New Issue
Block a user