f325fe84da8ff36443968f1235792d3edf6dbecc
[mesa.git] / src / intel / vulkan / anv_extensions.py
1 COPYRIGHT = """\
2 /*
3 * Copyright 2017 Intel Corporation
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sub license, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial portions
15 * of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
21 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25 """
26
27 import argparse
28 import xml.etree.cElementTree as et
29
30 from mako.template import Template
31
32 class Extension:
33 def __init__(self, name, ext_version, enable):
34 self.name = name
35 self.ext_version = int(ext_version)
36 if enable is True:
37 self.enable = 'true';
38 elif enable is False:
39 self.enable = 'false';
40 else:
41 self.enable = enable;
42
43 EXTENSIONS = [
44 Extension('VK_KHR_dedicated_allocation', 1, True),
45 Extension('VK_KHR_descriptor_update_template', 1, True),
46 Extension('VK_KHR_external_memory', 1, True),
47 Extension('VK_KHR_external_memory_capabilities', 1, True),
48 Extension('VK_KHR_external_memory_fd', 1, True),
49 Extension('VK_KHR_get_memory_requirements2', 1, True),
50 Extension('VK_KHR_get_physical_device_properties2', 1, True),
51 Extension('VK_KHR_get_surface_capabilities2', 1, True),
52 Extension('VK_KHR_incremental_present', 1, True),
53 Extension('VK_KHR_maintenance1', 1, True),
54 Extension('VK_KHR_push_descriptor', 1, True),
55 Extension('VK_KHR_sampler_mirror_clamp_to_edge', 1, True),
56 Extension('VK_KHR_shader_draw_parameters', 1, True),
57 Extension('VK_KHR_storage_buffer_storage_class', 1, True),
58 Extension('VK_KHR_surface', 25, True),
59 Extension('VK_KHR_swapchain', 68, True),
60 Extension('VK_KHR_variable_pointers', 1, True),
61 Extension('VK_KHR_wayland_surface', 6, 'VK_USE_PLATFORM_WAYLAND_KHR'),
62 Extension('VK_KHR_xcb_surface', 6, 'VK_USE_PLATFORM_XCB_KHR'),
63 Extension('VK_KHR_xlib_surface', 6, 'VK_USE_PLATFORM_XLIB_KHR'),
64 Extension('VK_KHX_multiview', 1, True),
65 ]