radv: remove the LLVM version string when ACO is used
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 6 May 2020 07:32:27 +0000 (09:32 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 8 May 2020 06:45:26 +0000 (08:45 +0200)
Now that ACO supports all shader stages (the only exception is NGG
GS on Navi10 but it fallbacks to legacy GS) it makes sense to remove
the LLVM version string reported as part of the device name.

The LLVM version string was added in the past for some Feral games
to workaround LLVM issues by detecting the version. With ACO, this
is unecessary because the Mesa version is enough to eventually enable
specific shader workarounds.

When the LLVM version string is missing, it is assumed that an old
LLVM is used and workarounds are automatically applied. The only
Vulkan games that might be affected is Shadow of The Tomb Raider
but the impact should be fairly small.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4911>

src/amd/vulkan/radv_device.c

index d4b78ef..d5d1553 100644 (file)
@@ -333,8 +333,9 @@ radv_physical_device_try_create(struct radv_instance *instance,
        device->use_aco = instance->perftest_flags & RADV_PERFTEST_ACO;
 
        snprintf(device->name, sizeof(device->name),
-                "AMD RADV%s %s (LLVM " MESA_LLVM_VERSION_STRING ")", device->use_aco ? "/ACO" : "",
-                device->rad_info.name);
+                "AMD RADV %s (%s)",
+                device->rad_info.name,
+                device->use_aco ? "ACO" : "LLVM " MESA_LLVM_VERSION_STRING);
 
        if (radv_device_get_cache_uuid(device->rad_info.family, device->cache_uuid)) {
                result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED,
@@ -1481,8 +1482,8 @@ radv_get_physical_device_properties_1_2(struct radv_physical_device *pdevice,
        p->driverID = VK_DRIVER_ID_MESA_RADV;
        snprintf(p->driverName, VK_MAX_DRIVER_NAME_SIZE, "radv");
        snprintf(p->driverInfo, VK_MAX_DRIVER_INFO_SIZE,
-                "Mesa " PACKAGE_VERSION MESA_GIT_SHA1
-                " (LLVM " MESA_LLVM_VERSION_STRING ")");
+                "Mesa " PACKAGE_VERSION MESA_GIT_SHA1 " (%s)",
+                pdevice->use_aco ? "ACO" : "LLVM " MESA_LLVM_VERSION_STRING);
        p->conformanceVersion = (VkConformanceVersion) {
                .major = 1,
                .minor = 2,