mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 15:30:09 +00:00
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> (cherry picked from commit 25e1c3d5b3ab4e066dd36c0a964ce7d413dac02e)
This commit is contained in:
parent
34aa290747
commit
4295192f35
@ -544,7 +544,7 @@
|
||||
"description": "radv: Use a fallback for marketing name when libdrm doesn't know it.",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
@ -782,7 +782,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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user