aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-12-05 11:32:19 -0600
committerTim Rowley <[email protected]>2016-12-05 13:42:39 -0600
commitefc3ca64ba2292f6e6f0c4214ef41a35543fb285 (patch)
treea281a0889e07dd38f0da251693a2f4f00a7551ec
parentb035d9cab5a483f0ceee2d8fad578f64aca1888a (diff)
swr: include llvm version and vector width in renderer string
Uses llvmpipe's string formating. Reviewed-by: Bruce Cherniak <[email protected]>
-rw-r--r--src/gallium/drivers/swr/swr_screen.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp
index 75a9d0227a8..539acf1c8a8 100644
--- a/src/gallium/drivers/swr/swr_screen.cpp
+++ b/src/gallium/drivers/swr/swr_screen.cpp
@@ -35,6 +35,7 @@
#include "util/u_inlines.h"
#include "util/u_cpu_detect.h"
#include "util/u_format_s3tc.h"
+#include "util/u_string.h"
#include "state_tracker/sw_winsys.h"
@@ -67,7 +68,11 @@ extern "C" {
static const char *
swr_get_name(struct pipe_screen *screen)
{
- return "SWR";
+ static char buf[100];
+ util_snprintf(buf, sizeof(buf), "SWR (LLVM %u.%u, %u bits)",
+ HAVE_LLVM >> 8, HAVE_LLVM & 0xff,
+ lp_native_vector_width );
+ return buf;
}
static const char *
@@ -940,6 +945,11 @@ swr_create_screen_internal(struct sw_winsys *winsys)
g_GlobalKnobs.MAX_PRIMS_PER_DRAW.Value(49152);
}
+ if (!lp_build_init()) {
+ FREE(screen);
+ return NULL;
+ }
+
screen->winsys = winsys;
screen->base.get_name = swr_get_name;
screen->base.get_vendor = swr_get_vendor;