vc4: Return V3D version details in the GL renderer info.
authorEric Anholt <eric@anholt.net>
Tue, 12 Jul 2016 18:57:13 +0000 (11:57 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 20 Jul 2016 23:15:15 +0000 (16:15 -0700)
This is as close as we get to a name for the 3D blocks.

src/gallium/drivers/vc4/vc4_screen.c
src/gallium/drivers/vc4/vc4_screen.h

index 96277dc4f9297d92fc1ed9a2f4abe6353d7cedd7..5882f070340bdce5fc61d16e2492d762c5bd3551 100644 (file)
@@ -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 *
index 9bd2765031c3517786add2924d1e2109933e0294..345b73ac1d82634a909a670d7ccf59ec25610da4 100644 (file)
@@ -52,6 +52,8 @@ struct vc4_screen {
 
         int v3d_ver;
 
+        const char *name;
+
         void *simulator_mem_base;
         uint32_t simulator_mem_size;