• 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 #include "anv_private.h"
26 
27 #include "vk_util.h"
28 
29 /* Convert the VK_USE_PLATFORM_* defines to booleans */
30 #ifdef VK_USE_PLATFORM_DISPLAY_KHR
31 #   undef VK_USE_PLATFORM_DISPLAY_KHR
32 #   define VK_USE_PLATFORM_DISPLAY_KHR true
33 #else
34 #   define VK_USE_PLATFORM_DISPLAY_KHR false
35 #endif
36 #ifdef VK_USE_PLATFORM_XLIB_KHR
37 #   undef VK_USE_PLATFORM_XLIB_KHR
38 #   define VK_USE_PLATFORM_XLIB_KHR true
39 #else
40 #   define VK_USE_PLATFORM_XLIB_KHR false
41 #endif
42 #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
43 #   undef VK_USE_PLATFORM_XLIB_XRANDR_EXT
44 #   define VK_USE_PLATFORM_XLIB_XRANDR_EXT true
45 #else
46 #   define VK_USE_PLATFORM_XLIB_XRANDR_EXT false
47 #endif
48 #ifdef VK_USE_PLATFORM_XCB_KHR
49 #   undef VK_USE_PLATFORM_XCB_KHR
50 #   define VK_USE_PLATFORM_XCB_KHR true
51 #else
52 #   define VK_USE_PLATFORM_XCB_KHR false
53 #endif
54 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
55 #   undef VK_USE_PLATFORM_WAYLAND_KHR
56 #   define VK_USE_PLATFORM_WAYLAND_KHR true
57 #else
58 #   define VK_USE_PLATFORM_WAYLAND_KHR false
59 #endif
60 #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
61 #   undef VK_USE_PLATFORM_DIRECTFB_EXT
62 #   define VK_USE_PLATFORM_DIRECTFB_EXT true
63 #else
64 #   define VK_USE_PLATFORM_DIRECTFB_EXT false
65 #endif
66 #ifdef VK_USE_PLATFORM_ANDROID_KHR
67 #   undef VK_USE_PLATFORM_ANDROID_KHR
68 #   define VK_USE_PLATFORM_ANDROID_KHR true
69 #else
70 #   define VK_USE_PLATFORM_ANDROID_KHR false
71 #endif
72 #ifdef VK_USE_PLATFORM_WIN32_KHR
73 #   undef VK_USE_PLATFORM_WIN32_KHR
74 #   define VK_USE_PLATFORM_WIN32_KHR true
75 #else
76 #   define VK_USE_PLATFORM_WIN32_KHR false
77 #endif
78 #ifdef VK_USE_PLATFORM_VI_NN
79 #   undef VK_USE_PLATFORM_VI_NN
80 #   define VK_USE_PLATFORM_VI_NN true
81 #else
82 #   define VK_USE_PLATFORM_VI_NN false
83 #endif
84 #ifdef VK_USE_PLATFORM_IOS_MVK
85 #   undef VK_USE_PLATFORM_IOS_MVK
86 #   define VK_USE_PLATFORM_IOS_MVK true
87 #else
88 #   define VK_USE_PLATFORM_IOS_MVK false
89 #endif
90 #ifdef VK_USE_PLATFORM_MACOS_MVK
91 #   undef VK_USE_PLATFORM_MACOS_MVK
92 #   define VK_USE_PLATFORM_MACOS_MVK true
93 #else
94 #   define VK_USE_PLATFORM_MACOS_MVK false
95 #endif
96 #ifdef VK_USE_PLATFORM_METAL_EXT
97 #   undef VK_USE_PLATFORM_METAL_EXT
98 #   define VK_USE_PLATFORM_METAL_EXT true
99 #else
100 #   define VK_USE_PLATFORM_METAL_EXT false
101 #endif
102 #ifdef VK_USE_PLATFORM_FUCHSIA
103 #   undef VK_USE_PLATFORM_FUCHSIA
104 #   define VK_USE_PLATFORM_FUCHSIA true
105 #else
106 #   define VK_USE_PLATFORM_FUCHSIA false
107 #endif
108 #ifdef VK_USE_PLATFORM_GGP
109 #   undef VK_USE_PLATFORM_GGP
110 #   define VK_USE_PLATFORM_GGP true
111 #else
112 #   define VK_USE_PLATFORM_GGP false
113 #endif
114 #ifdef VK_ENABLE_BETA_EXTENSIONS
115 #   undef VK_ENABLE_BETA_EXTENSIONS
116 #   define VK_ENABLE_BETA_EXTENSIONS true
117 #else
118 #   define VK_ENABLE_BETA_EXTENSIONS false
119 #endif
120 
121 /* And ANDROID too */
122 #ifdef ANDROID
123 #   undef ANDROID
124 #   define ANDROID true
125 #else
126 #   define ANDROID false
127 #   define ANDROID_API_LEVEL 0
128 #endif
129 
130 #define ANV_HAS_SURFACE (VK_USE_PLATFORM_WAYLAND_KHR ||                                        VK_USE_PLATFORM_XCB_KHR ||                                        VK_USE_PLATFORM_XLIB_KHR ||                                        VK_USE_PLATFORM_DISPLAY_KHR)
131 
132 static const uint32_t MAX_API_VERSION = VK_MAKE_VERSION(1, 2, 145);
133 
anv_EnumerateInstanceVersion(uint32_t * pApiVersion)134 VkResult anv_EnumerateInstanceVersion(
135     uint32_t*                                   pApiVersion)
136 {
137     *pApiVersion = MAX_API_VERSION;
138     return VK_SUCCESS;
139 }
140 
141 const VkExtensionProperties anv_instance_extensions[ANV_INSTANCE_EXTENSION_COUNT] = {
142    {"VK_KHR_device_group_creation", 1},
143    {"VK_KHR_display", 23},
144    {"VK_KHR_external_fence_capabilities", 1},
145    {"VK_KHR_external_memory_capabilities", 1},
146    {"VK_KHR_external_semaphore_capabilities", 1},
147    {"VK_KHR_get_display_properties2", 1},
148    {"VK_KHR_get_physical_device_properties2", 1},
149    {"VK_KHR_get_surface_capabilities2", 1},
150    {"VK_KHR_surface", 25},
151    {"VK_KHR_surface_protected_capabilities", 1},
152    {"VK_KHR_wayland_surface", 6},
153    {"VK_KHR_xcb_surface", 6},
154    {"VK_KHR_xlib_surface", 6},
155    {"VK_EXT_acquire_xlib_display", 1},
156    {"VK_EXT_debug_report", 8},
157    {"VK_EXT_direct_mode_display", 1},
158    {"VK_EXT_display_surface_counter", 1},
159 };
160 
161 const struct anv_instance_extension_table anv_instance_extensions_supported = {
162    .KHR_device_group_creation = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
163    .KHR_display = (!ANDROID || ANDROID_API_LEVEL >= 26) && (VK_USE_PLATFORM_DISPLAY_KHR),
164    .KHR_external_fence_capabilities = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
165    .KHR_external_memory_capabilities = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
166    .KHR_external_semaphore_capabilities = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
167    .KHR_get_display_properties2 = (!ANDROID || ANDROID_API_LEVEL >= 29) && (VK_USE_PLATFORM_DISPLAY_KHR),
168    .KHR_get_physical_device_properties2 = (!ANDROID || ANDROID_API_LEVEL >= 26) && (true),
169    .KHR_get_surface_capabilities2 = (!ANDROID || ANDROID_API_LEVEL >= 26) && (ANV_HAS_SURFACE),
170    .KHR_surface = (!ANDROID || ANDROID_API_LEVEL >= 26) && (ANV_HAS_SURFACE),
171    .KHR_surface_protected_capabilities = (!ANDROID || ANDROID_API_LEVEL >= 29) && (ANV_HAS_SURFACE),
172    .KHR_wayland_surface = (!ANDROID || ANDROID_API_LEVEL >= 26) && (VK_USE_PLATFORM_WAYLAND_KHR),
173    .KHR_xcb_surface = (!ANDROID || ANDROID_API_LEVEL >= 26) && (VK_USE_PLATFORM_XCB_KHR),
174    .KHR_xlib_surface = (!ANDROID || ANDROID_API_LEVEL >= 26) && (VK_USE_PLATFORM_XLIB_KHR),
175    .EXT_acquire_xlib_display = VK_USE_PLATFORM_XLIB_XRANDR_EXT,
176    .EXT_debug_report = true,
177    .EXT_direct_mode_display = VK_USE_PLATFORM_DISPLAY_KHR,
178    .EXT_display_surface_counter = VK_USE_PLATFORM_DISPLAY_KHR,
179 };
180 
181 uint32_t
anv_physical_device_api_version(struct anv_physical_device * device)182 anv_physical_device_api_version(struct anv_physical_device *device)
183 {
184     uint32_t version = 0;
185 
186     uint32_t override = vk_get_version_override();
187     if (override)
188         return MIN2(override, MAX_API_VERSION);
189 
190     if (!(true))
191         return version;
192     version = VK_MAKE_VERSION(1, 0, 145);
193 
194     if (!(true))
195         return version;
196     version = VK_MAKE_VERSION(1, 1, 145);
197 
198     if (!(!ANDROID))
199         return version;
200     version = VK_MAKE_VERSION(1, 2, 145);
201 
202     return version;
203 }
204 
205 const VkExtensionProperties anv_device_extensions[ANV_DEVICE_EXTENSION_COUNT] = {
206    {"VK_KHR_8bit_storage", 1},
207    {"VK_KHR_16bit_storage", 1},
208    {"VK_KHR_bind_memory2", 1},
209    {"VK_KHR_buffer_device_address", 1},
210    {"VK_KHR_copy_commands2", 1},
211    {"VK_KHR_create_renderpass2", 1},
212    {"VK_KHR_dedicated_allocation", 3},
213    {"VK_KHR_depth_stencil_resolve", 1},
214    {"VK_KHR_descriptor_update_template", 1},
215    {"VK_KHR_device_group", 4},
216    {"VK_KHR_draw_indirect_count", 1},
217    {"VK_KHR_driver_properties", 1},
218    {"VK_KHR_external_fence", 1},
219    {"VK_KHR_external_fence_fd", 1},
220    {"VK_KHR_external_memory", 1},
221    {"VK_KHR_external_memory_fd", 1},
222    {"VK_KHR_external_semaphore", 1},
223    {"VK_KHR_external_semaphore_fd", 1},
224    {"VK_KHR_get_memory_requirements2", 1},
225    {"VK_KHR_image_format_list", 1},
226    {"VK_KHR_imageless_framebuffer", 1},
227    {"VK_KHR_incremental_present", 1},
228    {"VK_KHR_maintenance1", 2},
229    {"VK_KHR_maintenance2", 1},
230    {"VK_KHR_maintenance3", 1},
231    {"VK_KHR_multiview", 1},
232    {"VK_KHR_performance_query", 1},
233    {"VK_KHR_pipeline_executable_properties", 1},
234    {"VK_KHR_push_descriptor", 2},
235    {"VK_KHR_relaxed_block_layout", 1},
236    {"VK_KHR_sampler_mirror_clamp_to_edge", 3},
237    {"VK_KHR_sampler_ycbcr_conversion", 14},
238    {"VK_KHR_separate_depth_stencil_layouts", 1},
239    {"VK_KHR_shader_atomic_int64", 1},
240    {"VK_KHR_shader_clock", 1},
241    {"VK_KHR_shader_draw_parameters", 1},
242    {"VK_KHR_shader_float16_int8", 1},
243    {"VK_KHR_shader_float_controls", 4},
244    {"VK_KHR_shader_non_semantic_info", 1},
245    {"VK_KHR_shader_subgroup_extended_types", 1},
246    {"VK_KHR_shader_terminate_invocation", 1},
247    {"VK_KHR_spirv_1_4", 1},
248    {"VK_KHR_storage_buffer_storage_class", 1},
249    {"VK_KHR_swapchain", 70},
250    {"VK_KHR_swapchain_mutable_format", 1},
251    {"VK_KHR_timeline_semaphore", 2},
252    {"VK_KHR_uniform_buffer_standard_layout", 1},
253    {"VK_KHR_variable_pointers", 1},
254    {"VK_KHR_vulkan_memory_model", 3},
255    {"VK_EXT_4444_formats", 1},
256    {"VK_EXT_buffer_device_address", 2},
257    {"VK_EXT_calibrated_timestamps", 1},
258    {"VK_EXT_conditional_rendering", 2},
259    {"VK_EXT_custom_border_color", 12},
260    {"VK_EXT_depth_clip_enable", 1},
261    {"VK_EXT_descriptor_indexing", 2},
262    {"VK_EXT_display_control", 1},
263    {"VK_EXT_extended_dynamic_state", 1},
264    {"VK_EXT_external_memory_dma_buf", 1},
265    {"VK_EXT_external_memory_host", 1},
266    {"VK_EXT_fragment_shader_interlock", 1},
267    {"VK_EXT_global_priority", 2},
268    {"VK_EXT_host_query_reset", 1},
269    {"VK_EXT_image_drm_format_modifier", 1},
270    {"VK_EXT_image_robustness", 1},
271    {"VK_EXT_index_type_uint8", 1},
272    {"VK_EXT_inline_uniform_block", 1},
273    {"VK_EXT_line_rasterization", 1},
274    {"VK_EXT_memory_budget", 1},
275    {"VK_EXT_pci_bus_info", 2},
276    {"VK_EXT_pipeline_creation_cache_control", 3},
277    {"VK_EXT_pipeline_creation_feedback", 1},
278    {"VK_EXT_post_depth_coverage", 1},
279    {"VK_EXT_private_data", 1},
280    {"VK_EXT_queue_family_foreign", 1},
281    {"VK_EXT_robustness2", 1},
282    {"VK_EXT_sampler_filter_minmax", 2},
283    {"VK_EXT_scalar_block_layout", 1},
284    {"VK_EXT_separate_stencil_usage", 1},
285    {"VK_EXT_shader_atomic_float", 1},
286    {"VK_EXT_shader_demote_to_helper_invocation", 1},
287    {"VK_EXT_shader_stencil_export", 1},
288    {"VK_EXT_shader_subgroup_ballot", 1},
289    {"VK_EXT_shader_subgroup_vote", 1},
290    {"VK_EXT_shader_viewport_index_layer", 1},
291    {"VK_EXT_subgroup_size_control", 2},
292    {"VK_EXT_texel_buffer_alignment", 1},
293    {"VK_EXT_transform_feedback", 1},
294    {"VK_EXT_vertex_attribute_divisor", 3},
295    {"VK_EXT_ycbcr_image_arrays", 1},
296    {"VK_ANDROID_external_memory_android_hardware_buffer", 3},
297    {"VK_ANDROID_native_buffer", 7},
298    {"VK_GOOGLE_decorate_string", 1},
299    {"VK_GOOGLE_hlsl_functionality1", 1},
300    {"VK_GOOGLE_user_type", 1},
301    {"VK_INTEL_performance_query", 2},
302    {"VK_INTEL_shader_integer_functions2", 1},
303    {"VK_NV_compute_shader_derivatives", 1},
304 };
305 
306 void
anv_physical_device_get_supported_extensions(const struct anv_physical_device * device,struct anv_device_extension_table * extensions)307 anv_physical_device_get_supported_extensions(const struct anv_physical_device *device,
308                                                    struct anv_device_extension_table *extensions)
309 {
310    *extensions = (struct anv_device_extension_table) {
311       .KHR_8bit_storage = (!ANDROID || ANDROID_API_LEVEL >= 29) && (device->info.gen >= 8),
312       .KHR_16bit_storage = (!ANDROID || ANDROID_API_LEVEL >= 28) && (device->info.gen >= 8),
313       .KHR_bind_memory2 = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
314       .KHR_buffer_device_address = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (device->has_a64_buffer_access),
315       .KHR_copy_commands2 = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
316       .KHR_create_renderpass2 = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
317       .KHR_dedicated_allocation = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
318       .KHR_depth_stencil_resolve = (!ANDROID || ANDROID_API_LEVEL >= 29) && (true),
319       .KHR_descriptor_update_template = (!ANDROID || ANDROID_API_LEVEL >= 26) && (true),
320       .KHR_device_group = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
321       .KHR_draw_indirect_count = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
322       .KHR_driver_properties = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
323       .KHR_external_fence = (!ANDROID || ANDROID_API_LEVEL >= 28) && (device->has_syncobj_wait),
324       .KHR_external_fence_fd = (!ANDROID || ANDROID_API_LEVEL >= 28) && (device->has_syncobj_wait),
325       .KHR_external_memory = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
326       .KHR_external_memory_fd = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
327       .KHR_external_semaphore = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
328       .KHR_external_semaphore_fd = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
329       .KHR_get_memory_requirements2 = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
330       .KHR_image_format_list = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
331       .KHR_imageless_framebuffer = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
332       .KHR_incremental_present = (!ANDROID || ANDROID_API_LEVEL >= 26) && (ANV_HAS_SURFACE),
333       .KHR_maintenance1 = (!ANDROID || ANDROID_API_LEVEL >= 26) && (true),
334       .KHR_maintenance2 = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
335       .KHR_maintenance3 = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
336       .KHR_multiview = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
337       .KHR_performance_query = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (device->use_softpin && device->perf && device->perf->i915_perf_version >= 3 && device->use_call_secondary),
338       .KHR_pipeline_executable_properties = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
339       .KHR_push_descriptor = (!ANDROID || ANDROID_API_LEVEL >= 26) && (true),
340       .KHR_relaxed_block_layout = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
341       .KHR_sampler_mirror_clamp_to_edge = (!ANDROID || ANDROID_API_LEVEL >= 26) && (true),
342       .KHR_sampler_ycbcr_conversion = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
343       .KHR_separate_depth_stencil_layouts = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
344       .KHR_shader_atomic_int64 = (!ANDROID || ANDROID_API_LEVEL >= 29) && (device->info.gen >= 9 && device->use_softpin),
345       .KHR_shader_clock = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
346       .KHR_shader_draw_parameters = (!ANDROID || ANDROID_API_LEVEL >= 26) && (true),
347       .KHR_shader_float16_int8 = (!ANDROID || ANDROID_API_LEVEL >= 29) && (device->info.gen >= 8),
348       .KHR_shader_float_controls = (!ANDROID || ANDROID_API_LEVEL >= 29) && (device->info.gen >= 8),
349       .KHR_shader_non_semantic_info = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
350       .KHR_shader_subgroup_extended_types = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (device->info.gen >= 8),
351       .KHR_shader_terminate_invocation = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
352       .KHR_spirv_1_4 = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
353       .KHR_storage_buffer_storage_class = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
354       .KHR_swapchain = (!ANDROID || ANDROID_API_LEVEL >= 26) && (ANV_HAS_SURFACE),
355       .KHR_swapchain_mutable_format = (!ANDROID || ANDROID_API_LEVEL >= 29) && (ANV_HAS_SURFACE),
356       .KHR_timeline_semaphore = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
357       .KHR_uniform_buffer_standard_layout = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
358       .KHR_variable_pointers = (!ANDROID || ANDROID_API_LEVEL >= 28) && (true),
359       .KHR_vulkan_memory_model = (!ANDROID || ANDROID_API_LEVEL >= 29) && (true),
360       .EXT_4444_formats = true,
361       .EXT_buffer_device_address = device->has_a64_buffer_access,
362       .EXT_calibrated_timestamps = device->has_reg_timestamp,
363       .EXT_conditional_rendering = device->info.gen >= 8 || device->info.is_haswell,
364       .EXT_custom_border_color = device->info.gen >= 8,
365       .EXT_depth_clip_enable = true,
366       .EXT_descriptor_indexing = device->has_a64_buffer_access && device->has_bindless_images,
367       .EXT_display_control = VK_USE_PLATFORM_DISPLAY_KHR,
368       .EXT_extended_dynamic_state = true,
369       .EXT_external_memory_dma_buf = true,
370       .EXT_external_memory_host = true,
371       .EXT_fragment_shader_interlock = device->info.gen >= 9,
372       .EXT_global_priority = device->has_context_priority,
373       .EXT_host_query_reset = true,
374       .EXT_image_drm_format_modifier = false,
375       .EXT_image_robustness = true,
376       .EXT_index_type_uint8 = true,
377       .EXT_inline_uniform_block = true,
378       .EXT_line_rasterization = true,
379       .EXT_memory_budget = device->has_mem_available,
380       .EXT_pci_bus_info = true,
381       .EXT_pipeline_creation_cache_control = true,
382       .EXT_pipeline_creation_feedback = true,
383       .EXT_post_depth_coverage = device->info.gen >= 9,
384       .EXT_private_data = true,
385       .EXT_queue_family_foreign = ANDROID,
386       .EXT_robustness2 = true,
387       .EXT_sampler_filter_minmax = device->info.gen >= 9,
388       .EXT_scalar_block_layout = true,
389       .EXT_separate_stencil_usage = true,
390       .EXT_shader_atomic_float = true,
391       .EXT_shader_demote_to_helper_invocation = true,
392       .EXT_shader_stencil_export = device->info.gen >= 9,
393       .EXT_shader_subgroup_ballot = true,
394       .EXT_shader_subgroup_vote = true,
395       .EXT_shader_viewport_index_layer = true,
396       .EXT_subgroup_size_control = true,
397       .EXT_texel_buffer_alignment = true,
398       .EXT_transform_feedback = true,
399       .EXT_vertex_attribute_divisor = true,
400       .EXT_ycbcr_image_arrays = true,
401       .ANDROID_external_memory_android_hardware_buffer = (!ANDROID || ANDROID_API_LEVEL >= 28) && (ANDROID),
402       .ANDROID_native_buffer = (!ANDROID || ANDROID_API_LEVEL >= 26) && (ANDROID),
403       .GOOGLE_decorate_string = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
404       .GOOGLE_hlsl_functionality1 = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
405       .GOOGLE_user_type = (!ANDROID || ANDROID_API_LEVEL >= 9999) && (true),
406       .INTEL_performance_query = device->perf && device->perf->i915_perf_version >= 3,
407       .INTEL_shader_integer_functions2 = device->info.gen >= 8,
408       .NV_compute_shader_derivatives = true,
409    };
410 }
411