[Piglit] [PATCH 06/14] arb_direct_state_access: Port texture-storage to core profile

Ian Romanick idr at freedesktop.org
Wed Sep 9 13:20:59 PDT 2015


From: Ian Romanick <ian.d.romanick at intel.com>

The "supports_gl_compat_version = 12" was rubbish anyway because DSA
requires OpenGL 2.0.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/spec/arb_direct_state_access/CMakeLists.gl.txt |  2 +-
 tests/spec/arb_direct_state_access/texture-storage.c | 19 +++++++++----------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tests/spec/arb_direct_state_access/CMakeLists.gl.txt b/tests/spec/arb_direct_state_access/CMakeLists.gl.txt
index d92eefc..df77fa1 100644
--- a/tests/spec/arb_direct_state_access/CMakeLists.gl.txt
+++ b/tests/spec/arb_direct_state_access/CMakeLists.gl.txt
@@ -19,7 +19,7 @@ piglit_add_executable (arb_direct_state_access-dsa-textures dsa-textures.c dsa-u
 piglit_add_executable (arb_direct_state_access-texturesubimage texturesubimage.c dsa-utils.c)
 piglit_add_executable (arb_direct_state_access-bind-texture-unit bind-texture-unit.c)
 piglit_add_executable (arb_direct_state_access-create-textures create-textures.c)
-piglit_add_executable (arb_direct_state_access-texture-storage texture-storage.c)
+piglit_add_executable (arb_direct_state_access-texture-storage texture-storage.c dsa-utils.c)
 piglit_add_executable (arb_direct_state_access-texunits texunits.c)
 piglit_add_executable (arb_direct_state_access-texture-params texture-params.c)
 piglit_add_executable (arb_direct_state_access-copytexturesubimage copytexturesubimage.c)
diff --git a/tests/spec/arb_direct_state_access/texture-storage.c b/tests/spec/arb_direct_state_access/texture-storage.c
index d73224d..1661a9e 100644
--- a/tests/spec/arb_direct_state_access/texture-storage.c
+++ b/tests/spec/arb_direct_state_access/texture-storage.c
@@ -32,7 +32,8 @@
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
-	config.supports_gl_compat_version = 12;
+	config.supports_gl_core_version = 31;
+	config.supports_gl_compat_version = 20;
 
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
 
@@ -317,6 +318,7 @@ test_2d_mipmap_rendering(void)
 	GLint width = 128, height = 64, levels = 8;
 	GLint v, l;
 	GLfloat vfloat;
+	GLuint prog;
 
 	glCreateTextures(GL_TEXTURE_2D, 1, &tex);
 	glBindTextureUnit(0, tex);
@@ -397,11 +399,13 @@ test_2d_mipmap_rendering(void)
 	}
 
 	/* now do a rendering test */
-	glEnable(GL_TEXTURE_2D);
 	glTextureParameteri(tex, GL_TEXTURE_MIN_FILTER,
 			GL_NEAREST_MIPMAP_NEAREST);
 	glTextureParameteri(tex, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 
+	prog = dsa_create_program(GL_TEXTURE_2D);
+	glUseProgram(prog);
+
 	/* draw a quad using each texture mipmap level */
 	for (l = 0; l < levels; l++) {
 		GLfloat expected[4];
@@ -432,7 +436,8 @@ test_2d_mipmap_rendering(void)
 		}
 	}
 
-	glDisable(GL_TEXTURE_2D);
+	glUseProgram(0);
+	glDeleteProgram(prog);
 
 	glDeleteTextures(1, &tex);
 
@@ -589,13 +594,7 @@ piglit_display(void)
 	X(test_2d_mipmap_rendering(), "2D mipmap rendering");
 	X(test_internal_formats(), "internal formats");
 	X(test_immutablity(GL_TEXTURE_2D), "immutability");
-
-	if (piglit_get_gl_version() >= 13
-	    || piglit_is_extension_supported("GL_ARB_texture_cube_map"))
-		X(test_cube_texture(), "cube texture");
-	else
-		piglit_report_subtest_result(PIGLIT_SKIP,
-					     "cube texture");
+	X(test_cube_texture(), "cube texture");
 
 	if (piglit_is_extension_supported("GL_ARB_texture_cube_map_array"))
 		X(test_cube_array_texture(), "cube array texture");
-- 
2.1.0



More information about the Piglit mailing list