From: Ian Romanick <[email protected]> This is a port of a sanity test that used to trigger a bug in a Mesa driver that won't expose ARB_dsa. There is no reason for a DSA adaptation of this test to exist.
Signed-off-by: Ian Romanick <[email protected]> --- tests/all.py | 2 - .../spec/arb_direct_state_access/CMakeLists.gl.txt | 1 - .../gettextureimage-simple.c | 87 ---------------------- 3 files changed, 90 deletions(-) delete mode 100644 tests/spec/arb_direct_state_access/gettextureimage-simple.c diff --git a/tests/all.py b/tests/all.py index 5b87410..aca611e 100755 --- a/tests/all.py +++ b/tests/all.py @@ -4301,8 +4301,6 @@ with profile.group_manager( 'gettextureimage-formats init-by-rendering') g(['arb_direct_state_access-gettextureimage-luminance'], 'gettextureimage-luminance') - g(['arb_direct_state_access-gettextureimage-simple'], - 'gettextureimage-simple') g(['arb_direct_state_access-gettextureimage-targets'], 'gettextureimage-targets') g(['arb_direct_state_access-compressedtextureimage', diff --git a/tests/spec/arb_direct_state_access/CMakeLists.gl.txt b/tests/spec/arb_direct_state_access/CMakeLists.gl.txt index a5ae423..11af64e 100644 --- a/tests/spec/arb_direct_state_access/CMakeLists.gl.txt +++ b/tests/spec/arb_direct_state_access/CMakeLists.gl.txt @@ -27,7 +27,6 @@ piglit_add_executable (arb_direct_state_access-texture-errors texture-errors.c) piglit_add_executable (arb_direct_state_access-get-textures get-textures.c) piglit_add_executable (arb_direct_state_access-gettextureimage-formats gettextureimage-formats.c) piglit_add_executable (arb_direct_state_access-gettextureimage-luminance gettextureimage-luminance.c) -piglit_add_executable (arb_direct_state_access-gettextureimage-simple gettextureimage-simple.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) diff --git a/tests/spec/arb_direct_state_access/gettextureimage-simple.c b/tests/spec/arb_direct_state_access/gettextureimage-simple.c deleted file mode 100644 index c432f8c..0000000 --- a/tests/spec/arb_direct_state_access/gettextureimage-simple.c +++ /dev/null @@ -1,87 +0,0 @@ -/** - * @file gettextureimage-simple.c - * - * Extremely basic test to check whether image data can be retrieved. - * - * Note that the texture is used in a full frame of rendering before - * the readback, to ensure that buffer manager related code for uploading - * texture images is executed before the readback. - * - * This used to crash for R300+bufmgr. - * - * Adapted for testing glGetTextureImage in ARB_direct_state_access by - * Laura Ekstrand <[email protected]>, November 2014. - */ - -#include "piglit-util-gl.h" - -PIGLIT_GL_TEST_CONFIG_BEGIN - - config.supports_gl_compat_version = 10; - - config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE; - -PIGLIT_GL_TEST_CONFIG_END - -static GLubyte data[4096]; /* 64*16*4 */ -static GLuint name; /* texture name */ - -static int test_getteximage(void) -{ - GLubyte compare[4096]; - int i; - - glGetTextureImage(name, 0, GL_RGBA, GL_UNSIGNED_BYTE, - sizeof(compare), compare); - - for(i = 0; i < 4096; ++i) { - if (data[i] != compare[i]) { - printf("GetTextureImage() returns incorrect data in byte %i\n", i); - printf(" corresponding to (%i,%i) channel %i\n", i / 64, (i / 4) % 16, i % 4); - printf(" expected: %i\n", data[i]); - printf(" got: %i\n", compare[i]); - return 0; - } - } - - return 1; -} - -enum piglit_result -piglit_display(void) -{ - int pass; - - glClearColor(0.0, 0.0, 0.0, 1.0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glEnable(GL_TEXTURE_2D); - glBindTextureUnit(0, name); - piglit_draw_rect_tex(0, 0, 1, 1, 0, 0, 1, 1); - - piglit_present_results(); - - pass = test_getteximage(); - - return pass ? PIGLIT_PASS : PIGLIT_FAIL; -} - -void -piglit_init(int argc, char **argv) -{ - int i; - piglit_require_extension("GL_ARB_direct_state_access"); - piglit_require_extension("GL_ARB_texture_storage"); - - for(i = 0; i < 4096; ++i) - data[i] = rand() & 0xff; - - glCreateTextures(GL_TEXTURE_2D, 1, &name); - glTextureParameteri(name, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTextureParameteri(name, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - glTextureStorage2D(name, 1, GL_RGBA8, 64, 16); - glTextureSubImage2D(name, 0, 0, 0, 64, 16, GL_RGBA, GL_UNSIGNED_BYTE, - data); - - piglit_gen_ortho_projection(0.0, 1.0, 0.0, 1.0, -2.0, 6.0, GL_FALSE); -} -- 2.1.0 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
