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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28262>
This commit is contained in:
Echo J 2024-03-19 11:33:44 +02:00 committed by Marge Bot
parent 432d8bd081
commit 8c92ac3ee3

View file

@ -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) ==