summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-07-16 11:24:34 -0700
committerEric Anholt <eric@anholt.net>2015-07-16 11:24:34 -0700
commit8bbc0d40c6c4e023e71ac8bfe7f5898005cac920 (patch)
tree25bdc2041b9d00d0e2e1e46ece0f96b8aaca0527 /test
parentc8cd4b7e0cb4a2b7646063766203f781a6f04f6b (diff)
downloadlibepoxy-8bbc0d40c6c4e023e71ac8bfe7f5898005cac920.tar.gz
Make the glx_alias_prefer_same_name test work, and hook it up.
Apparently I started writing it, and didn't notice I wasn't building my code when I committed the library support.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am2
-rw-r--r--test/glx_alias_prefer_same_name.c25
2 files changed, 8 insertions, 19 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 1892b17..adc7830 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -157,7 +157,7 @@ egl_and_glx_different_pointers_egl_glx_LDADD = libegl_common.la libglx_common.la
egl_and_glx_different_pointers_egl_glx_LDFLAGS = -rdynamic
egl_and_glx_different_pointers_egl_glx_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_EGL -DUSE_GLX
-glx_alias_prefer_same_name_SOURCES = glx_gles2.c dlwrap.c dlwrap.h
+glx_alias_prefer_same_name_SOURCES = glx_alias_prefer_same_name.c dlwrap.c dlwrap.h
glx_alias_prefer_same_name_LDFLAGS = -rdynamic
glx_alias_prefer_same_name_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS) -ldl
diff --git a/test/glx_alias_prefer_same_name.c b/test/glx_alias_prefer_same_name.c
index e28db8e..cfc1344 100644
--- a/test/glx_alias_prefer_same_name.c
+++ b/test/glx_alias_prefer_same_name.c
@@ -46,9 +46,9 @@ static int last_call;
#define EXT_FUNC_VAL 101
void
-override_GL_glBindTexture(GLenum target, GLenum texture);
+override_GL_glBindTexture(GLenum target);
void
-override_GL_glBindTextureEXT(GLenum target, GLenum texture);
+override_GL_glBindTextureEXT(GLenum target);
void
override_GL_glBindTexture(GLenum target)
@@ -57,7 +57,7 @@ override_GL_glBindTexture(GLenum target)
}
void
-override_GL_glBindTexture(GLenum target)
+override_GL_glBindTextureEXT(GLenum target)
{
last_call = EXT_FUNC_VAL;
}
@@ -66,28 +66,17 @@ int
main(int argc, char **argv)
{
bool pass = true;
- XVisualInfo *vis;
- Window win;
- GLXContext ctx;
- GLXFBConfig config;
- int context_attribs[] = {
- GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_ES2_PROFILE_BIT_EXT,
- GLX_CONTEXT_MAJOR_VERSION_ARB, 2,
- GLX_CONTEXT_MINOR_VERSION_ARB, 0,
- 0
- };
- GLuint shader;
dpy = get_display_or_skip();
make_glx_context_current_or_skip(dpy);
- if (!epoxy_has_gl_extension(dpy, 0, "GLX_EXT_texture_object"))
- errx(77, "Test requires GLX_EXT_texture_object");
+ if (!epoxy_has_gl_extension("GL_EXT_texture_object"))
+ errx(77, "Test requires GL_EXT_texture_object");
glBindTexture(GL_TEXTURE_2D, 1);
- pass = pass && last_call == CORE_VAL;
+ pass = pass && last_call == CORE_FUNC_VAL;
glBindTextureEXT(GL_TEXTURE_2D, 1);
- pass = pass && last_call == EXT_VAL;
+ pass = pass && last_call == EXT_FUNC_VAL;
return pass != true;
}