From b5022ad03584f119b27c143b53e7ed80e8c12ffb Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 25 Oct 2010 22:05:20 +0800 Subject: glapi: Do not use glapidispatch.h. glapidispatch.h exists so that core mesa (libmesa.a) can be built for DRI drivers or for non-DRI drivers as a compile time decision (whether IN_DRI_DRIVER is defined). It is of no use to glapi. This commit also drops the use of glapidispatch.h in glx and libgl-xlib as they are considered extensions to glapi when it comes to defining public GL entries. --- src/glx/indirect.c | 63 ++++++++++++++++++++++++----------------------------- src/glx/single2.c | 4 +--- src/glx/singlepix.c | 5 ++--- 3 files changed, 31 insertions(+), 41 deletions(-) (limited to 'src/glx') diff --git a/src/glx/indirect.c b/src/glx/indirect.c index 2b09c1c3b5..1b93a8cc8d 100644 --- a/src/glx/indirect.c +++ b/src/glx/indirect.c @@ -30,7 +30,6 @@ #include "indirect.h" #include "glxclient.h" #include "indirect_size.h" -#include "glapidispatch.h" #include "glapi.h" #include "glthread.h" #include @@ -42,19 +41,19 @@ #define __GLX_PAD(n) (((n) + 3) & ~3) -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif -# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define NOINLINE __attribute__((noinline)) -# else -# define NOINLINE -# endif +#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) +#define FASTCALL __attribute__((fastcall)) +#else +#define FASTCALL +#endif +#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +#define NOINLINE __attribute__((noinline)) +#else +#define NOINLINE +#endif #ifndef __GNUC__ -# define __builtin_expect(x, y) x +#define __builtin_expect(x, y) x #endif /* If the size and opcode values are known at compile-time, this will, on @@ -5200,7 +5199,7 @@ glDeleteTexturesEXT(GLsizei n, const GLuint * textures) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_DeleteTextures(GET_DISPATCH(), (n, textures)); + GET_DISPATCH()->DeleteTextures(n, textures); } else #endif { @@ -5271,7 +5270,7 @@ glGenTexturesEXT(GLsizei n, GLuint * textures) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GenTextures(GET_DISPATCH(), (n, textures)); + GET_DISPATCH()->GenTextures(n, textures); } else #endif { @@ -5336,7 +5335,7 @@ glIsTextureEXT(GLuint texture) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - return CALL_IsTexture(GET_DISPATCH(), (texture)); + return GET_DISPATCH()->IsTexture(texture); } else #endif { @@ -5652,7 +5651,7 @@ glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table)); + GET_DISPATCH()->GetColorTable(target, format, type, table); } else #endif { @@ -5728,8 +5727,7 @@ glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetColorTableParameterfv(GET_DISPATCH(), - (target, pname, params)); + GET_DISPATCH()->GetColorTableParameterfv(target, pname, params); } else #endif { @@ -5801,8 +5799,7 @@ glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetColorTableParameteriv(GET_DISPATCH(), - (target, pname, params)); + GET_DISPATCH()->GetColorTableParameteriv(target, pname, params); } else #endif { @@ -6127,8 +6124,7 @@ gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetConvolutionFilter(GET_DISPATCH(), - (target, format, type, image)); + GET_DISPATCH()->GetConvolutionFilter(target, format, type, image); } else #endif { @@ -6205,8 +6201,7 @@ gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetConvolutionParameterfv(GET_DISPATCH(), - (target, pname, params)); + GET_DISPATCH()->GetConvolutionParameterfv(target, pname, params); } else #endif { @@ -6278,8 +6273,7 @@ gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetConvolutionParameteriv(GET_DISPATCH(), - (target, pname, params)); + GET_DISPATCH()->GetConvolutionParameteriv(target, pname, params); } else #endif { @@ -6358,8 +6352,7 @@ gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetHistogram(GET_DISPATCH(), - (target, reset, format, type, values)); + GET_DISPATCH()->GetHistogram(target, reset, format, type, values); } else #endif { @@ -6435,7 +6428,7 @@ gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params)); + GET_DISPATCH()->GetHistogramParameterfv(target, pname, params); } else #endif { @@ -6506,7 +6499,7 @@ gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params)); + GET_DISPATCH()->GetHistogramParameteriv(target, pname, params); } else #endif { @@ -6581,7 +6574,7 @@ gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values)); + GET_DISPATCH()->GetMinmax(target, reset, format, type, values); } else #endif { @@ -6655,7 +6648,7 @@ gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params)); + GET_DISPATCH()->GetMinmaxParameterfv(target, pname, params); } else #endif { @@ -6723,7 +6716,7 @@ gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params)); + GET_DISPATCH()->GetMinmaxParameteriv(target, pname, params); } else #endif { @@ -10664,5 +10657,5 @@ __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment, } -# undef FASTCALL -# undef NOINLINE +#undef FASTCALL +#undef NOINLINE diff --git a/src/glx/single2.c b/src/glx/single2.c index 318d18e555..66281fa9c9 100644 --- a/src/glx/single2.c +++ b/src/glx/single2.c @@ -36,7 +36,6 @@ #include "indirect.h" #include "indirect_vertex_array.h" #include "glapitable.h" -#include "glapidispatch.h" #include "glapi.h" #ifdef USE_XCB #include @@ -944,8 +943,7 @@ glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, struct glx_context *const gc = __glXGetCurrentContext(); if (gc->isDirect) { - return CALL_AreTexturesResident(GET_DISPATCH(), - (n, textures, residences)); + return GET_DISPATCH()->AreTexturesResident(n, textures, residences); } else { struct glx_context *const gc = __glXGetCurrentContext(); diff --git a/src/glx/singlepix.c b/src/glx/singlepix.c index b61f26b2f3..3fe2d4639a 100644 --- a/src/glx/singlepix.c +++ b/src/glx/singlepix.c @@ -31,7 +31,6 @@ #include "packsingle.h" #include "indirect.h" #include "glapitable.h" -#include "glapidispatch.h" #include "glapi.h" #include "glthread.h" #include "glapioffsets.h" @@ -121,8 +120,8 @@ void NAME(_gloffset_GetSeparableFilter) (GLenum target, GLenum format, #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->isDirect) { - CALL_GetSeparableFilter(GET_DISPATCH(), - (target, format, type, row, column, span)); + GET_DISPATCH()->GetSeparableFilter(target, format, type, + row, column, span); return; } else -- cgit v1.2.3