# Make archive of gl* API dispatcher functions only
libglapi.a: $(GLAPI_OBJECTS)
- @if [ "${WINDOW_SYSTEM}" = "dri" ] ; then \
- touch libglapi.a ; \
- else \
- $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) ; \
- fi
+ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS)
######################################################################
# Device drivers
#ifndef _DISPATCH_H
#define _DISPATCH_H
+#ifdef IN_DRI_DRIVER
+#define _GLAPI_USE_REMAP_TABLE
+#endif
+
#include "glapitable.h"
+#include "glapioffsets.h"
#include "glapidispatch.h"
#endif /* _DISPATCH_H */
def printBody(self, api):
abi = [ "1.0", "1.1", "1.2", "GL_ARB_multitexture" ]
+ print '/* this file should not be included directly in mesa */'
+ print ''
+
functions = []
abi_functions = []
count = 0
last_static = f.offset
print ''
- print '#if !defined(IN_DRI_DRIVER)'
+ print '#if !defined(_GLAPI_USE_REMAP_TABLE)'
print ''
for [f, index] in functions:
print '#define _gloffset_%s driDispatchRemapTable[%s_remap_index]' % (f.name, f.name)
print ''
- print '#endif /* !defined(IN_DRI_DRIVER) */'
+ print '#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */'
return
def printRealHeader(self):
print """
+/* this file should not be included directly in mesa */
+
/**
* \\file glapidispatch.h
* Macros for handling GL dispatch tables.
print ''
- print '#if !defined(IN_DRI_DRIVER)'
+ print '#if !defined(_GLAPI_USE_REMAP_TABLE)'
print ''
for [f, index] in functions:
print ''
- print '#endif /* !defined(IN_DRI_DRIVER) */'
+ print '#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */'
return
# define _GLAPI_DISPATCH_H_
+/* this file should not be included directly in mesa */
+
/**
* \file glapidispatch.h
* Macros for handling GL dispatch tables.
#define GET_MultiTexCoord4svARB(disp) ((disp)->MultiTexCoord4svARB)
#define SET_MultiTexCoord4svARB(disp, fn) ((disp)->MultiTexCoord4svARB = fn)
-#if !defined(IN_DRI_DRIVER)
+#if !defined(_GLAPI_USE_REMAP_TABLE)
#define CALL_AttachShader(disp, parameters) (*((disp)->AttachShader)) parameters
#define GET_AttachShader(disp) ((disp)->AttachShader)
#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index])
#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], fn)
-#endif /* !defined(IN_DRI_DRIVER) */
+#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */
#endif /* !defined( _GLAPI_DISPATCH_H_ ) */
#if !defined( _GLAPI_OFFSETS_H_ )
# define _GLAPI_OFFSETS_H_
+/* this file should not be included directly in mesa */
+
#define _gloffset_NewList 0
#define _gloffset_EndList 1
#define _gloffset_CallList 2
#define _gloffset_MultiTexCoord4sARB 406
#define _gloffset_MultiTexCoord4svARB 407
-#if !defined(IN_DRI_DRIVER)
+#if !defined(_GLAPI_USE_REMAP_TABLE)
#define _gloffset_AttachShader 408
#define _gloffset_CreateProgram 409
#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]
#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]
-#endif /* !defined(IN_DRI_DRIVER) */
+#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */
#endif /* !defined( _GLAPI_OFFSETS_H_ ) */
def printRealHeader(self):
print '#include "glapi/dispatch.h"'
- print '#include "glapi/glapioffsets.h"'
print ''
return
#include "context.h"
#include "imports.h"
#include "macros.h"
-#include "glapi/glapioffsets.h"
#include "glapi/dispatch.h"
typedef void (GLAPIENTRY *array_func)( const void * );
#include "viewport.h"
#include "vtxfmt.h"
#include "glapi/glthread.h"
-#include "glapi/glapioffsets.h"
#include "glapi/glapitable.h"
#include "shader/program.h"
#include "shader/prog_print.h"
#include "main/compiler.h"
#include "glapi/glapi.h"
#include "glapi/glapitable.h"
+#include "glapi/glapidispatch.h"
#include "glapi/glthread.h"
#define GLAPIENTRY
#endif
-#include "glapi/dispatch.h"
#include "glapi/glapitemp.h"
#endif /* USE_X86_ASM */
*/
#include "glapi/dispatch.h"
-#include "glapi/glapioffsets.h"
struct gl_function_remap {
GLint func_index;
#endif
#include "glapi/dispatch.h"
-#include "glapi/glapioffsets.h"
static void GLAPIENTRY TAG(ArrayElement)( GLint i )
{