[Mesa-dev] [PATCH 7/8] r300: let .get_name() append LLVM if built with LLVM
Emil Velikov
emil.l.velikov at gmail.com
Thu Jan 26 18:27:07 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
Provides quick and direct feedback to the user/developer.
Cc: Marek Olšák <marek.olsak at amd.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/gallium/drivers/r300/r300_screen.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index e5e7535358..12b94723cb 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -82,8 +82,16 @@ static const char* chip_families[] = {
static const char* r300_get_name(struct pipe_screen* pscreen)
{
struct r300_screen* r300screen = r300_screen(pscreen);
+ static char buffer[128];
+ const char *llvm = "";
- return chip_families[r300screen->caps.family];
+#ifdef HAVE_LLVM
+ llvm = " LLVM";
+#endif
+
+ util_snprintf(buffer, sizeof(buffer), "%s%s",
+ chip_families[r300screen->caps.family], llvm);
+ return buffer;
}
static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
--
2.11.0
More information about the mesa-dev
mailing list