mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
anv: Support version overrides
While always sketchy to do, this is useful for debugging. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
This commit is contained in:
parent
a1ee51309e
commit
c217607b65
1 changed files with 7 additions and 1 deletions
|
|
@ -134,10 +134,12 @@ _TEMPLATE_C = Template(COPYRIGHT + """
|
|||
VK_USE_PLATFORM_XCB_KHR || \\
|
||||
VK_USE_PLATFORM_XLIB_KHR)
|
||||
|
||||
static const uint32_t MAX_API_VERSION = ${MAX_API_VERSION.c_vk_version()};
|
||||
|
||||
VkResult anv_EnumerateInstanceVersion(
|
||||
uint32_t* pApiVersion)
|
||||
{
|
||||
*pApiVersion = ${MAX_API_VERSION.c_vk_version()};
|
||||
*pApiVersion = MAX_API_VERSION;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -158,6 +160,10 @@ anv_physical_device_api_version(struct anv_physical_device *device)
|
|||
{
|
||||
uint32_t version = 0;
|
||||
|
||||
uint32_t override = vk_get_version_override();
|
||||
if (override)
|
||||
return MIN2(override, MAX_API_VERSION);
|
||||
|
||||
%for version in API_VERSIONS:
|
||||
if (!(${version.enable}))
|
||||
return version;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue