projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e97ffb
)
Fix typo in swizzle processing loop
author
Ian Romanick
<ian.d.romanick@intel.com>
Wed, 24 Mar 2010 22:27:50 +0000
(15:27 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Wed, 24 Mar 2010 22:27:50 +0000
(15:27 -0700)
One of the accesses to str in the loop used str[0] instead of str[i].
Reported-by: Kenneth Graunke
hir_field_selection.cpp
patch
|
blob
|
history
diff --git
a/hir_field_selection.cpp
b/hir_field_selection.cpp
index 9928b7b0bfada7d465d01caaa1632c06ff95fe76..aa53120dbdb49326c9543620ef3a26c15a036dc4 100644
(file)
--- a/
hir_field_selection.cpp
+++ b/
hir_field_selection.cpp
@@
-93,7
+93,7
@@
generate_swizzle(const char *str, ir_dereference *deref,
if ((str[i] < 'a') || (str[i] > 'z'))
return false;
- swiz_idx[i] = idx_map[str[
0
] - 'a'] - base;
+ swiz_idx[i] = idx_map[str[
i
] - 'a'] - base;
if ((swiz_idx[i] < 0) || (swiz_idx[i] >= (int) vector_length))
return false;
}