From 0b9b391c5a7acb31e5d8061169649043a38d6d0e Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 28 Mar 2011 10:22:02 +0000 Subject: xserver xkeyboard-config mesa git update 28 Mar 2011 --- mesalib/src/glsl/ast_to_hir.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'mesalib/src/glsl/ast_to_hir.cpp') diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp index cdb16fd49..9538aa62b 100644 --- a/mesalib/src/glsl/ast_to_hir.cpp +++ b/mesalib/src/glsl/ast_to_hir.cpp @@ -1577,7 +1577,7 @@ ast_expression::hir(exec_list *instructions, */ ir_variable *v = array->whole_variable_referenced(); if (v != NULL) - v->max_array_access = array->type->array_size(); + v->max_array_access = array->type->array_size() - 1; } } @@ -2676,17 +2676,24 @@ ast_declarator_list::hir(exec_list *instructions, * preceded by one of these precision qualifiers [...] Literal * constants do not have precision qualifiers. Neither do Boolean * variables. + * + * In GLSL ES, sampler types are also allowed. + * + * From page 87 of the GLSL ES spec: + * "RESOLUTION: Allow sampler types to take a precision qualifier." */ if (this->type->specifier->precision != ast_precision_none && !var->type->is_float() && !var->type->is_integer() + && !(var->type->is_sampler() && state->es_shader) && !(var->type->is_array() && (var->type->fields.array->is_float() || var->type->fields.array->is_integer()))) { _mesa_glsl_error(&loc, state, - "precision qualifiers apply only to floating point " - "and integer types"); + "precision qualifiers apply only to floating point" + "%s types", state->es_shader ? ", integer, and sampler" + : "and integer"); } /* Process the initializer and add its instructions to a temporary -- cgit v1.2.3