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.
macos/v1.5.9
Eric Anholt 9 years ago
parent c8cd4b7e0c
commit 8bbc0d40c6
  1. 1
      Makefile.am
  2. 2
      test/Makefile.am
  3. 25
      test/glx_alias_prefer_same_name.c

@ -1,3 +1,4 @@
# Copyright © 2013 Intel Corporation # Copyright © 2013 Intel Corporation
# #
# Permission is hereby granted, free of charge, to any person obtaining a # Permission is hereby granted, free of charge, to any person obtaining a

@ -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_LDFLAGS = -rdynamic
egl_and_glx_different_pointers_egl_glx_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_EGL -DUSE_GLX 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_LDFLAGS = -rdynamic
glx_alias_prefer_same_name_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS) -ldl glx_alias_prefer_same_name_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS) -ldl

@ -46,9 +46,9 @@ static int last_call;
#define EXT_FUNC_VAL 101 #define EXT_FUNC_VAL 101
void void
override_GL_glBindTexture(GLenum target, GLenum texture); override_GL_glBindTexture(GLenum target);
void void
override_GL_glBindTextureEXT(GLenum target, GLenum texture); override_GL_glBindTextureEXT(GLenum target);
void void
override_GL_glBindTexture(GLenum target) override_GL_glBindTexture(GLenum target)
@ -57,7 +57,7 @@ override_GL_glBindTexture(GLenum target)
} }
void void
override_GL_glBindTexture(GLenum target) override_GL_glBindTextureEXT(GLenum target)
{ {
last_call = EXT_FUNC_VAL; last_call = EXT_FUNC_VAL;
} }
@ -66,28 +66,17 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
bool pass = true; 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(); dpy = get_display_or_skip();
make_glx_context_current_or_skip(dpy); make_glx_context_current_or_skip(dpy);
if (!epoxy_has_gl_extension(dpy, 0, "GLX_EXT_texture_object")) if (!epoxy_has_gl_extension("GL_EXT_texture_object"))
errx(77, "Test requires GLX_EXT_texture_object"); errx(77, "Test requires GL_EXT_texture_object");
glBindTexture(GL_TEXTURE_2D, 1); glBindTexture(GL_TEXTURE_2D, 1);
pass = pass && last_call == CORE_VAL; pass = pass && last_call == CORE_FUNC_VAL;
glBindTextureEXT(GL_TEXTURE_2D, 1); glBindTextureEXT(GL_TEXTURE_2D, 1);
pass = pass && last_call == EXT_VAL; pass = pass && last_call == EXT_FUNC_VAL;
return pass != true; return pass != true;
} }

Loading…
Cancel
Save