summaryrefslogtreecommitdiff
path: root/tests/spec/arb_copy_buffer
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2012-02-11 00:54:23 -0800
committerVinson Lee <vlee@freedesktop.org>2012-02-11 14:35:34 -0800
commit371ef3e17c856a3c50f3ef3ab6250fb4a88e62c4 (patch)
treebb82fc6dd90dbfada334e138ed53a862622de496 /tests/spec/arb_copy_buffer
parent160f88bdf72a093e6de1ce946abe78e2f0481106 (diff)
ARB_copy_buffer/get: Check for ARB_copy_buffer earlier in the test.
Check for ARB_copy_buffer before using COPY_READ_BUFFER token. COPY_READ_BUFFER is a new token added by the ARB_copy_buffer specification. See http://www.opengl.org/registry/specs/ARB/copy_buffer.txt. Fixes GL_INVALID_ENUM error on Mac OS X. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'tests/spec/arb_copy_buffer')
-rw-r--r--tests/spec/arb_copy_buffer/get.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/spec/arb_copy_buffer/get.c b/tests/spec/arb_copy_buffer/get.c
index 0acd89f7c..eefce1152 100644
--- a/tests/spec/arb_copy_buffer/get.c
+++ b/tests/spec/arb_copy_buffer/get.c
@@ -47,6 +47,8 @@ piglit_init(int argc, char **argv)
memset(get_bufs, 0xd0, sizeof(get_bufs));
+ piglit_require_extension("GL_ARB_copy_buffer");
+
glGetIntegerv(GL_COPY_READ_BUFFER, &get_bufs[0]);
glGetIntegerv(GL_COPY_WRITE_BUFFER, &get_bufs[1]);
@@ -57,8 +59,6 @@ piglit_init(int argc, char **argv)
piglit_report_result(PIGLIT_FAIL);
}
- piglit_require_extension("GL_ARB_copy_buffer");
-
glGenBuffers(2, bufs);
glBindBuffer(GL_COPY_READ_BUFFER, bufs[0]);
glBufferData(GL_COPY_READ_BUFFER, sizeof(data), data, GL_DYNAMIC_DRAW);