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.
This commit is contained in:
@@ -195,7 +195,6 @@ extern void (*linker_foo(const unsigned char *procName))()
|
|||||||
#include "GL/gl.h"
|
#include "GL/gl.h"
|
||||||
#include "glapi/glapi.h"
|
#include "glapi/glapi.h"
|
||||||
#include "glapi/glapitable.h"
|
#include "glapi/glapitable.h"
|
||||||
#include "glapi/glapidispatch.h"
|
|
||||||
|
|
||||||
#if defined(USE_MGL_NAMESPACE)
|
#if defined(USE_MGL_NAMESPACE)
|
||||||
#define NAME(func) mgl##func
|
#define NAME(func) mgl##func
|
||||||
@@ -204,10 +203,10 @@ extern void (*linker_foo(const unsigned char *procName))()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DISPATCH(FUNC, ARGS, MESSAGE) \
|
#define DISPATCH(FUNC, ARGS, MESSAGE) \
|
||||||
CALL_ ## FUNC(GET_DISPATCH(), ARGS);
|
GET_DISPATCH()->FUNC ARGS
|
||||||
|
|
||||||
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
|
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
|
||||||
return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
|
return GET_DISPATCH()->FUNC ARGS
|
||||||
|
|
||||||
/* skip normal ones */
|
/* skip normal ones */
|
||||||
#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
|
#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
#include "indirect.h"
|
#include "indirect.h"
|
||||||
#include "glxclient.h"
|
#include "glxclient.h"
|
||||||
#include "indirect_size.h"
|
#include "indirect_size.h"
|
||||||
#include "glapidispatch.h"
|
|
||||||
#include "glapi.h"
|
#include "glapi.h"
|
||||||
#include "glthread.h"
|
#include "glthread.h"
|
||||||
#include <GL/glxproto.h>
|
#include <GL/glxproto.h>
|
||||||
@@ -42,19 +41,19 @@
|
|||||||
|
|
||||||
#define __GLX_PAD(n) (((n) + 3) & ~3)
|
#define __GLX_PAD(n) (((n) + 3) & ~3)
|
||||||
|
|
||||||
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||||
# define FASTCALL __attribute__((fastcall))
|
#define FASTCALL __attribute__((fastcall))
|
||||||
# else
|
#else
|
||||||
# define FASTCALL
|
#define FASTCALL
|
||||||
# endif
|
#endif
|
||||||
# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||||
# define NOINLINE __attribute__((noinline))
|
#define NOINLINE __attribute__((noinline))
|
||||||
# else
|
#else
|
||||||
# define NOINLINE
|
#define NOINLINE
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
# define __builtin_expect(x, y) x
|
#define __builtin_expect(x, y) x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If the size and opcode values are known at compile-time, this will, on
|
/* 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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_DeleteTextures(GET_DISPATCH(), (n, textures));
|
GET_DISPATCH()->DeleteTextures(n, textures);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -5271,7 +5270,7 @@ glGenTexturesEXT(GLsizei n, GLuint * textures)
|
|||||||
|
|
||||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GenTextures(GET_DISPATCH(), (n, textures));
|
GET_DISPATCH()->GenTextures(n, textures);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -5336,7 +5335,7 @@ glIsTextureEXT(GLuint texture)
|
|||||||
|
|
||||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
return CALL_IsTexture(GET_DISPATCH(), (texture));
|
return GET_DISPATCH()->IsTexture(texture);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -5652,7 +5651,7 @@ glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table)
|
|||||||
|
|
||||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table));
|
GET_DISPATCH()->GetColorTable(target, format, type, table);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -5728,8 +5727,7 @@ glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params)
|
|||||||
|
|
||||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetColorTableParameterfv(GET_DISPATCH(),
|
GET_DISPATCH()->GetColorTableParameterfv(target, pname, params);
|
||||||
(target, pname, params));
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -5801,8 +5799,7 @@ glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params)
|
|||||||
|
|
||||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetColorTableParameteriv(GET_DISPATCH(),
|
GET_DISPATCH()->GetColorTableParameteriv(target, pname, params);
|
||||||
(target, pname, params));
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetConvolutionFilter(GET_DISPATCH(),
|
GET_DISPATCH()->GetConvolutionFilter(target, format, type, image);
|
||||||
(target, format, type, image));
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetConvolutionParameterfv(GET_DISPATCH(),
|
GET_DISPATCH()->GetConvolutionParameterfv(target, pname, params);
|
||||||
(target, pname, params));
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
|
GET_DISPATCH()->GetConvolutionParameteriv(target, pname, params);
|
||||||
(target, pname, params));
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetHistogram(GET_DISPATCH(),
|
GET_DISPATCH()->GetHistogram(target, reset, format, type, values);
|
||||||
(target, reset, format, type, values));
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params));
|
GET_DISPATCH()->GetHistogramParameterfv(target, pname, params);
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params));
|
GET_DISPATCH()->GetHistogramParameteriv(target, pname, params);
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values));
|
GET_DISPATCH()->GetMinmax(target, reset, format, type, values);
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params));
|
GET_DISPATCH()->GetMinmaxParameterfv(target, pname, params);
|
||||||
} else
|
} else
|
||||||
#endif
|
#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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params));
|
GET_DISPATCH()->GetMinmaxParameteriv(target, pname, params);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -10664,5 +10657,5 @@ __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# undef FASTCALL
|
#undef FASTCALL
|
||||||
# undef NOINLINE
|
#undef NOINLINE
|
||||||
|
@@ -36,7 +36,6 @@
|
|||||||
#include "indirect.h"
|
#include "indirect.h"
|
||||||
#include "indirect_vertex_array.h"
|
#include "indirect_vertex_array.h"
|
||||||
#include "glapitable.h"
|
#include "glapitable.h"
|
||||||
#include "glapidispatch.h"
|
|
||||||
#include "glapi.h"
|
#include "glapi.h"
|
||||||
#ifdef USE_XCB
|
#ifdef USE_XCB
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
@@ -944,8 +943,7 @@ glAreTexturesResidentEXT(GLsizei n, const GLuint * textures,
|
|||||||
struct glx_context *const gc = __glXGetCurrentContext();
|
struct glx_context *const gc = __glXGetCurrentContext();
|
||||||
|
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
return CALL_AreTexturesResident(GET_DISPATCH(),
|
return GET_DISPATCH()->AreTexturesResident(n, textures, residences);
|
||||||
(n, textures, residences));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct glx_context *const gc = __glXGetCurrentContext();
|
struct glx_context *const gc = __glXGetCurrentContext();
|
||||||
|
@@ -31,7 +31,6 @@
|
|||||||
#include "packsingle.h"
|
#include "packsingle.h"
|
||||||
#include "indirect.h"
|
#include "indirect.h"
|
||||||
#include "glapitable.h"
|
#include "glapitable.h"
|
||||||
#include "glapidispatch.h"
|
|
||||||
#include "glapi.h"
|
#include "glapi.h"
|
||||||
#include "glthread.h"
|
#include "glthread.h"
|
||||||
#include "glapioffsets.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 defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||||
if (gc->isDirect) {
|
if (gc->isDirect) {
|
||||||
CALL_GetSeparableFilter(GET_DISPATCH(),
|
GET_DISPATCH()->GetSeparableFilter(target, format, type,
|
||||||
(target, format, type, row, column, span));
|
row, column, span);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -166,7 +166,6 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
|
|||||||
print '#include "indirect.h"'
|
print '#include "indirect.h"'
|
||||||
print '#include "glxclient.h"'
|
print '#include "glxclient.h"'
|
||||||
print '#include "indirect_size.h"'
|
print '#include "indirect_size.h"'
|
||||||
print '#include "glapidispatch.h"'
|
|
||||||
print '#include "glapi.h"'
|
print '#include "glapi.h"'
|
||||||
print '#include "glthread.h"'
|
print '#include "glthread.h"'
|
||||||
print '#include <GL/glxproto.h>'
|
print '#include <GL/glxproto.h>'
|
||||||
@@ -375,7 +374,7 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
|
|||||||
print ''
|
print ''
|
||||||
print '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)'
|
print '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)'
|
||||||
print ' if (gc->isDirect) {'
|
print ' if (gc->isDirect) {'
|
||||||
print ' %sCALL_%s(GET_DISPATCH(), (%s));' % (ret_string, func.name, func.get_called_parameter_string())
|
print ' %sGET_DISPATCH()->%s(%s);' % (ret_string, func.name, func.get_called_parameter_string())
|
||||||
print ' } else'
|
print ' } else'
|
||||||
print '#endif'
|
print '#endif'
|
||||||
print ' {'
|
print ' {'
|
||||||
|
@@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
#include "glapi/glapi_priv.h"
|
#include "glapi/glapi_priv.h"
|
||||||
#include "glapi/glapitable.h"
|
#include "glapi/glapitable.h"
|
||||||
#include "glapi/glapidispatch.h"
|
|
||||||
|
|
||||||
|
|
||||||
#if !(defined(USE_X86_ASM) || defined(USE_X86_64_ASM) || defined(USE_SPARC_ASM))
|
#if !(defined(USE_X86_ASM) || defined(USE_X86_64_ASM) || defined(USE_SPARC_ASM))
|
||||||
@@ -63,19 +62,19 @@
|
|||||||
#define F stdout
|
#define F stdout
|
||||||
#define DISPATCH(FUNC, ARGS, MESSAGE) \
|
#define DISPATCH(FUNC, ARGS, MESSAGE) \
|
||||||
fprintf MESSAGE; \
|
fprintf MESSAGE; \
|
||||||
CALL_ ## FUNC(GET_DISPATCH(), ARGS);
|
GET_DISPATCH()->FUNC ARGS
|
||||||
|
|
||||||
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
|
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
|
||||||
fprintf MESSAGE; \
|
fprintf MESSAGE; \
|
||||||
return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
|
return GET_DISPATCH()->FUNC ARGS
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define DISPATCH(FUNC, ARGS, MESSAGE) \
|
#define DISPATCH(FUNC, ARGS, MESSAGE) \
|
||||||
CALL_ ## FUNC(GET_DISPATCH(), ARGS);
|
GET_DISPATCH()->FUNC ARGS
|
||||||
|
|
||||||
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
|
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
|
||||||
return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
|
return GET_DISPATCH()->FUNC ARGS
|
||||||
|
|
||||||
#endif /* logging */
|
#endif /* logging */
|
||||||
|
|
||||||
|
@@ -58,7 +58,6 @@ struct display_dispatch {
|
|||||||
#ifdef GLX_INDIRECT_RENDERING
|
#ifdef GLX_INDIRECT_RENDERING
|
||||||
|
|
||||||
#include "glapi/glapitable.h"
|
#include "glapi/glapitable.h"
|
||||||
#include "glapi/glapidispatch.h"
|
|
||||||
|
|
||||||
#define KEYWORD1 PUBLIC
|
#define KEYWORD1 PUBLIC
|
||||||
|
|
||||||
@@ -69,10 +68,10 @@ struct display_dispatch {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DISPATCH(FUNC, ARGS, MESSAGE) \
|
#define DISPATCH(FUNC, ARGS, MESSAGE) \
|
||||||
CALL_ ## FUNC(GET_DISPATCH(), ARGS);
|
GET_DISPATCH()->FUNC ARGS
|
||||||
|
|
||||||
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
|
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
|
||||||
return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
|
return GET_DISPATCH()->FUNC ARGS
|
||||||
|
|
||||||
/* skip normal ones */
|
/* skip normal ones */
|
||||||
#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
|
#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
|
||||||
|
Reference in New Issue
Block a user