From 78198d634d1e55b4d58945bda5f46bbe327e8902 Mon Sep 17 00:00:00 2001 From: SoroushIMG Date: Wed, 15 Mar 2023 12:11:04 +0000 Subject: [PATCH] zink: Add driver name and API version to renderer name Having driver name in the renderer will be useful to differentiate between open source and proprietary drivers as they can have different feature sets/quirks. Vulkan API version is also added to the name to match up with ANGLE. Part-of: --- src/gallium/drivers/zink/zink_screen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index cef4374..0a6cb08 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -126,8 +126,14 @@ static const char * zink_get_name(struct pipe_screen *pscreen) { struct zink_screen *screen = zink_screen(pscreen); + const char *driver_name = vk_DriverId_to_str(screen->info.driver_props.driverID) + strlen("VK_DRIVER_ID_"); static char buf[1000]; - snprintf(buf, sizeof(buf), "zink (%s)", screen->info.props.deviceName); + snprintf(buf, sizeof(buf), "zink Vulkan %d.%d(%s (%s))", + VK_VERSION_MAJOR(screen->info.device_version), + VK_VERSION_MINOR(screen->info.device_version), + screen->info.props.deviceName, + strstr(vk_DriverId_to_str(screen->info.driver_props.driverID), "VK_DRIVER_ID_") ? driver_name : "Driver Unknown" + ); return buf; } -- 2.7.4