diff options
author | Eric Engestrom <[email protected]> | 2019-03-14 13:58:54 +0000 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-04-04 16:08:11 +0000 |
commit | 05b114e5265722e970cb894ed6c3aa3026c0d04d (patch) | |
tree | 4f8b97ee38e06c6dfb7117be84dd6e8544b84fbc /src/gallium/drivers/r600 | |
parent | 593614f4d47fbc8aadec6930d7c7c417c46bbd85 (diff) |
simplify LLVM version string printing
Figure it out once in the build system, then just use that all over the place.
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe_common.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c index 19ba09ae82a..fce35b45141 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.c +++ b/src/gallium/drivers/r600/r600_pipe_common.c @@ -47,10 +47,6 @@ #include <llvm-c/TargetMachine.h> #endif -#ifndef MESA_LLVM_VERSION_PATCH -#define MESA_LLVM_VERSION_PATCH 0 -#endif - struct r600_multi_fence { struct pipe_reference reference; struct pipe_fence_handle *gfx; @@ -1271,7 +1267,7 @@ struct pipe_resource *r600_resource_create_common(struct pipe_screen *screen, bool r600_common_screen_init(struct r600_common_screen *rscreen, struct radeon_winsys *ws) { - char family_name[32] = {}, llvm_string[32] = {}, kernel_version[128] = {}; + char family_name[32] = {}, kernel_version[128] = {}; struct utsname uname_data; const char *chip_name; @@ -1288,17 +1284,15 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen, snprintf(kernel_version, sizeof(kernel_version), " / %s", uname_data.release); - if (HAVE_LLVM > 0) { - snprintf(llvm_string, sizeof(llvm_string), - ", LLVM %i.%i.%i", (HAVE_LLVM >> 8) & 0xff, - HAVE_LLVM & 0xff, MESA_LLVM_VERSION_PATCH); - } - snprintf(rscreen->renderer_string, sizeof(rscreen->renderer_string), - "%s (%sDRM %i.%i.%i%s%s)", + "%s (%sDRM %i.%i.%i%s" +#if HAVE_LLVM > 0 + ", LLVM " MESA_LLVM_VERSION_STRING +#endif + ")", chip_name, family_name, rscreen->info.drm_major, rscreen->info.drm_minor, rscreen->info.drm_patchlevel, - kernel_version, llvm_string); + kernel_version); rscreen->b.get_name = r600_get_name; rscreen->b.get_vendor = r600_get_vendor; |