radv: Use a fallback for marketing name when libdrm doesn't know it.
Currently for GPUs which don't have a marketing name in libdrm, RADV just prints "(null) (RADV ...)", which looks bad. This commit replaces the "(null)" with "AMD Unknown". Cc: mesa-stable Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18775>
This commit is contained in:
@@ -815,7 +815,8 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
|
||||
|
||||
const char *marketing_name = device->ws->get_chip_name(device->ws);
|
||||
snprintf(device->marketing_name, sizeof(device->name), "%s (RADV %s%s)",
|
||||
marketing_name, device->rad_info.name, radv_get_compiler_string(device));
|
||||
marketing_name ? marketing_name : "AMD Unknown", device->rad_info.name,
|
||||
radv_get_compiler_string(device));
|
||||
|
||||
#ifdef ENABLE_SHADER_CACHE
|
||||
if (radv_device_get_cache_uuid(device, device->cache_uuid)) {
|
||||
|
||||
Reference in New Issue
Block a user