diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2015-05-15 17:37:20 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2015-09-16 10:29:13 -0400 |
commit | 6d20ca532add6c3a99fb0301da3a3bb6bcab5386 (patch) | |
tree | 990e580e4c291630fdf47da2f94fa46c3d9bbc09 /tests | |
parent | bdcf3ea73be0a9746a4ca34b713a006cf22eed8a (diff) |
arb_direct_state_access: Port getcompressedtextureimage to core profile
The "supports_gl_compat_version = 10" was rubbish anyway because DSA
requires OpenGL 2.0.
Since cube maps are required since OpenGL 1.3, the test for it is no
longer needed. In fact, Mesa does not advertise this extension in core
profile (because duh), so checking for it is harmful.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/spec/arb_direct_state_access/CMakeLists.gl.txt | 2 | ||||
-rw-r--r-- | tests/spec/arb_direct_state_access/getcompressedtextureimage.c | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/tests/spec/arb_direct_state_access/CMakeLists.gl.txt b/tests/spec/arb_direct_state_access/CMakeLists.gl.txt index 8ed54175b..9351c66de 100644 --- a/tests/spec/arb_direct_state_access/CMakeLists.gl.txt +++ b/tests/spec/arb_direct_state_access/CMakeLists.gl.txt @@ -29,7 +29,7 @@ piglit_add_executable (arb_direct_state_access-gettextureimage-formats gettextur piglit_add_executable (arb_direct_state_access-gettextureimage-luminance gettextureimage-luminance.c) piglit_add_executable (arb_direct_state_access-gettextureimage-targets gettextureimage-targets.c) piglit_add_executable (arb_direct_state_access-compressedtextureimage compressedtextureimage.c) -piglit_add_executable (arb_direct_state_access-getcompressedtextureimage getcompressedtextureimage.c) +piglit_add_executable (arb_direct_state_access-getcompressedtextureimage getcompressedtextureimage.c dsa-utils.c) piglit_add_executable (arb_direct_state_access-texture-storage-multisample texture-storage-multisample.c) piglit_add_executable (arb_direct_state_access-texture-buffer texture-buffer.c) piglit_add_executable (arb_direct_state_access-create-samplers create-samplers.c) diff --git a/tests/spec/arb_direct_state_access/getcompressedtextureimage.c b/tests/spec/arb_direct_state_access/getcompressedtextureimage.c index 60e8d03dc..28e402748 100644 --- a/tests/spec/arb_direct_state_access/getcompressedtextureimage.c +++ b/tests/spec/arb_direct_state_access/getcompressedtextureimage.c @@ -26,11 +26,12 @@ * @file getcompressedtextureimage.c */ #include "piglit-util-gl.h" +#include "dsa-utils.h" PIGLIT_GL_TEST_CONFIG_BEGIN config.window_width = 216; - config.supports_gl_compat_version = 10; + config.supports_gl_compat_version = 20; config.supports_gl_core_version = 31; config.window_visual = PIGLIT_GL_VISUAL_RGBA | @@ -49,15 +50,19 @@ show_image(GLubyte *data, int num_layers, const char *title) GLuint name; int i; char junk[50]; + GLuint prog = 0; if (!piglit_automatic) { + prog = dsa_create_program(GL_TEXTURE_2D); + glUseProgram(prog); + dsa_set_xform(prog, piglit_width, piglit_height); + /* Create the texture handle. */ glCreateTextures(GL_TEXTURE_2D, 1, &name); glTextureStorage2D(name, 1, GL_RGBA8, IMAGE_WIDTH, IMAGE_HEIGHT); glTextureParameteri(name, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTextureParameteri(name, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glEnable(GL_TEXTURE_2D); glBindTextureUnit(0, name); /* Draw the layers, separated by some space */ @@ -84,6 +89,8 @@ show_image(GLubyte *data, int num_layers, const char *title) printf("\n"); glDeleteTextures(1, &name); + glUseProgram(0); + glDeleteProgram(prog); } } @@ -352,15 +359,12 @@ piglit_init(int argc, char **argv) piglit_require_extension("GL_ARB_direct_state_access"); piglit_require_extension("GL_ARB_texture_storage"); - if (!piglit_is_extension_supported("GL_ARB_texture_cube_map")) - clear_target_mask(GL_TEXTURE_CUBE_MAP); if (!piglit_is_extension_supported("GL_EXT_texture_array")) clear_target_mask(GL_TEXTURE_2D_ARRAY); if (!piglit_is_extension_supported("GL_ARB_texture_cube_map_array")) clear_target_mask(GL_TEXTURE_CUBE_MAP_ARRAY); glClearColor(0.5, 0.5, 0.5, 1); - piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE); } enum piglit_result |