print '#else /* !_GLAPI_USE_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)
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 */'
#if FEATURE_remap_table
+/* define esLocalRemapTable */
/* cannot include main/dispatch.h here */
#define _GLAPI_USE_REMAP_TABLE
#include "%sapi/main/glapidispatch.h"
return;
}
- for (i = 0; i < driDispatchRemapTable_size; i++) {
+ for (i = 0; i < esLocalRemapTable_size; i++) {
GLint offset;
const char *spec;
spec = _mesa_function_pool + remap[i].pool_index;
offset = _mesa_map_function_spec(spec);
- remap_table[i] = offset;
+ esLocalRemapTable[i] = offset;
}
initialized = GL_TRUE;
_glthread_UNLOCK_MUTEX(mutex);