aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-03-14 13:58:54 +0000
committerEric Engestrom <[email protected]>2019-04-04 16:08:11 +0000
commit05b114e5265722e970cb894ed6c3aa3026c0d04d (patch)
tree4f8b97ee38e06c6dfb7117be84dd6e8544b84fbc /src/amd/vulkan
parent593614f4d47fbc8aadec6930d7c7c417c46bbd85 (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/amd/vulkan')
-rw-r--r--src/amd/vulkan/radv_debug.c11
-rw-r--r--src/amd/vulkan/radv_device.c10
2 files changed, 6 insertions, 15 deletions
diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c
index 6234904aaa4..4854b094ba7 100644
--- a/src/amd/vulkan/radv_debug.c
+++ b/src/amd/vulkan/radv_debug.c
@@ -629,7 +629,7 @@ static void
radv_dump_device_name(struct radv_device *device, FILE *f)
{
struct radeon_info *info = &device->physical_device->rad_info;
- char llvm_string[32] = {}, kernel_version[128] = {};
+ char kernel_version[128] = {};
struct utsname uname_data;
const char *chip_name;
@@ -639,14 +639,11 @@ radv_dump_device_name(struct radv_device *device, FILE *f)
snprintf(kernel_version, sizeof(kernel_version),
" / %s", uname_data.release);
- snprintf(llvm_string, sizeof(llvm_string),
- ", LLVM %i.%i.%i", (HAVE_LLVM >> 8) & 0xff,
- HAVE_LLVM & 0xff, MESA_LLVM_VERSION_PATCH);
-
- fprintf(f, "Device name: %s (%s DRM %i.%i.%i%s%s)\n\n",
+ fprintf(f, "Device name: %s (%s DRM %i.%i.%i%s, LLVM "
+ MESA_LLVM_VERSION_STRING ")\n\n",
chip_name, device->physical_device->name,
info->drm_major, info->drm_minor, info->drm_patchlevel,
- kernel_version, llvm_string);
+ kernel_version);
}
static bool
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index ffec7cfdb19..5baf6aad58d 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -87,7 +87,6 @@ static void
radv_get_device_name(enum radeon_family family, char *name, size_t name_len)
{
const char *chip_string;
- char llvm_string[32] = {};
switch (family) {
case CHIP_TAHITI: chip_string = "AMD RADV TAHITI"; break;
@@ -116,10 +115,7 @@ radv_get_device_name(enum radeon_family family, char *name, size_t name_len)
default: chip_string = "AMD RADV unknown"; break;
}
- snprintf(llvm_string, sizeof(llvm_string),
- " (LLVM %i.%i.%i)", (HAVE_LLVM >> 8) & 0xff,
- HAVE_LLVM & 0xff, MESA_LLVM_VERSION_PATCH);
- snprintf(name, name_len, "%s%s", chip_string, llvm_string);
+ snprintf(name, name_len, "%s (LLVM " MESA_LLVM_VERSION_STRING ")", chip_string);
}
static uint64_t
@@ -1267,9 +1263,7 @@ void radv_GetPhysicalDeviceProperties2(
memset(driver_props->driverInfo, 0, VK_MAX_DRIVER_INFO_SIZE_KHR);
snprintf(driver_props->driverInfo, VK_MAX_DRIVER_INFO_SIZE_KHR,
"Mesa " PACKAGE_VERSION MESA_GIT_SHA1
- " (LLVM %d.%d.%d)",
- (HAVE_LLVM >> 8) & 0xff, HAVE_LLVM & 0xff,
- MESA_LLVM_VERSION_PATCH);
+ " (LLVM " MESA_LLVM_VERSION_STRING ")");
driver_props->conformanceVersion = (VkConformanceVersionKHR) {
.major = 1,