[Mesa-dev] [PATCH 6/8] i915g: let .get_name() append LLVM if built with LLVM

Emil Velikov emil.l.velikov at gmail.com
Thu Jan 26 18:27:06 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

Provides quick and direct feedback to the user/developer.

Cc: Stéphane Marchesin <marcheu at chromium.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/gallium/drivers/i915/i915_screen.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 6f9e612348..31803eab0e 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -65,6 +65,7 @@ i915_get_name(struct pipe_screen *screen)
 {
    static char buffer[128];
    const char *chipset;
+   const char *llvm = "";
 
    switch (i915_screen(screen)->iws->pci_id) {
    case PCI_CHIP_I915_G:
@@ -102,7 +103,11 @@ i915_get_name(struct pipe_screen *screen)
       break;
    }
 
-   util_snprintf(buffer, sizeof(buffer), "i915 (chipset: %s)", chipset);
+#ifdef HAVE_LLVM
+   llvm = " LLVM";
+#endif
+
+   util_snprintf(buffer, sizeof(buffer), "i915 (chipset: %s)%s", chipset, llvm);
    return buffer;
 }
 
-- 
2.11.0



More information about the mesa-dev mailing list