projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4733184
)
mesa: array size fix in _slang_typeof_operation()
author
Brian Paul
<brian.paul@tungstengraphics.com>
Fri, 12 Dec 2008 20:18:30 +0000
(13:18 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 6 Jan 2009 16:10:21 +0000
(09:10 -0700)
(cherry picked from commit
87a00959ba40ee0aeaebbc8a86ca081cf3b81c75
)
src/mesa/shader/slang/slang_typeinfo.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_typeinfo.c
b/src/mesa/shader/slang/slang_typeinfo.c
index 3978df751d1d3d80676f4f6d50aff3e804cea8d2..bd135c1a11756859c5d34c524d78465a0c9301ef 100644
(file)
--- a/
src/mesa/shader/slang/slang_typeinfo.c
+++ b/
src/mesa/shader/slang/slang_typeinfo.c
@@
-600,7
+600,15
@@
_slang_typeof_operation(slang_operation * op,
return GL_FALSE;
}
ti->can_be_referenced = GL_TRUE;
- ti->array_len = var->array_len;
+ if (var->type.specifier.type == SLANG_SPEC_ARRAY &&
+ var->type.array_len >= 1) {
+ /* the datatype is an array, ex: float[3] x; */
+ ti->array_len = var->type.array_len;
+ }
+ else {
+ /* the variable is an array, ex: float x[3]; */
+ ti->array_len = var->array_len;
+ }
}
break;
case SLANG_OPER_SEQUENCE: