projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef2c38b
)
ir_constant_expression: Add support for constant arrays.
author
Kenneth Graunke
<kenneth@whitecape.org>
Tue, 20 Jul 2010 08:31:29 +0000
(
01:31
-0700)
committer
Kenneth Graunke
<kenneth@whitecape.org>
Wed, 21 Jul 2010 23:38:33 +0000
(16:38 -0700)
Fixes piglit test const-array-02.frag.
src/glsl/ir_constant_expression.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/ir_constant_expression.cpp
b/src/glsl/ir_constant_expression.cpp
index acfbb8645972609ce59af47d554f1579592f1938..d72a57c66abe9c2fe7337b8194ef75f8c6ec4926 100644
(file)
--- 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;