From: Kenneth Graunke Date: Fri, 23 Jul 2010 01:29:29 +0000 (-0700) Subject: ast_function: Set constant_value on return value temporaries in 1.20+. X-Git-Tag: 062012170305~10660^2~247 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46d91615a2f6e1beaee98f40af957ba1a1a6b349;p=profile%2Fivi%2Fmesa.git ast_function: Set constant_value on return value temporaries in 1.20+. --- diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index 855f27f..bb45e25 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -122,6 +122,8 @@ process_call(exec_list *instructions, ir_function *f, deref = new(ctx) ir_dereference_variable(var); ir_assignment *assign = new(ctx) ir_assignment(deref, call, NULL); instructions->push_tail(assign); + if (state->language_version >= 120) + var->constant_value = call->constant_expression_value(); deref = new(ctx) ir_dereference_variable(var); return deref;