[Mesa-dev] [PATCH 8/8] nouveau: let .get_name() append LLVM if built with LLVM
Emil Velikov
emil.l.velikov at gmail.com
Thu Jan 26 18:27:08 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
Analogous to previous two commits. Afaict only nv30 uses draw, so if
people prefer we can restrict this print only to those devices.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Unrelated:
Wasn't there a kernel/libdrm helper which can give us the complete
device name ?
---
src/gallium/drivers/nouveau/nouveau_screen.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index f59e101caf..24177bd7da 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -33,8 +33,13 @@ nouveau_screen_get_name(struct pipe_screen *pscreen)
{
struct nouveau_device *dev = nouveau_screen(pscreen)->device;
static char buffer[128];
+ const char *llvm = "";
- util_snprintf(buffer, sizeof(buffer), "NV%02X", dev->chipset);
+#ifdef HAVE_LLVM
+ llvm = " LLVM";
+#endif
+
+ util_snprintf(buffer, sizeof(buffer), "NV%02X%s", dev->chipset, llvm);
return buffer;
}
--
2.11.0
More information about the mesa-dev
mailing list