if (($1.flags.q.in || $1.flags.q.out) && ($2.flags.q.in || $2.flags.q.out))
_mesa_glsl_error(&@1, state, "duplicate in/out/inout qualifier");
- if (!state->ARB_shading_language_420pack_enable && $2.flags.q.constant)
+ if (!state->has_420pack() && $2.flags.q.constant)
_mesa_glsl_error(&@1, state, "in/out/inout must come after const "
"or precise");
if ($2.precision != ast_precision_none)
_mesa_glsl_error(&@1, state, "duplicate precision qualifier");
- if (!state->ARB_shading_language_420pack_enable && $2.flags.i != 0)
+ if (!state->has_420pack() && $2.flags.i != 0)
_mesa_glsl_error(&@1, state, "precision qualifiers must come last");
$$ = $2;
}
}
- if ((state->ARB_shading_language_420pack_enable ||
+ if ((state->has_420pack() ||
state->has_atomic_counters() ||
state->ARB_shader_storage_buffer_object_enable) &&
match_layout_qualifier("binding", $1, state) == 0) {
if ($2.flags.q.invariant)
_mesa_glsl_error(&@1, state, "duplicate \"invariant\" qualifier");
- if (!state->ARB_shading_language_420pack_enable && $2.flags.q.precise)
+ if (!state->has_420pack() && $2.flags.q.precise)
_mesa_glsl_error(&@1, state,
"\"invariant\" must come after \"precise\"");
if ($2.has_interpolation())
_mesa_glsl_error(&@1, state, "duplicate interpolation qualifier");
- if (!state->ARB_shading_language_420pack_enable &&
+ if (!state->has_420pack() &&
($2.flags.q.precise || $2.flags.q.invariant)) {
_mesa_glsl_error(&@1, state, "interpolation qualifiers must come "
"after \"precise\" or \"invariant\"");
* precise qualifiers since these are useful in ARB_separate_shader_objects.
* There is no clear spec guidance on this either.
*/
- if (!state->ARB_shading_language_420pack_enable && $2.has_layout())
+ if (!state->has_420pack() && $2.has_layout())
_mesa_glsl_error(&@1, state, "duplicate layout(...) qualifiers");
$$ = $1;
"duplicate auxiliary storage qualifier (centroid or sample)");
}
- if (!state->ARB_shading_language_420pack_enable &&
+ if (!state->has_420pack() &&
($2.flags.q.precise || $2.flags.q.invariant ||
$2.has_interpolation() || $2.has_layout())) {
_mesa_glsl_error(&@1, state, "auxiliary storage qualifiers must come "
if ($2.has_storage())
_mesa_glsl_error(&@1, state, "duplicate storage qualifier");
- if (!state->ARB_shading_language_420pack_enable &&
+ if (!state->has_420pack() &&
($2.flags.q.precise || $2.flags.q.invariant || $2.has_interpolation() ||
$2.has_layout() || $2.has_auxiliary_storage())) {
_mesa_glsl_error(&@1, state, "storage qualifiers must come after "
if ($2.precision != ast_precision_none)
_mesa_glsl_error(&@1, state, "duplicate precision qualifier");
- if (!state->ARB_shading_language_420pack_enable && $2.flags.i != 0)
+ if (!state->has_420pack() && $2.flags.i != 0)
_mesa_glsl_error(&@1, state, "precision qualifiers must come last");
$$ = $2;