summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaura Ekstrand <laura@jlekstrand.net>2014-11-04 13:41:50 -0800
committerLaura Ekstrand <laura@jlekstrand.net>2014-11-05 14:04:59 -0800
commit7bd20e1cd446f6ba5bca47e397a42f3fc90543e7 (patch)
tree40de7b608952f0761b11f5524dba3e536dd38c29
parentc8f1b7411daf0e592544684b3081078cb727d3f2 (diff)
Removed dsa_wrangle_functions.
-rw-r--r--tests/spec/arb_direct_state_access/bind-texture-unit.c9
-rw-r--r--tests/spec/arb_direct_state_access/dsa-textures.c13
-rw-r--r--tests/spec/arb_direct_state_access/dsa-utils.c23
-rw-r--r--tests/spec/arb_direct_state_access/dsa-utils.h25
-rw-r--r--tests/spec/arb_direct_state_access/texturesubimage.c28
5 files changed, 22 insertions, 76 deletions
diff --git a/tests/spec/arb_direct_state_access/bind-texture-unit.c b/tests/spec/arb_direct_state_access/bind-texture-unit.c
index 335f5a4b6..b6a98a91b 100644
--- a/tests/spec/arb_direct_state_access/bind-texture-unit.c
+++ b/tests/spec/arb_direct_state_access/bind-texture-unit.c
@@ -23,7 +23,7 @@
/** @file bind-texture-unit.c
*
- * Tests BindTextureUnit to see if it behaves in the expected way,
+ * Tests glBindTextureUnit to see if it behaves in the expected way,
* throwing the correct errors, etc.
*/
@@ -42,10 +42,7 @@ PIGLIT_GL_TEST_CONFIG_END
void
piglit_init(int argc, char **argv)
{
- /* Initialize DSA functions. */
piglit_require_extension("GL_ARB_direct_state_access");
- dsa_wrangle_functions();
-
}
enum piglit_result
@@ -57,12 +54,12 @@ piglit_display(void)
/* Throw some invalid inputs at BindTextureUnit. */
/* Non-gen-d texture name */
- BindTextureUnit(0, name);
+ glBindTextureUnit(0, name);
pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
/* No target */
glGenTextures(1, &name);
- BindTextureUnit(0, name);
+ glBindTextureUnit(0, name);
pass &= piglit_check_gl_error(GL_INVALID_ENUM);
/* Texture unit doesn't exist */
diff --git a/tests/spec/arb_direct_state_access/dsa-textures.c b/tests/spec/arb_direct_state_access/dsa-textures.c
index 5726c3c64..e585a0c28 100644
--- a/tests/spec/arb_direct_state_access/dsa-textures.c
+++ b/tests/spec/arb_direct_state_access/dsa-textures.c
@@ -68,7 +68,6 @@ piglit_init(int argc, char **argv)
else
nv340_23 = false;
- dsa_wrangle_functions();
dsa_init_program();
} /* piglit_init */
@@ -81,7 +80,7 @@ piglit_display(void)
GLuint name;
int texunit = 0;
- CreateTextures(GL_TEXTURE_2D, 1, &name);
+ glCreateTextures(GL_TEXTURE_2D, 1, &name);
if (nv340_23) {
printf("Working around bugs in NVIDIA 340.23.03.\n");
glBindTexture(GL_TEXTURE_2D, name);
@@ -95,19 +94,19 @@ piglit_display(void)
}
else {
/* These do not appear to work on nv340_23. */
- TextureStorage2D(name, 1, GL_RGBA32F, piglit_width,
+ glTextureStorage2D(name, 1, GL_RGBA32F, piglit_width,
piglit_height);
- TextureSubImage2D(name, 0, 0, 0,
+ glTextureSubImage2D(name, 0, 0, 0,
piglit_width, piglit_height, GL_RGBA, GL_FLOAT, data);
- TextureParameteri(name, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- TextureParameteri(name, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTextureParameteri(name, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTextureParameteri(name, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
}
/* Draw the image */
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
dsa_texture_with_unit(texunit);
glEnable(GL_TEXTURE_2D);
- BindTextureUnit(texunit, name);
+ glBindTextureUnit(texunit, name);
pass &= piglit_check_gl_error(GL_NO_ERROR);
piglit_draw_rect_tex(0, 0, piglit_width, piglit_height, 0, 0, 1, 1);
pass &= piglit_check_gl_error(GL_NO_ERROR);
diff --git a/tests/spec/arb_direct_state_access/dsa-utils.c b/tests/spec/arb_direct_state_access/dsa-utils.c
index 91336f6bb..e02cfd81f 100644
--- a/tests/spec/arb_direct_state_access/dsa-utils.c
+++ b/tests/spec/arb_direct_state_access/dsa-utils.c
@@ -64,29 +64,6 @@ static GLuint dsa_prog;
static GLuint dsa_uniform;
void
-dsa_wrangle_functions(void)
-{
- TextureStorage1D = (PFNGLTEXTURESTORAGE1DPROC)
- glXGetProcAddress((GLubyte*) "glTextureStorage1D");
- TextureStorage2D = (PFNGLTEXTURESTORAGE2DPROC)
- glXGetProcAddress((GLubyte*) "glTextureStorage2D");
- TextureStorage3D = (PFNGLTEXTURESTORAGE3DPROC)
- glXGetProcAddress((GLubyte*) "glTextureStorage3D");
- CreateTextures = (PFNGLCREATETEXTURESPROC)
- glXGetProcAddress((GLubyte*) "glCreateTextures");
- TextureSubImage1D = (PFNGLTEXTURESUBIMAGE1DPROC)
- glXGetProcAddress((GLubyte*) "glTextureSubImage1D");
- TextureSubImage2D = (PFNGLTEXTURESUBIMAGE2DPROC)
- glXGetProcAddress((GLubyte*) "glTextureSubImage2D");
- TextureSubImage3D = (PFNGLTEXTURESUBIMAGE3DPROC)
- glXGetProcAddress((GLubyte*) "glTextureSubImage3D");
- TextureParameteri = (PFNGLTEXTUREPARAMETERIPROC)
- glXGetProcAddress((GLubyte*) "glTextureParameteri");
- BindTextureUnit = (PFNGLBINDTEXTUREUNITPROC)
- glXGetProcAddress((GLubyte*) "glBindTextureUnit");
-}
-
-void
dsa_init_program(void)
{
dsa_prog = piglit_build_simple_program(dsa_vs_source, dsa_fs_source);
diff --git a/tests/spec/arb_direct_state_access/dsa-utils.h b/tests/spec/arb_direct_state_access/dsa-utils.h
index 504985fcd..38dfa22c1 100644
--- a/tests/spec/arb_direct_state_access/dsa-utils.h
+++ b/tests/spec/arb_direct_state_access/dsa-utils.h
@@ -40,31 +40,6 @@ extern "C" {
#include "piglit-util-gl.h"
#include "piglit-glx-util.h"
-/* These are used to manually wrangle the new dsa functions. */
-void (*CreateTextures) (GLenum target, GLsizei n,
- GLuint* textures);
-void (*TextureStorage1D)(GLuint texture, GLsizei levels,
- GLenum internalFormat, GLsizei width);
-void (*TextureStorage2D)(GLuint texture, GLsizei levels,
- GLenum internalFormat, GLsizei width, GLsizei height);
-void (*TextureStorage3D)(GLuint texture, GLsizei levels,
- GLenum internalFormat, GLsizei width, GLsizei height,
- GLsizei depth);
-void (*TextureSubImage1D)(GLuint texture, GLint level,
- GLint xoffset, GLsizei width,
- GLenum format, GLenum type, const void *pixels);
-void (*TextureSubImage2D)(GLuint texture, GLint level,
- GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
- GLenum format, GLenum type, const void *pixels);
-void (*TextureSubImage3D)(GLuint texture, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const void *pixels);
-void (*TextureParameteri)(GLuint texture, GLenum pname, GLint param);
-void (*BindTextureUnit)(GLuint unit, GLuint texture);
-
-void dsa_wrangle_functions(void);
-
void dsa_init_program(void);
void dsa_texture_with_unit(GLuint);
diff --git a/tests/spec/arb_direct_state_access/texturesubimage.c b/tests/spec/arb_direct_state_access/texturesubimage.c
index 2c9ab5f1e..c09543315 100644
--- a/tests/spec/arb_direct_state_access/texturesubimage.c
+++ b/tests/spec/arb_direct_state_access/texturesubimage.c
@@ -247,26 +247,26 @@ test_format(GLenum target, GLenum intFormat)
glPixelStorei(GL_UNPACK_ROW_LENGTH, w);
glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, h);
- CreateTextures(target, 1, &tex);
- BindTextureUnit(0, tex);
- TextureParameteri(tex, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- TextureParameteri(tex, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glCreateTextures(target, 1, &tex);
+ glBindTextureUnit(0, tex);
+ glTextureParameteri(tex, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTextureParameteri(tex, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei(GL_UNPACK_SKIP_IMAGES, 0);
if (target == GL_TEXTURE_1D) {
- TextureStorage1D(tex, 1, intFormat, w);
- TextureSubImage1D(tex, 0, 0, w, srcFormat,
+ glTextureStorage1D(tex, 1, intFormat, w);
+ glTextureSubImage1D(tex, 0, 0, w, srcFormat,
GL_UNSIGNED_BYTE, img);
}
else if (target == GL_TEXTURE_2D) {
- TextureStorage2D(tex, 1, intFormat, w, h);
- TextureSubImage2D(tex, 0, 0, 0, w, h, srcFormat,
+ glTextureStorage2D(tex, 1, intFormat, w, h);
+ glTextureSubImage2D(tex, 0, 0, 0, w, h, srcFormat,
GL_UNSIGNED_BYTE, img);
}
else if (target == GL_TEXTURE_3D) {
- TextureStorage3D(tex, 1, intFormat, w, h, d);
- TextureSubImage3D(tex, 0, 0, 0, 0, w, h, d, srcFormat,
+ glTextureStorage3D(tex, 1, intFormat, w, h, d);
+ glTextureSubImage3D(tex, 0, 0, 0, 0, w, h, d, srcFormat,
GL_UNSIGNED_BYTE, img);
}
@@ -300,15 +300,15 @@ test_format(GLenum target, GLenum intFormat)
glPixelStorei(GL_UNPACK_SKIP_ROWS, ty);
glPixelStorei(GL_UNPACK_SKIP_IMAGES, tz);
if (target == GL_TEXTURE_1D) {
- TextureSubImage1D(tex, 0, tx, tw,
+ glTextureSubImage1D(tex, 0, tx, tw,
srcFormat, GL_UNSIGNED_BYTE, img);
}
else if (target == GL_TEXTURE_2D) {
- TextureSubImage2D(tex, 0, tx, ty, tw, th,
+ glTextureSubImage2D(tex, 0, tx, ty, tw, th,
srcFormat, GL_UNSIGNED_BYTE, img);
}
else if (target == GL_TEXTURE_2D) {
- TextureSubImage3D(tex, 0, tx, ty, tz, tw, th, td,
+ glTextureSubImage3D(tex, 0, tx, ty, tz, tw, th, td,
srcFormat, GL_UNSIGNED_BYTE, img);
}
@@ -407,9 +407,7 @@ piglit_display(void)
void
piglit_init(int argc, char **argv)
{
- /* Initialize DSA functions. */
piglit_require_extension("GL_ARB_direct_state_access");
- dsa_wrangle_functions();
fbo_formats_init(argc, argv, 0);
(void) fbo_formats_display;