summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/remap.c
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-06-07 17:33:41 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-06-13 15:31:28 +0100
commitb81685eb32d7fd51f12cfdbac8b5f6046c416304 (patch)
tree062f2f3c05524da87ee4ef84e8ae9bc471a2ad4f /src/mesa/main/remap.c
parentbfbf286f7d607f1add1cedd2e2717e249fb45d0f (diff)
downloadexternal_mesa3d-b81685eb32d7fd51f12cfdbac8b5f6046c416304.zip
external_mesa3d-b81685eb32d7fd51f12cfdbac8b5f6046c416304.tar.gz
external_mesa3d-b81685eb32d7fd51f12cfdbac8b5f6046c416304.tar.bz2
mesa: kill off _mesa_do_init_remap_table()
... and inline its contents in _mesa_init_remap_table(). Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/remap.c')
-rw-r--r--src/mesa/main/remap.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/mesa/main/remap.c b/src/mesa/main/remap.c
index a756057..6dc4235 100644
--- a/src/mesa/main/remap.c
+++ b/src/mesa/main/remap.c
@@ -98,10 +98,8 @@ map_function_spec(const char *spec)
* The remap table needs to be initialized before calling the
* CALL/GET/SET macros defined in main/dispatch.h.
*/
-static void
-_mesa_do_init_remap_table(const char *pool,
- int size,
- const struct gl_function_pool_remap *remap)
+void
+_mesa_init_remap_table(void)
{
static bool initialized = false;
GLint i;
@@ -110,17 +108,17 @@ _mesa_do_init_remap_table(const char *pool,
return;
initialized = true;
- /* initialize the remap table */
- for (i = 0; i < size; i++) {
+ /* initialize the MESA_remap_table_functions table */
+ for (i = 0; i < driDispatchRemapTable_size; i++) {
int offset;
const char *spec;
/* sanity check */
- assert(i == remap[i].remap_index);
- spec = _mesa_function_pool + remap[i].pool_index;
+ assert(i == MESA_remap_table_functions[i].remap_index);
+ spec = _mesa_function_pool + MESA_remap_table_functions[i].pool_index;
offset = map_function_spec(spec);
- /* store the dispatch offset in the remap table */
+ /* store the dispatch offset in the MESA_remap_table_functions table */
driDispatchRemapTable[i] = offset;
if (offset < 0) {
const char *name = spec + strlen(spec) + 1;
@@ -128,12 +126,3 @@ _mesa_do_init_remap_table(const char *pool,
}
}
}
-
-
-void
-_mesa_init_remap_table(void)
-{
- _mesa_do_init_remap_table(_mesa_function_pool,
- driDispatchRemapTable_size,
- MESA_remap_table_functions);
-}