[Mesa-dev] [PATCH 09/15] mesa: execute _mesa_init_remap_table() only once
Emil Velikov
emil.l.velikov at gmail.com
Tue Jun 7 16:33:42 UTC 2016
From: Emil Velikov <emil.velikov at collabora.com>
An earlier commit 16ee7a55ae2 ("mesa: Allow contexts of different APIs
to coexist.") reworked the remapping so that the table and approach used
is identical for all APIs.
Yet again with function itself not API specific, thus one should not
need to invoke it multiple times.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Alternatively (if we do), it would be great to add a comment.
---
src/mesa/main/context.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 172c854..f85ca1b 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -406,11 +406,10 @@ one_time_init( struct gl_context *ctx )
}
/* per-API one-time init */
- if (!(api_init_mask & (1 << ctx->API))) {
+ if (!(api_init_mask & (1 << ctx->API)))
_mesa_init_get_hash(ctx);
- _mesa_init_remap_table();
- }
+ _mesa_init_remap_table();
api_init_mask |= 1 << ctx->API;
--
2.8.2
More information about the mesa-dev
mailing list