diff options
author | Kenneth Graunke <[email protected]> | 2010-07-20 01:31:29 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-07-21 16:38:33 -0700 |
commit | a096fa747611472965cf0f953bfe2757fc80383c (patch) | |
tree | 669afc8493a1742f44b62f4d773a13f7f598bab1 /src/glsl/ir_constant_expression.cpp | |
parent | ef2c38b2450eb366a2e6f6a46d1725aa6c14d74b (diff) |
ir_constant_expression: Add support for constant arrays.
Fixes piglit test const-array-02.frag.
Diffstat (limited to 'src/glsl/ir_constant_expression.cpp')
-rw-r--r-- | src/glsl/ir_constant_expression.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index acfbb864597..d72a57c66ab 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -712,7 +712,8 @@ ir_dereference_array::constant_expression_value() return new(ctx) ir_constant(array, component); } else { - /* FINISHME: Handle access of constant arrays. */ + const unsigned index = idx->value.u[0]; + return array->get_array_element(index)->clone(NULL); } } return NULL; |