From: Eric Anholt Date: Tue, 12 Jul 2016 18:57:13 +0000 (-0700) Subject: vc4: Return V3D version details in the GL renderer info. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d2b4b16589b1206b20aea638f8b0c7cf740b3a4f;p=mesa.git vc4: Return V3D version details in the GL renderer info. This is as close as we get to a name for the 3D blocks. --- 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;