diff options
author | Jason Ekstrand <[email protected]> | 2017-11-09 19:17:29 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-07 12:13:47 -0800 |
commit | c217607b65ae00918ea86454eb59e6ee69c6ea68 (patch) | |
tree | 09efd8bf06107bb4dd7c5a8b0405d2152559845d | |
parent | a1ee51309ef7a36aef177ef523260e7b574ce4ab (diff) |
anv: Support version overrides
While always sketchy to do, this is useful for debugging.
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_extensions_gen.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_extensions_gen.py b/src/intel/vulkan/anv_extensions_gen.py index ba5424d3d2f..9bcb631b124 100644 --- a/src/intel/vulkan/anv_extensions_gen.py +++ b/src/intel/vulkan/anv_extensions_gen.py @@ -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; |