mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21922>
This commit is contained in:
parent
81a4163375
commit
78198d634d
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue