summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2015-05-15 13:32:51 -0700
committerIan Romanick <ian.d.romanick@intel.com>2015-09-16 10:29:13 -0400
commit8a237ad77175cdd35a669a5387f9066515143311 (patch)
tree73a195fb9400f57e4cba1855d4027cfb60359624 /tests
parentb7fc9ecc09e405d62eb1c0bfb822a4182421fd6d (diff)
arb_direct_state_access: Port texturesubimage to core profile
The "supports_gl_compat_version = 10" was rubbish anyway because DSA requires OpenGL 2.0. 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.txt2
-rw-r--r--tests/spec/arb_direct_state_access/texturesubimage.c16
2 files changed, 12 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 11af64ecc..d92eefc6e 100644
--- a/tests/spec/arb_direct_state_access/CMakeLists.gl.txt
+++ b/tests/spec/arb_direct_state_access/CMakeLists.gl.txt
@@ -16,7 +16,7 @@ piglit_add_executable (arb_direct_state_access-gettransformfeedback gettransform
piglit_add_executable (arb_direct_state_access-create-renderbuffers create-renderbuffers.c)
piglit_add_executable (arb_direct_state_access-namedrenderbuffer namedrenderbuffer.c)
piglit_add_executable (arb_direct_state_access-dsa-textures dsa-textures.c dsa-utils.c)
-piglit_add_executable (arb_direct_state_access-texturesubimage texturesubimage.c)
+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)
diff --git a/tests/spec/arb_direct_state_access/texturesubimage.c b/tests/spec/arb_direct_state_access/texturesubimage.c
index a1c1ce048..f21d9e436 100644
--- a/tests/spec/arb_direct_state_access/texturesubimage.c
+++ b/tests/spec/arb_direct_state_access/texturesubimage.c
@@ -33,10 +33,12 @@
#include "piglit-util-gl.h"
#include <stdlib.h>
#include <string.h>
+#include "dsa-utils.h"
PIGLIT_GL_TEST_CONFIG_BEGIN
- config.supports_gl_compat_version = 10;
+ config.supports_gl_core_version = 31;
+ config.supports_gl_compat_version = 20;
config.window_visual = PIGLIT_GL_VISUAL_RGBA |
PIGLIT_GL_VISUAL_DOUBLE;
@@ -62,6 +64,9 @@ subtest(GLenum target)
{
bool pass = true;
GLuint tex;
+ GLuint prog;
+
+ prog = dsa_create_program(target);
/* Draw the reference image. */
glCreateTextures(target, 1, &tex);
@@ -85,10 +90,10 @@ subtest(GLenum target)
refImg);
}
+ glUseProgram(prog);
glBindTextureUnit(0, tex);
- glEnable(target);
glClear(GL_COLOR_BUFFER_BIT);
- piglit_draw_rect_tex(0, 0, piglit_width, piglit_height, 0, 0, 1, 1);
+ piglit_draw_rect_tex(-1.0, -1.0, 2.0, 2.0, 0.0, 0.0, 1.0, 1.0);
if (target == GL_TEXTURE_1D) {
pass = piglit_probe_image_ubyte(0, 0, piglit_width, 1,
GL_RGBA, refImg)
@@ -100,6 +105,9 @@ subtest(GLenum target)
&& pass;
}
+ glUseProgram(0);
+ glDeleteProgram(prog);
+
if (!piglit_automatic)
piglit_present_results();
@@ -139,8 +147,6 @@ piglit_init(int argc, char **argv)
srand(0);
- piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
-
/* Make the image data for testing. */
refImg = random_image_data(piglit_width, piglit_height, depth);
}