* tree. This particular use must be at location specified in the grammar
* as 'variable_identifier'.
*/
- ir_variable *var =
+ ir_variable *var =
state->symbols->get_variable(this->primary_expression.identifier);
if (var != NULL) {
return;
}
- } else if (state->is_version(420, 310) && base_type->is_image()) {
+ } else if ((state->is_version(420, 310) ||
+ state->ARB_shading_language_420pack_enable) &&
+ base_type->is_image()) {
assert(ctx->Const.MaxImageUnits <= MAX_IMAGE_UNITS);
if (max_index >= ctx->Const.MaxImageUnits) {
_mesa_glsl_error(loc, state, "Image binding %d exceeds the "
* expressions. Const-qualified global variables must still be
* initialized with constant expressions.
*/
- if (!state->ARB_shading_language_420pack_enable
+ if (!state->has_420pack()
|| state->current_function == NULL) {
_mesa_glsl_error(& initializer_loc, state,
"initializer of %s variable `%s' must be a "
if (state->current_function->return_type != ret_type) {
YYLTYPE loc = this->get_location();
- if (state->ARB_shading_language_420pack_enable) {
+ if (state->has_420pack()) {
if (!apply_implicit_conversion(state->current_function->return_type,
ret, state)) {
_mesa_glsl_error(& loc, state,
/* From page 66 (page 55 of the PDF) of the GLSL 1.50 spec:
*
- * "The type of init-expression in a switch statement must be a
- * scalar integer."
+ * "The type of init-expression in a switch statement must be a
+ * scalar integer."
*/
if (!test_expression->type->is_scalar() ||
!test_expression->type->is_integer()) {