projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8df335d
)
ir_reader: Fix for swizzles.
author
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 22 Apr 2010 06:15:08 +0000
(23:15 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Thu, 29 Apr 2010 01:14:54 +0000
(18:14 -0700)
ir_reader.cpp
patch
|
blob
|
history
diff --git
a/ir_reader.cpp
b/ir_reader.cpp
index 44fbb33a5d4f06c277554f624b3ad5672e7ac638..976af2ab1289ad31c7528ef7a97571bffec3692f 100644
(file)
--- a/
ir_reader.cpp
+++ b/
ir_reader.cpp
@@
-645,8
+645,7
@@
read_swizzle(_mesa_glsl_parse_state *st, s_list *list)
return NULL;
}
- unsigned num_components = strlen(swiz->value());
- if (num_components > 4) {
+ if (strlen(swiz->value()) > 4) {
ir_read_error(st, list, "expected a valid swizzle; found %s",
swiz->value());
return NULL;
@@
-663,7
+662,8
@@
read_swizzle(_mesa_glsl_parse_state *st, s_list *list)
if (rvalue == NULL)
return NULL;
- return ir_swizzle::create(rvalue, swiz->value(), num_components);
+ return ir_swizzle::create(rvalue, swiz->value(),
+ rvalue->type->vector_elements);
}
static ir_constant *