• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2017 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
25 
26 #ifndef ANV_EXTENSIONS_H
27 #define ANV_EXTENSIONS_H
28 
29 #include "stdbool.h"
30 
31 #define ANV_INSTANCE_EXTENSION_COUNT 10
32 
33 extern const VkExtensionProperties anv_instance_extensions[];
34 
35 struct anv_instance_extension_table {
36    union {
37       bool extensions[ANV_INSTANCE_EXTENSION_COUNT];
38       struct {
39          bool KHR_external_fence_capabilities;
40          bool KHR_external_memory_capabilities;
41          bool KHR_external_semaphore_capabilities;
42          bool KHR_get_physical_device_properties2;
43          bool KHR_get_surface_capabilities2;
44          bool KHR_surface;
45          bool KHR_wayland_surface;
46          bool KHR_xcb_surface;
47          bool KHR_xlib_surface;
48          bool EXT_debug_report;
49       };
50    };
51 };
52 
53 extern const struct anv_instance_extension_table anv_instance_extensions_supported;
54 
55 
56 #define ANV_DEVICE_EXTENSION_COUNT 26
57 
58 extern const VkExtensionProperties anv_device_extensions[];
59 
60 struct anv_device_extension_table {
61    union {
62       bool extensions[ANV_DEVICE_EXTENSION_COUNT];
63       struct {
64         bool ANDROID_native_buffer;
65         bool KHR_16bit_storage;
66         bool KHR_bind_memory2;
67         bool KHR_dedicated_allocation;
68         bool KHR_descriptor_update_template;
69         bool KHR_external_fence;
70         bool KHR_external_fence_fd;
71         bool KHR_external_memory;
72         bool KHR_external_memory_fd;
73         bool KHR_external_semaphore;
74         bool KHR_external_semaphore_fd;
75         bool KHR_get_memory_requirements2;
76         bool KHR_image_format_list;
77         bool KHR_incremental_present;
78         bool KHR_maintenance1;
79         bool KHR_maintenance2;
80         bool KHR_push_descriptor;
81         bool KHR_relaxed_block_layout;
82         bool KHR_sampler_mirror_clamp_to_edge;
83         bool KHR_sampler_ycbcr_conversion;
84         bool KHR_shader_draw_parameters;
85         bool KHR_storage_buffer_storage_class;
86         bool KHR_swapchain;
87         bool KHR_variable_pointers;
88         bool KHX_multiview;
89         bool EXT_external_memory_dma_buf;
90       };
91    };
92 };
93 
94 struct anv_physical_device;
95 
96 void
97 anv_physical_device_get_supported_extensions(const struct anv_physical_device *device,
98                                              struct anv_device_extension_table *extensions);
99 
100 #endif /* ANV_EXTENSIONS_H */
101