[Piglit] [PATCH 1/7] khr_texture_compression_astc: Don't use Skip decoding for non-sRGB textures

Anuj Phogat anuj.phogat at gmail.com
Fri Jul 22 21:01:31 UTC 2016


Skipping the decoding in non-sRGB cases isn't serving any purpose.

Cc: Nanley Chery <nanley.g.chery at intel.com>
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
 .../khr_compressed_astc-miptree.c                         | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c
index 6429c2e..0f82695 100644
--- a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c
+++ b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-miptree.c
@@ -151,7 +151,7 @@ load_texture(const char *dir1, const char *dir2,
 }
 
 /** Compares the compressed texture against the decompressed texture */
-bool draw_compare_levels(bool check_error, bool check_srgb,
+bool draw_compare_levels(bool check_error,
 			GLint level_pixel_size_loc, GLint pixel_offset_loc,
 			GLuint compressed_tex, GLuint decompressed_tex)
 {
@@ -171,20 +171,12 @@ bool draw_compare_levels(bool check_error, bool check_srgb,
 
 		/* Draw miplevel of compressed texture. */
 		glBindTexture(GL_TEXTURE_2D, compressed_tex);
-		if (!check_srgb)
-			glTexParameteri(GL_TEXTURE_2D,
-					GL_TEXTURE_SRGB_DECODE_EXT,
-					GL_SKIP_DECODE_EXT);
 		glUniform2f(pixel_offset_loc, x, y);
 		glDrawArrays(GL_TRIANGLE_FAN, 0, NUM_VERTICES);
 
 		/* Draw miplevel of decompressed texture. */
 		if (!check_error) {
 			glBindTexture(GL_TEXTURE_2D, decompressed_tex);
-			if (!check_srgb)
-				glTexParameteri(GL_TEXTURE_2D,
-						GL_TEXTURE_SRGB_DECODE_EXT,
-						GL_SKIP_DECODE_EXT);
 			glUniform2f(pixel_offset_loc, LEVEL0_WIDTH + x, y);
 			glDrawArrays(GL_TRIANGLE_FAN, 0, NUM_VERTICES);
 		}
@@ -244,9 +236,6 @@ test_miptrees(void* input_type)
 		"12x12"
 	};
 
-	if (!is_srgb_test)
-		piglit_require_extension("GL_EXT_texture_sRGB_decode");
-
 	GLint pixel_offset_loc = glGetUniformLocation(prog, "pixel_offset");
 	GLint level_pixel_size_loc = glGetUniformLocation(prog,
 							"level_pixel_size");
@@ -276,7 +265,7 @@ test_miptrees(void* input_type)
 
 		/* Draw and compare each level of the two textures */
 		glClear(GL_COLOR_BUFFER_BIT);
-		if (!draw_compare_levels(check_error, is_srgb_test,
+		if (!draw_compare_levels(check_error,
 					level_pixel_size_loc,
 					pixel_offset_loc,
 					tex_compressed,
-- 
2.5.5



More information about the Piglit mailing list