From d2b4b16589b1206b20aea638f8b0c7cf740b3a4f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 12 Jul 2016 11:57:13 -0700 Subject: [PATCH] vc4: Return V3D version details in the GL renderer info. This is as close as we get to a name for the 3D blocks. --- src/gallium/drivers/vc4/vc4_screen.c | 11 ++++++++++- src/gallium/drivers/vc4/vc4_screen.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 96277dc4f92..5882f070340 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -72,7 +72,16 @@ uint32_t vc4_debug; static const char * vc4_screen_get_name(struct pipe_screen *pscreen) { - return "VC4"; + struct vc4_screen *screen = vc4_screen(pscreen); + + if (!screen->name) { + screen->name = ralloc_asprintf(screen, + "VC4 V3D %d.%d", + screen->v3d_ver / 10, + screen->v3d_ver % 10); + } + + return screen->name; } static const char * diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h index 9bd2765031c..345b73ac1d8 100644 --- a/src/gallium/drivers/vc4/vc4_screen.h +++ b/src/gallium/drivers/vc4/vc4_screen.h @@ -52,6 +52,8 @@ struct vc4_screen { int v3d_ver; + const char *name; + void *simulator_mem_base; uint32_t simulator_mem_size; -- 2.30.2