projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2b9b22
)
glsl: Fix incorrect assertion
author
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 12 Oct 2010 19:50:29 +0000
(12:50 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 12 Oct 2010 19:50:29 +0000
(12:50 -0700)
This assertion was added in commit
f1c1ee11
, but it did not notice
that the array is accessed with 'size-1' instead of 'size'. As a
result, the assertion was off by one. This caused failures in at
least glsl-orangebook-ch06-bump.
src/mesa/program/ir_to_mesa.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/program/ir_to_mesa.cpp
b/src/mesa/program/ir_to_mesa.cpp
index be162e7a25a5bc0a36eb6756d03b6fdb13ddd6ff..da0d8106dfff8146f925ac9cbc806099f1ee64ab 100644
(file)
--- a/
src/mesa/program/ir_to_mesa.cpp
+++ b/
src/mesa/program/ir_to_mesa.cpp
@@
-311,7
+311,7
@@
swizzle_for_size(int size)
MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W),
};
- assert(
size < 4
);
+ assert(
(size >= 1) && (size <= 4)
);
return size_swizzles[size - 1];
}