glsl: Add a variable context to constant_expression_value().

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net> [v1]
This commit is contained in:
Olivier Galibert
2012-05-02 23:11:38 +02:00
committed by Kenneth Graunke
parent 27a198388e
commit 6e4852a3a5
3 changed files with 44 additions and 31 deletions

View File

@@ -278,7 +278,7 @@ generate_call(exec_list *instructions, ir_function_signature *sig,
* Function calls were first allowed to be constant expressions in GLSL 1.20.
*/
if (state->language_version >= 120) {
ir_constant *value = sig->constant_expression_value(actual_parameters);
ir_constant *value = sig->constant_expression_value(actual_parameters, NULL);
if (value != NULL) {
return value;
}