Mesa (master): mesa: Fix remap_table setup.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Mon May 23 15:21:04 UTC 2011
Module: Mesa
Branch: master
Commit: 5af46e836073d2112b147b524e441bdb808cc128
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5af46e836073d2112b147b524e441bdb808cc128
Author: Thierry Reding <thierry at gilfi.de>
Date: Sun May 22 14:07:22 2011 +0200
mesa: Fix remap_table setup.
Since the SET_xxx and GET_xxx macros used to initialize the remap_table
have been replaced by inline functions, the missing late macro expansion
leads to driDispatchRemapTable not being redefined to remap_table, which
in turn causes the remap_table not to be setup properly.
This commit fixes the issue by moving the table redefinition after the
definition of driDispatchRemapTable but in front of the inline function
definitions.
---
src/mapi/glapi/gen/gl_table.py | 5 +++++
src/mesa/main/es_generator.py | 4 ----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py
index 7183052..c3cc616 100644
--- a/src/mapi/glapi/gen/gl_table.py
+++ b/src/mapi/glapi/gen/gl_table.py
@@ -152,6 +152,11 @@ class PrintRemapTable(gl_XML.gl_print_base):
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 ''
for f, index in functions:
print '#define %s_remap_index %u' % (f.name, index)
diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py
index a56debe..87d8bd3 100644
--- a/src/mesa/main/es_generator.py
+++ b/src/mesa/main/es_generator.py
@@ -687,10 +687,6 @@ print """
#define need_MESA_remap_table
#include "%sapi/main/remap_helper.h"
-/* force SET_* macros to use the local remap table */
-#define driDispatchRemapTable remap_table
-static int remap_table[driDispatchRemapTable_size];
-
static void
init_remap_table(void)
{
More information about the mesa-commit
mailing list