[Piglit] [PATCH 1/2] texture-integer: fix issue with GL_RGB_INTEGER_EXT swizzle

Martin Andersson g02maran at gmail.com
Tue Aug 13 14:24:22 PDT 2013


The expected alpha was set to zero instead of the random alpha value.
The test passed for all random alpha values greater than zero, because
for those values the resulting alpha was zero. Matching the, incorrect,
expected alpha value of zero. The reason the resulting alpha was zero
was because the computed bias became negative, that in turn caused the
resulting alpha to become negative and then rounded to zero.

The test failed when the random alpha value became zero because it was
expecting the, incorrect, alpha value of zero but got the correct value
of one.
---
 tests/spec/gl-3.0/texture-integer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/gl-3.0/texture-integer.c b/tests/spec/gl-3.0/texture-integer.c
index f2a5692..ff2bef4 100644
--- a/tests/spec/gl-3.0/texture-integer.c
+++ b/tests/spec/gl-3.0/texture-integer.c
@@ -287,7 +287,7 @@ test_format(const struct format_info *info)
 		/* nothing */
 		break;
 	case GL_RGB_INTEGER_EXT:
-		expected[3] = 0.0;
+		value[3] = 0.0;
 		break;
 	case GL_ALPHA_INTEGER_EXT:
 		expected[0] = expected[1] = expected[2] = 0.0;
-- 
1.8.3.4



More information about the Piglit mailing list