On 05/08/2014 11:50 PM, Iago Toral Quiroga wrote: > Instead take the result from the first call and use it where needed. > --- > src/glsl/ast_to_hir.cpp | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp > index 7516c33..0128b3f 100644 > --- a/src/glsl/ast_to_hir.cpp > +++ b/src/glsl/ast_to_hir.cpp > @@ -792,25 +792,24 @@ do_assignment(exec_list *instructions, struct > _mesa_glsl_parse_state *state, > ir_variable *lhs_var = lhs->variable_referenced(); > if (lhs_var) > lhs_var->data.assigned = true; > > if (!error_emitted) { > if (non_lvalue_description != NULL) { > _mesa_glsl_error(&lhs_loc, state, > "assignment to %s", > non_lvalue_description); > error_emitted = true; > - } else if (lhs->variable_referenced() != NULL > - && lhs->variable_referenced()->data.read_only) { > + } else if (lhs_var != NULL && lhs_var->data.read_only) { > _mesa_glsl_error(&lhs_loc, state, > "assignment to read-only variable '%s'", > - lhs->variable_referenced()->name); > + lhs_var->name); > error_emitted = true; > } else if (lhs->type->is_array() && > !state->check_version(120, 300, &lhs_loc, > "whole array assignment forbidden")) { > /* From page 32 (page 38 of the PDF) of the GLSL 1.10 spec: > * > * "Other binary or unary expressions, non-dereferenced > * arrays, function names, swizzles with repeated fields, > * and constants cannot be l-values." > * >
Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> By the way, if you'd like to apply for push access, the procedure is documented here: http://www.freedesktop.org/wiki/AccountRequests/
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev