diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 98b93e458bc..9a406d19bd5 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -109,10 +109,8 @@ llvmpipe_get_vendor(struct pipe_screen *screen) static const char * llvmpipe_get_name(struct pipe_screen *screen) { - static char buf[100]; - snprintf(buf, sizeof(buf), "llvmpipe (LLVM " MESA_LLVM_VERSION_STRING ", %u bits)", - lp_native_vector_width ); - return buf; + struct llvmpipe_screen *lscreen = llvmpipe_screen(screen); + return lscreen->renderer_string; } @@ -1037,6 +1035,10 @@ llvmpipe_create_screen(struct sw_winsys *winsys) screen->num_threads = debug_get_num_option("LP_NUM_THREADS", screen->num_threads); screen->num_threads = MIN2(screen->num_threads, LP_MAX_THREADS); + lp_build_init(); /* get lp_native_vector_width initialised */ + + snprintf(screen->renderer_string, sizeof(screen->renderer_string), "llvmpipe (LLVM " MESA_LLVM_VERSION_STRING ", %u bits)", lp_native_vector_width ); + (void) mtx_init(&screen->cs_mutex, mtx_plain); (void) mtx_init(&screen->rast_mutex, mtx_plain); diff --git a/src/gallium/drivers/llvmpipe/lp_screen.h b/src/gallium/drivers/llvmpipe/lp_screen.h index dad886c8aea..c72bf838acb 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.h +++ b/src/gallium/drivers/llvmpipe/lp_screen.h @@ -67,6 +67,8 @@ struct llvmpipe_screen mtx_t late_mutex; bool late_init_done; + char renderer_string[100]; + struct disk_cache *disk_shader_cache; unsigned num_disk_shader_cache_hits; unsigned num_disk_shader_cache_misses;