aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/glapi/gen/gl_table.py
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-06-09 09:27:21 +0200
committermarha <marha@users.sourceforge.net>2011-06-09 09:27:21 +0200
commit0de14292c4fac98f91105baf9cc16e58f25d4d77 (patch)
tree1704165c3d7f05bde08dc6d3d52ee33aed0f270f /mesalib/src/mapi/glapi/gen/gl_table.py
parent637bc31135b378ea9521b5a93b14bdce482da209 (diff)
parent0a9d2abef2e6fac5d52556969655a62711df6418 (diff)
downloadvcxsrv-0de14292c4fac98f91105baf9cc16e58f25d4d77.tar.gz
vcxsrv-0de14292c4fac98f91105baf9cc16e58f25d4d77.tar.bz2
vcxsrv-0de14292c4fac98f91105baf9cc16e58f25d4d77.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/include/GL/internal/dri_interface.h mesalib/src/gallium/auxiliary/util/u_math.h mesalib/src/mapi/glapi/gen/Makefile mesalib/src/mapi/glapi/gen/gl_table.py mesalib/src/mesa/SConscript mesalib/src/mesa/main/dlist.c mesalib/src/mesa/main/es_generator.py mesalib/src/mesa/main/imports.h mesalib/src/mesa/main/teximage.c mesalib/src/mesa/main/uniforms.c mesalib/src/mesa/state_tracker/st_draw.c mesalib/src/mesa/state_tracker/st_program.c mesalib/src/mesa/vbo/vbo_save_api.c xorg-server/xkeyboard-config/configure.in xorg-server/xkeyboard-config/rules/Makefile.am xorg-server/xkeyboard-config/rules/base.xml.in xorg-server/xkeyboard-config/symbols/cz xorg-server/xkeyboard-config/symbols/in
Diffstat (limited to 'mesalib/src/mapi/glapi/gen/gl_table.py')
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_table.py41
1 files changed, 22 insertions, 19 deletions
diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py
index f54d7a491..210e75925 100644
--- a/mesalib/src/mapi/glapi/gen/gl_table.py
+++ b/mesalib/src/mapi/glapi/gen/gl_table.py
@@ -73,7 +73,7 @@ class PrintRemapTable(gl_XML.gl_print_base):
gl_XML.gl_print_base.__init__(self)
self.es = es
- self.header_tag = '_GLAPI_DISPATCH_H_'
+ self.header_tag = '_DISPATCH_H_'
self.name = "gl_table.py (from Mesa)"
self.license = license.bsd_license_template % ("(C) Copyright IBM Corporation 2005", "IBM")
return
@@ -81,10 +81,8 @@ class PrintRemapTable(gl_XML.gl_print_base):
def printRealHeader(self):
print """
-/* this file should not be included directly in mesa */
-
/**
- * \\file glapidispatch.h
+ * \\file main/dispatch.h
* Macros for handling GL dispatch tables.
*
* For each known GL function, there are 3 macros in this file. The first
@@ -93,8 +91,9 @@ class PrintRemapTable(gl_XML.gl_print_base):
* can SET_FuncName, are used to get and set the dispatch pointer for the
* named function in the specified dispatch table.
*/
+
+#include "main/mfeatures.h"
"""
-
return
def printBody(self, api):
@@ -142,24 +141,28 @@ class PrintRemapTable(gl_XML.gl_print_base):
print '#define _gloffset_%s %d' % (f.name, f.offset)
print ''
- print '#if !defined(_GLAPI_USE_REMAP_TABLE)'
+ print '#if !FEATURE_remap_table'
print ''
for f, index in functions:
print '#define _gloffset_%s %d' % (f.name, f.offset)
print ''
- print '#else /* !_GLAPI_USE_REMAP_TABLE */'
+ print '#else /* !FEATURE_remap_table */'
print ''
- print '#define driDispatchRemapTable_size %u' % (count)
- print 'extern int driDispatchRemapTable[ driDispatchRemapTable_size ];'
- print ''
- print '#if FEATURE_remap_table'
- print '#define driDispatchRemapTable remap_table'
- print 'static int remap_table[driDispatchRemapTable_size];'
- print '#endif'
- print ''
+ if self.es:
+ remap_table = "esLocalRemapTable"
+
+ print '#define %s_size %u' % (remap_table, count)
+ print 'static int %s[ %s_size ];' % (remap_table, remap_table)
+ print ''
+ else:
+ remap_table = "driDispatchRemapTable"
+
+ print '#define %s_size %u' % (remap_table, count)
+ print 'extern int %s[ %s_size ];' % (remap_table, remap_table)
+ print ''
for f, index in functions:
print '#define %s_remap_index %u' % (f.name, index)
@@ -167,10 +170,10 @@ class PrintRemapTable(gl_XML.gl_print_base):
print ''
for f, index in functions:
- print '#define _gloffset_%s driDispatchRemapTable[%s_remap_index]' % (f.name, f.name)
+ print '#define _gloffset_%s %s[%s_remap_index]' % (f.name, remap_table, f.name)
print ''
- print '#endif /* _GLAPI_USE_REMAP_TABLE */'
+ print '#endif /* !FEATURE_remap_table */'
print ''
for f, index in abi_functions + functions:
@@ -199,12 +202,12 @@ class PrintRemapTable(gl_XML.gl_print_base):
print '#define SET_%s(disp, fn) SET_%s(disp, fn)' % (name, f.name)
print ''
- print '#if defined(_GLAPI_USE_REMAP_TABLE)'
+ print '#if FEATURE_remap_table'
for f in alias_functions:
for name in f.entry_points:
if name != f.name:
print '#define %s_remap_index %s_remap_index' % (name, f.name)
- print '#endif /* defined(_GLAPI_USE_REMAP_TABLE) */'
+ print '#endif /* FEATURE_remap_table */'
print ''
return