diff options
author | Jason Ekstrand <[email protected]> | 2017-09-22 07:36:39 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-03-07 12:13:47 -0800 |
commit | 05fc377f2e927c65efa67897c6bb35ff65bcd1e8 (patch) | |
tree | 36e0c33b72a89a3c0f279b54ce806b1302e90ebd /src/intel/vulkan/anv_extensions_gen.py | |
parent | 8efa173ed2d42dd817462eaa1ab3a4746458e551 (diff) |
anv/extensions: Add support for multiple API versions
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_extensions_gen.py')
-rw-r--r-- | src/intel/vulkan/anv_extensions_gen.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_extensions_gen.py b/src/intel/vulkan/anv_extensions_gen.py index 33827ecd015..1796437dc7c 100644 --- a/src/intel/vulkan/anv_extensions_gen.py +++ b/src/intel/vulkan/anv_extensions_gen.py @@ -147,9 +147,17 @@ const struct anv_instance_extension_table anv_instance_extensions_supported = { }; uint32_t -anv_physical_device_api_version(struct anv_physical_device *dev) +anv_physical_device_api_version(struct anv_physical_device *device) { - return ${MAX_API_VERSION.c_vk_version()}; + uint32_t version = 0; + +%for version in API_VERSIONS: + if (!(${version.enable})) + return version; + version = ${version.max_patch_version.c_vk_version()}; + +%endfor + return version; } const VkExtensionProperties anv_device_extensions[ANV_DEVICE_EXTENSION_COUNT] = { @@ -188,6 +196,7 @@ if __name__ == '__main__': assert ext.type == 'instance' or ext.type == 'device' template_env = { + 'API_VERSIONS': API_VERSIONS, 'MAX_API_VERSION': MAX_API_VERSION, 'instance_extensions': [e for e in EXTENSIONS if e.type == 'instance'], 'device_extensions': [e for e in EXTENSIONS if e.type == 'device'], |