From 8c92ac3ee3a818b2ecf4190f86f6a28337ee9b58 Mon Sep 17 00:00:00 2001 From: Echo J Date: Tue, 19 Mar 2024 11:33:44 +0200 Subject: [PATCH] nvk: Add NVK to the Vulkan device name Other Mesa Vulkan drivers do the same thing (this helps to identify the driver better especially with the recent official name import) Part-of: --- src/nouveau/vulkan/nvk_physical_device.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index 21d1a11ed09..7c7ac0bfa15 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -905,8 +905,14 @@ nvk_get_device_properties(const struct nvk_instance *instance, .shaderWarpsPerSM = info->max_warps_per_mp, }; - snprintf(properties->deviceName, sizeof(properties->deviceName), - "%s", info->device_name); + /* Add the driver to the device name (like other Mesa drivers do) */ + if (!strcmp(info->device_name, info->chipset_name)) { + snprintf(properties->deviceName, sizeof(properties->deviceName), + "NVK %s", info->device_name); + } else { + snprintf(properties->deviceName, sizeof(properties->deviceName), + "%s (NVK %s)", info->device_name, info->chipset_name); + } /* VK_EXT_shader_module_identifier */ STATIC_ASSERT(sizeof(vk_shaderModuleIdentifierAlgorithmUUID) ==