From 8bbc0d40c6c4e023e71ac8bfe7f5898005cac920 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 16 Jul 2015 11:24:34 -0700 Subject: [PATCH] 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. --- Makefile.am | 1 + test/Makefile.am | 2 +- test/glx_alias_prefer_same_name.c | 25 +++++++------------------ 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/Makefile.am b/Makefile.am index ce75f4c..f47e5b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,4 @@ + # Copyright © 2013 Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a 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; }