[Mesa-dev] [PATCH] radv: use radeon_info::name
Alex Smith
asmith at feralinteractive.com
Fri Aug 17 09:43:59 UTC 2018
FWIW, putting "RADV" inside the brackets (e.g. " (RADV, LLVM ...)") would
still work for us.
On 17 August 2018 at 10:38, Samuel Pitoiset <samuel.pitoiset at gmail.com>
wrote:
> Yeah, ignore this patch.
>
> On 8/17/18 11:25 AM, Alex Smith wrote:
>
>> All of our Vulkan games rely on the presence of "RADV" somewhere in the
>> device name string to distinguish between RADV and AMDVLK/GPU-PRO, and
>> that's used to check whether the driver version is supported, whether to
>> enable bug workarounds, etc. This will certainly break that.
>>
>> Thanks,
>> Alex
>>
>> On 17 August 2018 at 10:00, Samuel Pitoiset <samuel.pitoiset at gmail.com
>> <mailto:samuel.pitoiset at gmail.com>> wrote:
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com
>> <mailto:samuel.pitoiset at gmail.com>>
>>
>> ---
>> src/amd/vulkan/radv_device.c | 33 +++------------------------------
>> 1 file changed, 3 insertions(+), 30 deletions(-)
>>
>> diff --git a/src/amd/vulkan/radv_device.c
>> b/src/amd/vulkan/radv_device.c
>> index cc88abb57a..e11005a1f8 100644
>> --- a/src/amd/vulkan/radv_device.c
>> +++ b/src/amd/vulkan/radv_device.c
>> @@ -77,41 +77,14 @@ radv_get_device_uuid(struct radeon_info *info,
>> void *uuid)
>> }
>>
>> static void
>> -radv_get_device_name(enum radeon_family family, char *name, size_t
>> name_len)
>> +radv_get_device_name(struct radeon_info *info, 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;
>> - case CHIP_PITCAIRN: chip_string = "AMD RADV PITCAIRN"; break;
>> - case CHIP_VERDE: chip_string = "AMD RADV CAPE VERDE"; break;
>> - case CHIP_OLAND: chip_string = "AMD RADV OLAND"; break;
>> - case CHIP_HAINAN: chip_string = "AMD RADV HAINAN"; break;
>> - case CHIP_BONAIRE: chip_string = "AMD RADV BONAIRE"; break;
>> - case CHIP_KAVERI: chip_string = "AMD RADV KAVERI"; break;
>> - case CHIP_KABINI: chip_string = "AMD RADV KABINI"; break;
>> - case CHIP_HAWAII: chip_string = "AMD RADV HAWAII"; break;
>> - case CHIP_MULLINS: chip_string = "AMD RADV MULLINS"; break;
>> - case CHIP_TONGA: chip_string = "AMD RADV TONGA"; break;
>> - case CHIP_ICELAND: chip_string = "AMD RADV ICELAND"; break;
>> - case CHIP_CARRIZO: chip_string = "AMD RADV CARRIZO"; break;
>> - case CHIP_FIJI: chip_string = "AMD RADV FIJI"; break;
>> - case CHIP_POLARIS10: chip_string = "AMD RADV POLARIS10";
>> break;
>> - case CHIP_POLARIS11: chip_string = "AMD RADV POLARIS11";
>> break;
>> - case CHIP_POLARIS12: chip_string = "AMD RADV POLARIS12";
>> break;
>> - case CHIP_STONEY: chip_string = "AMD RADV STONEY"; break;
>> - case CHIP_VEGAM: chip_string = "AMD RADV VEGA M"; break;
>> - case CHIP_VEGA10: chip_string = "AMD RADV VEGA10"; break;
>> - case CHIP_VEGA12: chip_string = "AMD RADV VEGA12"; break;
>> - case CHIP_RAVEN: chip_string = "AMD RADV RAVEN"; break;
>> - 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%s", info->name, llvm_string);
>> }
>>
>> static void
>> @@ -297,7 +270,7 @@ radv_physical_device_init(struct
>> radv_physical_device *device,
>>
>> radv_handle_env_var_force_family(device);
>>
>> - radv_get_device_name(device->rad_info.family, device->name,
>> sizeof(device->name));
>> + radv_get_device_name(&device->rad_info, device->name,
>> sizeof(device->name));
>>
>> if (radv_device_get_cache_uuid(device->rad_info.family,
>> device->cache_uuid)) {
>> device->ws->destroy(device->ws);
>> -- 2.18.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org
>> >
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>> <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180817/65df5a55/attachment.html>
More information about the mesa-dev
mailing list