[Piglit] [PATCH] texture-integer-glsl130: fix wrong expected G/B values for L/LA/I formats

sroland at vmware.com sroland at vmware.com
Wed Jan 30 06:44:04 PST 2013


From: Roland Scheidegger <sroland at vmware.com>

The tests expects the green and blue values to be the same as the luminance
(or intensity) value but it should be zero.
(Mesa used to do the former for readpixels probably due to complex wording
in earlier gl specs but this was considered an error and subsequently changed
in ad897fff7730298c21289768d9b1b55f3d166ac5.)
---
 tests/spec/ext_texture_integer/fbo-blending.c |   17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/tests/spec/ext_texture_integer/fbo-blending.c b/tests/spec/ext_texture_integer/fbo-blending.c
index 58827d3..89c1c1b 100644
--- a/tests/spec/ext_texture_integer/fbo-blending.c
+++ b/tests/spec/ext_texture_integer/fbo-blending.c
@@ -204,24 +204,15 @@ test_format(const struct format_info *info)
 		expected_color[3] = 1;
 		break;
 	case GL_LUMINANCE_INTEGER_EXT:
-		expected_color[1] = expected_color[0];
-		expected_color[2] = expected_color[0];
+		expected_color[1] = expected_color[2] = 0;
 		expected_color[3] = 1;
 		break;
 	case GL_LUMINANCE_ALPHA_INTEGER_EXT:
-		expected_color[1] = expected_color[0];
-		expected_color[2] = expected_color[0];
+		expected_color[1] = expected_color[2] = 0;
 		break;
 	case GL_RED_INTEGER:
-		if (strstr(info->name, "INTENSITY")) {
-			expected_color[1] = expected_color[0];
-			expected_color[2] = expected_color[0];
-			expected_color[3] = expected_color[0];
-		} else {
-			expected_color[1] = 0;
-			expected_color[2] = 0;
-			expected_color[3] = 1;
-		}
+		expected_color[1] = expected_color[2] = 0;
+		expected_color[3] = 1;
 		break;
 	case GL_RG_INTEGER:
 		expected_color[2] = 0;
-- 
1.7.9.5


More information about the Piglit mailing list