From: Eric Anholt Date: Thu, 1 Apr 2010 01:44:38 +0000 (-1000) Subject: Allow initializers of constant values to succeed. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ac3af37d27c49704dd3b2d303b4497b08f8b47fd;p=mesa.git Allow initializers of constant values to succeed. This regresses constFunc.frag, but that's just unexpectedly passing because of the FINISHME just above. --- diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index 137abdaaa6c..11000a81346 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -1441,8 +1441,12 @@ ast_declarator_list::hir(exec_list *instructions, */ if (!rhs->type->is_error()) { + bool temp = var->read_only; + if (this->type->qualifier.constant) + var->read_only = false; (void) do_assignment(instructions, state, lhs, rhs, this->get_location()); + var->read_only = temp; } }