From 30211d0f4aa9ab6c3b503b3739e36a18f99e5b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 22 Jan 2025 03:06:55 -0500 Subject: [PATCH] mesa: enable GL name reuse for virgl I think we only have to disable it for Qemu. Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/shared.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index 546b0d629d0..66477183ca5 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -74,19 +74,17 @@ _mesa_alloc_shared_state(struct gl_context *ctx, simple_mtx_init(&shared->Mutex, mtx_plain); - const char *driver_name = ctx->screen->get_name(ctx->screen); - bool is_virgl_guest = !strcmp(driver_name, "virgl"); const char *process_name = util_get_process_name(); bool is_virgl_host = strstr(process_name, "qemu-system") == process_name || strstr(process_name, "crosvm") || strstr(process_name, "virgl_test_server"); - /* Enable GL name reuse for all drivers by default except virgl, which - * is hopelessly broken. + /* Enable GL name reuse for all drivers by default except virglrenderer, + * which is hopelessly broken. * * To disable it, set reuse_gl_names=0 in the environment. */ - if (!is_virgl_guest && !is_virgl_host) + if (!is_virgl_host) shared->ReuseGLNames = options->reuse_gl_names != 0; _mesa_InitHashTable(&shared->DisplayList, shared->ReuseGLNames);