• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1const char* ExtensionToString(Extension extension) {
2  switch (extension) {
3    case Extension::kSPV_AMD_gcn_shader:
4      return "SPV_AMD_gcn_shader";
5    case Extension::kSPV_AMD_gpu_shader_half_float:
6      return "SPV_AMD_gpu_shader_half_float";
7    case Extension::kSPV_AMD_gpu_shader_half_float_fetch:
8      return "SPV_AMD_gpu_shader_half_float_fetch";
9    case Extension::kSPV_AMD_gpu_shader_int16:
10      return "SPV_AMD_gpu_shader_int16";
11    case Extension::kSPV_AMD_shader_ballot:
12      return "SPV_AMD_shader_ballot";
13    case Extension::kSPV_AMD_shader_early_and_late_fragment_tests:
14      return "SPV_AMD_shader_early_and_late_fragment_tests";
15    case Extension::kSPV_AMD_shader_explicit_vertex_parameter:
16      return "SPV_AMD_shader_explicit_vertex_parameter";
17    case Extension::kSPV_AMD_shader_fragment_mask:
18      return "SPV_AMD_shader_fragment_mask";
19    case Extension::kSPV_AMD_shader_image_load_store_lod:
20      return "SPV_AMD_shader_image_load_store_lod";
21    case Extension::kSPV_AMD_shader_trinary_minmax:
22      return "SPV_AMD_shader_trinary_minmax";
23    case Extension::kSPV_AMD_texture_gather_bias_lod:
24      return "SPV_AMD_texture_gather_bias_lod";
25    case Extension::kSPV_EXT_demote_to_helper_invocation:
26      return "SPV_EXT_demote_to_helper_invocation";
27    case Extension::kSPV_EXT_descriptor_indexing:
28      return "SPV_EXT_descriptor_indexing";
29    case Extension::kSPV_EXT_fragment_fully_covered:
30      return "SPV_EXT_fragment_fully_covered";
31    case Extension::kSPV_EXT_fragment_invocation_density:
32      return "SPV_EXT_fragment_invocation_density";
33    case Extension::kSPV_EXT_fragment_shader_interlock:
34      return "SPV_EXT_fragment_shader_interlock";
35    case Extension::kSPV_EXT_mesh_shader:
36      return "SPV_EXT_mesh_shader";
37    case Extension::kSPV_EXT_physical_storage_buffer:
38      return "SPV_EXT_physical_storage_buffer";
39    case Extension::kSPV_EXT_shader_atomic_float16_add:
40      return "SPV_EXT_shader_atomic_float16_add";
41    case Extension::kSPV_EXT_shader_atomic_float_add:
42      return "SPV_EXT_shader_atomic_float_add";
43    case Extension::kSPV_EXT_shader_atomic_float_min_max:
44      return "SPV_EXT_shader_atomic_float_min_max";
45    case Extension::kSPV_EXT_shader_image_int64:
46      return "SPV_EXT_shader_image_int64";
47    case Extension::kSPV_EXT_shader_stencil_export:
48      return "SPV_EXT_shader_stencil_export";
49    case Extension::kSPV_EXT_shader_viewport_index_layer:
50      return "SPV_EXT_shader_viewport_index_layer";
51    case Extension::kSPV_GOOGLE_decorate_string:
52      return "SPV_GOOGLE_decorate_string";
53    case Extension::kSPV_GOOGLE_hlsl_functionality1:
54      return "SPV_GOOGLE_hlsl_functionality1";
55    case Extension::kSPV_GOOGLE_user_type:
56      return "SPV_GOOGLE_user_type";
57    case Extension::kSPV_INTEL_arbitrary_precision_fixed_point:
58      return "SPV_INTEL_arbitrary_precision_fixed_point";
59    case Extension::kSPV_INTEL_arbitrary_precision_floating_point:
60      return "SPV_INTEL_arbitrary_precision_floating_point";
61    case Extension::kSPV_INTEL_arbitrary_precision_integers:
62      return "SPV_INTEL_arbitrary_precision_integers";
63    case Extension::kSPV_INTEL_blocking_pipes:
64      return "SPV_INTEL_blocking_pipes";
65    case Extension::kSPV_INTEL_debug_module:
66      return "SPV_INTEL_debug_module";
67    case Extension::kSPV_INTEL_device_side_avc_motion_estimation:
68      return "SPV_INTEL_device_side_avc_motion_estimation";
69    case Extension::kSPV_INTEL_float_controls2:
70      return "SPV_INTEL_float_controls2";
71    case Extension::kSPV_INTEL_fp_fast_math_mode:
72      return "SPV_INTEL_fp_fast_math_mode";
73    case Extension::kSPV_INTEL_fpga_buffer_location:
74      return "SPV_INTEL_fpga_buffer_location";
75    case Extension::kSPV_INTEL_fpga_cluster_attributes:
76      return "SPV_INTEL_fpga_cluster_attributes";
77    case Extension::kSPV_INTEL_fpga_loop_controls:
78      return "SPV_INTEL_fpga_loop_controls";
79    case Extension::kSPV_INTEL_fpga_memory_accesses:
80      return "SPV_INTEL_fpga_memory_accesses";
81    case Extension::kSPV_INTEL_fpga_memory_attributes:
82      return "SPV_INTEL_fpga_memory_attributes";
83    case Extension::kSPV_INTEL_fpga_reg:
84      return "SPV_INTEL_fpga_reg";
85    case Extension::kSPV_INTEL_function_pointers:
86      return "SPV_INTEL_function_pointers";
87    case Extension::kSPV_INTEL_inline_assembly:
88      return "SPV_INTEL_inline_assembly";
89    case Extension::kSPV_INTEL_io_pipes:
90      return "SPV_INTEL_io_pipes";
91    case Extension::kSPV_INTEL_kernel_attributes:
92      return "SPV_INTEL_kernel_attributes";
93    case Extension::kSPV_INTEL_long_constant_composite:
94      return "SPV_INTEL_long_constant_composite";
95    case Extension::kSPV_INTEL_loop_fuse:
96      return "SPV_INTEL_loop_fuse";
97    case Extension::kSPV_INTEL_media_block_io:
98      return "SPV_INTEL_media_block_io";
99    case Extension::kSPV_INTEL_memory_access_aliasing:
100      return "SPV_INTEL_memory_access_aliasing";
101    case Extension::kSPV_INTEL_optnone:
102      return "SPV_INTEL_optnone";
103    case Extension::kSPV_INTEL_shader_integer_functions2:
104      return "SPV_INTEL_shader_integer_functions2";
105    case Extension::kSPV_INTEL_split_barrier:
106      return "SPV_INTEL_split_barrier";
107    case Extension::kSPV_INTEL_subgroups:
108      return "SPV_INTEL_subgroups";
109    case Extension::kSPV_INTEL_unstructured_loop_controls:
110      return "SPV_INTEL_unstructured_loop_controls";
111    case Extension::kSPV_INTEL_usm_storage_classes:
112      return "SPV_INTEL_usm_storage_classes";
113    case Extension::kSPV_INTEL_variable_length_array:
114      return "SPV_INTEL_variable_length_array";
115    case Extension::kSPV_INTEL_vector_compute:
116      return "SPV_INTEL_vector_compute";
117    case Extension::kSPV_KHR_16bit_storage:
118      return "SPV_KHR_16bit_storage";
119    case Extension::kSPV_KHR_8bit_storage:
120      return "SPV_KHR_8bit_storage";
121    case Extension::kSPV_KHR_bit_instructions:
122      return "SPV_KHR_bit_instructions";
123    case Extension::kSPV_KHR_device_group:
124      return "SPV_KHR_device_group";
125    case Extension::kSPV_KHR_expect_assume:
126      return "SPV_KHR_expect_assume";
127    case Extension::kSPV_KHR_float_controls:
128      return "SPV_KHR_float_controls";
129    case Extension::kSPV_KHR_fragment_shader_barycentric:
130      return "SPV_KHR_fragment_shader_barycentric";
131    case Extension::kSPV_KHR_fragment_shading_rate:
132      return "SPV_KHR_fragment_shading_rate";
133    case Extension::kSPV_KHR_integer_dot_product:
134      return "SPV_KHR_integer_dot_product";
135    case Extension::kSPV_KHR_linkonce_odr:
136      return "SPV_KHR_linkonce_odr";
137    case Extension::kSPV_KHR_multiview:
138      return "SPV_KHR_multiview";
139    case Extension::kSPV_KHR_no_integer_wrap_decoration:
140      return "SPV_KHR_no_integer_wrap_decoration";
141    case Extension::kSPV_KHR_non_semantic_info:
142      return "SPV_KHR_non_semantic_info";
143    case Extension::kSPV_KHR_physical_storage_buffer:
144      return "SPV_KHR_physical_storage_buffer";
145    case Extension::kSPV_KHR_post_depth_coverage:
146      return "SPV_KHR_post_depth_coverage";
147    case Extension::kSPV_KHR_ray_cull_mask:
148      return "SPV_KHR_ray_cull_mask";
149    case Extension::kSPV_KHR_ray_query:
150      return "SPV_KHR_ray_query";
151    case Extension::kSPV_KHR_ray_tracing:
152      return "SPV_KHR_ray_tracing";
153    case Extension::kSPV_KHR_shader_atomic_counter_ops:
154      return "SPV_KHR_shader_atomic_counter_ops";
155    case Extension::kSPV_KHR_shader_ballot:
156      return "SPV_KHR_shader_ballot";
157    case Extension::kSPV_KHR_shader_clock:
158      return "SPV_KHR_shader_clock";
159    case Extension::kSPV_KHR_shader_draw_parameters:
160      return "SPV_KHR_shader_draw_parameters";
161    case Extension::kSPV_KHR_storage_buffer_storage_class:
162      return "SPV_KHR_storage_buffer_storage_class";
163    case Extension::kSPV_KHR_subgroup_rotate:
164      return "SPV_KHR_subgroup_rotate";
165    case Extension::kSPV_KHR_subgroup_uniform_control_flow:
166      return "SPV_KHR_subgroup_uniform_control_flow";
167    case Extension::kSPV_KHR_subgroup_vote:
168      return "SPV_KHR_subgroup_vote";
169    case Extension::kSPV_KHR_terminate_invocation:
170      return "SPV_KHR_terminate_invocation";
171    case Extension::kSPV_KHR_uniform_group_instructions:
172      return "SPV_KHR_uniform_group_instructions";
173    case Extension::kSPV_KHR_variable_pointers:
174      return "SPV_KHR_variable_pointers";
175    case Extension::kSPV_KHR_vulkan_memory_model:
176      return "SPV_KHR_vulkan_memory_model";
177    case Extension::kSPV_KHR_workgroup_memory_explicit_layout:
178      return "SPV_KHR_workgroup_memory_explicit_layout";
179    case Extension::kSPV_NVX_multiview_per_view_attributes:
180      return "SPV_NVX_multiview_per_view_attributes";
181    case Extension::kSPV_NV_bindless_texture:
182      return "SPV_NV_bindless_texture";
183    case Extension::kSPV_NV_compute_shader_derivatives:
184      return "SPV_NV_compute_shader_derivatives";
185    case Extension::kSPV_NV_cooperative_matrix:
186      return "SPV_NV_cooperative_matrix";
187    case Extension::kSPV_NV_fragment_shader_barycentric:
188      return "SPV_NV_fragment_shader_barycentric";
189    case Extension::kSPV_NV_geometry_shader_passthrough:
190      return "SPV_NV_geometry_shader_passthrough";
191    case Extension::kSPV_NV_mesh_shader:
192      return "SPV_NV_mesh_shader";
193    case Extension::kSPV_NV_ray_tracing:
194      return "SPV_NV_ray_tracing";
195    case Extension::kSPV_NV_ray_tracing_motion_blur:
196      return "SPV_NV_ray_tracing_motion_blur";
197    case Extension::kSPV_NV_sample_mask_override_coverage:
198      return "SPV_NV_sample_mask_override_coverage";
199    case Extension::kSPV_NV_shader_image_footprint:
200      return "SPV_NV_shader_image_footprint";
201    case Extension::kSPV_NV_shader_sm_builtins:
202      return "SPV_NV_shader_sm_builtins";
203    case Extension::kSPV_NV_shader_subgroup_partitioned:
204      return "SPV_NV_shader_subgroup_partitioned";
205    case Extension::kSPV_NV_shading_rate:
206      return "SPV_NV_shading_rate";
207    case Extension::kSPV_NV_stereo_view_rendering:
208      return "SPV_NV_stereo_view_rendering";
209    case Extension::kSPV_NV_viewport_array2:
210      return "SPV_NV_viewport_array2";
211    case Extension::kSPV_VALIDATOR_ignore_type_decl_unique:
212      return "SPV_VALIDATOR_ignore_type_decl_unique";
213  }
214
215  return "";
216}
217
218
219    bool GetExtensionFromString(const char* str, Extension* extension) {
220        static const char* known_ext_strs[] = { "SPV_AMD_gcn_shader", "SPV_AMD_gpu_shader_half_float", "SPV_AMD_gpu_shader_half_float_fetch", "SPV_AMD_gpu_shader_int16", "SPV_AMD_shader_ballot", "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_AMD_shader_explicit_vertex_parameter", "SPV_AMD_shader_fragment_mask", "SPV_AMD_shader_image_load_store_lod", "SPV_AMD_shader_trinary_minmax", "SPV_AMD_texture_gather_bias_lod", "SPV_EXT_demote_to_helper_invocation", "SPV_EXT_descriptor_indexing", "SPV_EXT_fragment_fully_covered", "SPV_EXT_fragment_invocation_density", "SPV_EXT_fragment_shader_interlock", "SPV_EXT_mesh_shader", "SPV_EXT_physical_storage_buffer", "SPV_EXT_shader_atomic_float16_add", "SPV_EXT_shader_atomic_float_add", "SPV_EXT_shader_atomic_float_min_max", "SPV_EXT_shader_image_int64", "SPV_EXT_shader_stencil_export", "SPV_EXT_shader_viewport_index_layer", "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1", "SPV_GOOGLE_user_type", "SPV_INTEL_arbitrary_precision_fixed_point", "SPV_INTEL_arbitrary_precision_floating_point", "SPV_INTEL_arbitrary_precision_integers", "SPV_INTEL_blocking_pipes", "SPV_INTEL_debug_module", "SPV_INTEL_device_side_avc_motion_estimation", "SPV_INTEL_float_controls2", "SPV_INTEL_fp_fast_math_mode", "SPV_INTEL_fpga_buffer_location", "SPV_INTEL_fpga_cluster_attributes", "SPV_INTEL_fpga_loop_controls", "SPV_INTEL_fpga_memory_accesses", "SPV_INTEL_fpga_memory_attributes", "SPV_INTEL_fpga_reg", "SPV_INTEL_function_pointers", "SPV_INTEL_inline_assembly", "SPV_INTEL_io_pipes", "SPV_INTEL_kernel_attributes", "SPV_INTEL_long_constant_composite", "SPV_INTEL_loop_fuse", "SPV_INTEL_media_block_io", "SPV_INTEL_memory_access_aliasing", "SPV_INTEL_optnone", "SPV_INTEL_shader_integer_functions2", "SPV_INTEL_split_barrier", "SPV_INTEL_subgroups", "SPV_INTEL_unstructured_loop_controls", "SPV_INTEL_usm_storage_classes", "SPV_INTEL_variable_length_array", "SPV_INTEL_vector_compute", "SPV_KHR_16bit_storage", "SPV_KHR_8bit_storage", "SPV_KHR_bit_instructions", "SPV_KHR_device_group", "SPV_KHR_expect_assume", "SPV_KHR_float_controls", "SPV_KHR_fragment_shader_barycentric", "SPV_KHR_fragment_shading_rate", "SPV_KHR_integer_dot_product", "SPV_KHR_linkonce_odr", "SPV_KHR_multiview", "SPV_KHR_no_integer_wrap_decoration", "SPV_KHR_non_semantic_info", "SPV_KHR_physical_storage_buffer", "SPV_KHR_post_depth_coverage", "SPV_KHR_ray_cull_mask", "SPV_KHR_ray_query", "SPV_KHR_ray_tracing", "SPV_KHR_shader_atomic_counter_ops", "SPV_KHR_shader_ballot", "SPV_KHR_shader_clock", "SPV_KHR_shader_draw_parameters", "SPV_KHR_storage_buffer_storage_class", "SPV_KHR_subgroup_rotate", "SPV_KHR_subgroup_uniform_control_flow", "SPV_KHR_subgroup_vote", "SPV_KHR_terminate_invocation", "SPV_KHR_uniform_group_instructions", "SPV_KHR_variable_pointers", "SPV_KHR_vulkan_memory_model", "SPV_KHR_workgroup_memory_explicit_layout", "SPV_NVX_multiview_per_view_attributes", "SPV_NV_bindless_texture", "SPV_NV_compute_shader_derivatives", "SPV_NV_cooperative_matrix", "SPV_NV_fragment_shader_barycentric", "SPV_NV_geometry_shader_passthrough", "SPV_NV_mesh_shader", "SPV_NV_ray_tracing", "SPV_NV_ray_tracing_motion_blur", "SPV_NV_sample_mask_override_coverage", "SPV_NV_shader_image_footprint", "SPV_NV_shader_sm_builtins", "SPV_NV_shader_subgroup_partitioned", "SPV_NV_shading_rate", "SPV_NV_stereo_view_rendering", "SPV_NV_viewport_array2", "SPV_VALIDATOR_ignore_type_decl_unique" };
221        static const Extension known_ext_ids[] = { Extension::kSPV_AMD_gcn_shader, Extension::kSPV_AMD_gpu_shader_half_float, Extension::kSPV_AMD_gpu_shader_half_float_fetch, Extension::kSPV_AMD_gpu_shader_int16, Extension::kSPV_AMD_shader_ballot, Extension::kSPV_AMD_shader_early_and_late_fragment_tests, Extension::kSPV_AMD_shader_explicit_vertex_parameter, Extension::kSPV_AMD_shader_fragment_mask, Extension::kSPV_AMD_shader_image_load_store_lod, Extension::kSPV_AMD_shader_trinary_minmax, Extension::kSPV_AMD_texture_gather_bias_lod, Extension::kSPV_EXT_demote_to_helper_invocation, Extension::kSPV_EXT_descriptor_indexing, Extension::kSPV_EXT_fragment_fully_covered, Extension::kSPV_EXT_fragment_invocation_density, Extension::kSPV_EXT_fragment_shader_interlock, Extension::kSPV_EXT_mesh_shader, Extension::kSPV_EXT_physical_storage_buffer, Extension::kSPV_EXT_shader_atomic_float16_add, Extension::kSPV_EXT_shader_atomic_float_add, Extension::kSPV_EXT_shader_atomic_float_min_max, Extension::kSPV_EXT_shader_image_int64, Extension::kSPV_EXT_shader_stencil_export, Extension::kSPV_EXT_shader_viewport_index_layer, Extension::kSPV_GOOGLE_decorate_string, Extension::kSPV_GOOGLE_hlsl_functionality1, Extension::kSPV_GOOGLE_user_type, Extension::kSPV_INTEL_arbitrary_precision_fixed_point, Extension::kSPV_INTEL_arbitrary_precision_floating_point, Extension::kSPV_INTEL_arbitrary_precision_integers, Extension::kSPV_INTEL_blocking_pipes, Extension::kSPV_INTEL_debug_module, Extension::kSPV_INTEL_device_side_avc_motion_estimation, Extension::kSPV_INTEL_float_controls2, Extension::kSPV_INTEL_fp_fast_math_mode, Extension::kSPV_INTEL_fpga_buffer_location, Extension::kSPV_INTEL_fpga_cluster_attributes, Extension::kSPV_INTEL_fpga_loop_controls, Extension::kSPV_INTEL_fpga_memory_accesses, Extension::kSPV_INTEL_fpga_memory_attributes, Extension::kSPV_INTEL_fpga_reg, Extension::kSPV_INTEL_function_pointers, Extension::kSPV_INTEL_inline_assembly, Extension::kSPV_INTEL_io_pipes, Extension::kSPV_INTEL_kernel_attributes, Extension::kSPV_INTEL_long_constant_composite, Extension::kSPV_INTEL_loop_fuse, Extension::kSPV_INTEL_media_block_io, Extension::kSPV_INTEL_memory_access_aliasing, Extension::kSPV_INTEL_optnone, Extension::kSPV_INTEL_shader_integer_functions2, Extension::kSPV_INTEL_split_barrier, Extension::kSPV_INTEL_subgroups, Extension::kSPV_INTEL_unstructured_loop_controls, Extension::kSPV_INTEL_usm_storage_classes, Extension::kSPV_INTEL_variable_length_array, Extension::kSPV_INTEL_vector_compute, Extension::kSPV_KHR_16bit_storage, Extension::kSPV_KHR_8bit_storage, Extension::kSPV_KHR_bit_instructions, Extension::kSPV_KHR_device_group, Extension::kSPV_KHR_expect_assume, Extension::kSPV_KHR_float_controls, Extension::kSPV_KHR_fragment_shader_barycentric, Extension::kSPV_KHR_fragment_shading_rate, Extension::kSPV_KHR_integer_dot_product, Extension::kSPV_KHR_linkonce_odr, Extension::kSPV_KHR_multiview, Extension::kSPV_KHR_no_integer_wrap_decoration, Extension::kSPV_KHR_non_semantic_info, Extension::kSPV_KHR_physical_storage_buffer, Extension::kSPV_KHR_post_depth_coverage, Extension::kSPV_KHR_ray_cull_mask, Extension::kSPV_KHR_ray_query, Extension::kSPV_KHR_ray_tracing, Extension::kSPV_KHR_shader_atomic_counter_ops, Extension::kSPV_KHR_shader_ballot, Extension::kSPV_KHR_shader_clock, Extension::kSPV_KHR_shader_draw_parameters, Extension::kSPV_KHR_storage_buffer_storage_class, Extension::kSPV_KHR_subgroup_rotate, Extension::kSPV_KHR_subgroup_uniform_control_flow, Extension::kSPV_KHR_subgroup_vote, Extension::kSPV_KHR_terminate_invocation, Extension::kSPV_KHR_uniform_group_instructions, Extension::kSPV_KHR_variable_pointers, Extension::kSPV_KHR_vulkan_memory_model, Extension::kSPV_KHR_workgroup_memory_explicit_layout, Extension::kSPV_NVX_multiview_per_view_attributes, Extension::kSPV_NV_bindless_texture, Extension::kSPV_NV_compute_shader_derivatives, Extension::kSPV_NV_cooperative_matrix, Extension::kSPV_NV_fragment_shader_barycentric, Extension::kSPV_NV_geometry_shader_passthrough, Extension::kSPV_NV_mesh_shader, Extension::kSPV_NV_ray_tracing, Extension::kSPV_NV_ray_tracing_motion_blur, Extension::kSPV_NV_sample_mask_override_coverage, Extension::kSPV_NV_shader_image_footprint, Extension::kSPV_NV_shader_sm_builtins, Extension::kSPV_NV_shader_subgroup_partitioned, Extension::kSPV_NV_shading_rate, Extension::kSPV_NV_stereo_view_rendering, Extension::kSPV_NV_viewport_array2, Extension::kSPV_VALIDATOR_ignore_type_decl_unique };
222        const auto b = std::begin(known_ext_strs);
223        const auto e = std::end(known_ext_strs);
224        const auto found = std::equal_range(
225            b, e, str, [](const char* str1, const char* str2) {
226                return std::strcmp(str1, str2) < 0;
227            });
228        if (found.first == e || found.first == found.second) return false;
229
230        *extension = known_ext_ids[found.first - b];
231        return true;
232    }
233
234
235const char* CapabilityToString(SpvCapability capability) {
236  switch (capability) {
237    case SpvCapabilityMatrix:
238      return "Matrix";
239    case SpvCapabilityShader:
240      return "Shader";
241    case SpvCapabilityGeometry:
242      return "Geometry";
243    case SpvCapabilityTessellation:
244      return "Tessellation";
245    case SpvCapabilityAddresses:
246      return "Addresses";
247    case SpvCapabilityLinkage:
248      return "Linkage";
249    case SpvCapabilityKernel:
250      return "Kernel";
251    case SpvCapabilityVector16:
252      return "Vector16";
253    case SpvCapabilityFloat16Buffer:
254      return "Float16Buffer";
255    case SpvCapabilityFloat16:
256      return "Float16";
257    case SpvCapabilityFloat64:
258      return "Float64";
259    case SpvCapabilityInt64:
260      return "Int64";
261    case SpvCapabilityInt64Atomics:
262      return "Int64Atomics";
263    case SpvCapabilityImageBasic:
264      return "ImageBasic";
265    case SpvCapabilityImageReadWrite:
266      return "ImageReadWrite";
267    case SpvCapabilityImageMipmap:
268      return "ImageMipmap";
269    case SpvCapabilityPipes:
270      return "Pipes";
271    case SpvCapabilityGroups:
272      return "Groups";
273    case SpvCapabilityDeviceEnqueue:
274      return "DeviceEnqueue";
275    case SpvCapabilityLiteralSampler:
276      return "LiteralSampler";
277    case SpvCapabilityAtomicStorage:
278      return "AtomicStorage";
279    case SpvCapabilityInt16:
280      return "Int16";
281    case SpvCapabilityTessellationPointSize:
282      return "TessellationPointSize";
283    case SpvCapabilityGeometryPointSize:
284      return "GeometryPointSize";
285    case SpvCapabilityImageGatherExtended:
286      return "ImageGatherExtended";
287    case SpvCapabilityStorageImageMultisample:
288      return "StorageImageMultisample";
289    case SpvCapabilityUniformBufferArrayDynamicIndexing:
290      return "UniformBufferArrayDynamicIndexing";
291    case SpvCapabilitySampledImageArrayDynamicIndexing:
292      return "SampledImageArrayDynamicIndexing";
293    case SpvCapabilityStorageBufferArrayDynamicIndexing:
294      return "StorageBufferArrayDynamicIndexing";
295    case SpvCapabilityStorageImageArrayDynamicIndexing:
296      return "StorageImageArrayDynamicIndexing";
297    case SpvCapabilityClipDistance:
298      return "ClipDistance";
299    case SpvCapabilityCullDistance:
300      return "CullDistance";
301    case SpvCapabilityImageCubeArray:
302      return "ImageCubeArray";
303    case SpvCapabilitySampleRateShading:
304      return "SampleRateShading";
305    case SpvCapabilityImageRect:
306      return "ImageRect";
307    case SpvCapabilitySampledRect:
308      return "SampledRect";
309    case SpvCapabilityGenericPointer:
310      return "GenericPointer";
311    case SpvCapabilityInt8:
312      return "Int8";
313    case SpvCapabilityInputAttachment:
314      return "InputAttachment";
315    case SpvCapabilitySparseResidency:
316      return "SparseResidency";
317    case SpvCapabilityMinLod:
318      return "MinLod";
319    case SpvCapabilitySampled1D:
320      return "Sampled1D";
321    case SpvCapabilityImage1D:
322      return "Image1D";
323    case SpvCapabilitySampledCubeArray:
324      return "SampledCubeArray";
325    case SpvCapabilitySampledBuffer:
326      return "SampledBuffer";
327    case SpvCapabilityImageBuffer:
328      return "ImageBuffer";
329    case SpvCapabilityImageMSArray:
330      return "ImageMSArray";
331    case SpvCapabilityStorageImageExtendedFormats:
332      return "StorageImageExtendedFormats";
333    case SpvCapabilityImageQuery:
334      return "ImageQuery";
335    case SpvCapabilityDerivativeControl:
336      return "DerivativeControl";
337    case SpvCapabilityInterpolationFunction:
338      return "InterpolationFunction";
339    case SpvCapabilityTransformFeedback:
340      return "TransformFeedback";
341    case SpvCapabilityGeometryStreams:
342      return "GeometryStreams";
343    case SpvCapabilityStorageImageReadWithoutFormat:
344      return "StorageImageReadWithoutFormat";
345    case SpvCapabilityStorageImageWriteWithoutFormat:
346      return "StorageImageWriteWithoutFormat";
347    case SpvCapabilityMultiViewport:
348      return "MultiViewport";
349    case SpvCapabilitySubgroupDispatch:
350      return "SubgroupDispatch";
351    case SpvCapabilityNamedBarrier:
352      return "NamedBarrier";
353    case SpvCapabilityPipeStorage:
354      return "PipeStorage";
355    case SpvCapabilityGroupNonUniform:
356      return "GroupNonUniform";
357    case SpvCapabilityGroupNonUniformVote:
358      return "GroupNonUniformVote";
359    case SpvCapabilityGroupNonUniformArithmetic:
360      return "GroupNonUniformArithmetic";
361    case SpvCapabilityGroupNonUniformBallot:
362      return "GroupNonUniformBallot";
363    case SpvCapabilityGroupNonUniformShuffle:
364      return "GroupNonUniformShuffle";
365    case SpvCapabilityGroupNonUniformShuffleRelative:
366      return "GroupNonUniformShuffleRelative";
367    case SpvCapabilityGroupNonUniformClustered:
368      return "GroupNonUniformClustered";
369    case SpvCapabilityGroupNonUniformQuad:
370      return "GroupNonUniformQuad";
371    case SpvCapabilityShaderLayer:
372      return "ShaderLayer";
373    case SpvCapabilityShaderViewportIndex:
374      return "ShaderViewportIndex";
375    case SpvCapabilityUniformDecoration:
376      return "UniformDecoration";
377    case SpvCapabilityFragmentShadingRateKHR:
378      return "FragmentShadingRateKHR";
379    case SpvCapabilitySubgroupBallotKHR:
380      return "SubgroupBallotKHR";
381    case SpvCapabilityDrawParameters:
382      return "DrawParameters";
383    case SpvCapabilityWorkgroupMemoryExplicitLayoutKHR:
384      return "WorkgroupMemoryExplicitLayoutKHR";
385    case SpvCapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR:
386      return "WorkgroupMemoryExplicitLayout8BitAccessKHR";
387    case SpvCapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR:
388      return "WorkgroupMemoryExplicitLayout16BitAccessKHR";
389    case SpvCapabilitySubgroupVoteKHR:
390      return "SubgroupVoteKHR";
391    case SpvCapabilityStorageBuffer16BitAccess:
392      return "StorageBuffer16BitAccess";
393    case SpvCapabilityUniformAndStorageBuffer16BitAccess:
394      return "UniformAndStorageBuffer16BitAccess";
395    case SpvCapabilityStoragePushConstant16:
396      return "StoragePushConstant16";
397    case SpvCapabilityStorageInputOutput16:
398      return "StorageInputOutput16";
399    case SpvCapabilityDeviceGroup:
400      return "DeviceGroup";
401    case SpvCapabilityMultiView:
402      return "MultiView";
403    case SpvCapabilityVariablePointersStorageBuffer:
404      return "VariablePointersStorageBuffer";
405    case SpvCapabilityVariablePointers:
406      return "VariablePointers";
407    case SpvCapabilityAtomicStorageOps:
408      return "AtomicStorageOps";
409    case SpvCapabilitySampleMaskPostDepthCoverage:
410      return "SampleMaskPostDepthCoverage";
411    case SpvCapabilityStorageBuffer8BitAccess:
412      return "StorageBuffer8BitAccess";
413    case SpvCapabilityUniformAndStorageBuffer8BitAccess:
414      return "UniformAndStorageBuffer8BitAccess";
415    case SpvCapabilityStoragePushConstant8:
416      return "StoragePushConstant8";
417    case SpvCapabilityDenormPreserve:
418      return "DenormPreserve";
419    case SpvCapabilityDenormFlushToZero:
420      return "DenormFlushToZero";
421    case SpvCapabilitySignedZeroInfNanPreserve:
422      return "SignedZeroInfNanPreserve";
423    case SpvCapabilityRoundingModeRTE:
424      return "RoundingModeRTE";
425    case SpvCapabilityRoundingModeRTZ:
426      return "RoundingModeRTZ";
427    case SpvCapabilityRayQueryProvisionalKHR:
428      return "RayQueryProvisionalKHR";
429    case SpvCapabilityRayQueryKHR:
430      return "RayQueryKHR";
431    case SpvCapabilityRayTraversalPrimitiveCullingKHR:
432      return "RayTraversalPrimitiveCullingKHR";
433    case SpvCapabilityRayTracingKHR:
434      return "RayTracingKHR";
435    case SpvCapabilityFloat16ImageAMD:
436      return "Float16ImageAMD";
437    case SpvCapabilityImageGatherBiasLodAMD:
438      return "ImageGatherBiasLodAMD";
439    case SpvCapabilityFragmentMaskAMD:
440      return "FragmentMaskAMD";
441    case SpvCapabilityStencilExportEXT:
442      return "StencilExportEXT";
443    case SpvCapabilityImageReadWriteLodAMD:
444      return "ImageReadWriteLodAMD";
445    case SpvCapabilityInt64ImageEXT:
446      return "Int64ImageEXT";
447    case SpvCapabilityShaderClockKHR:
448      return "ShaderClockKHR";
449    case SpvCapabilitySampleMaskOverrideCoverageNV:
450      return "SampleMaskOverrideCoverageNV";
451    case SpvCapabilityGeometryShaderPassthroughNV:
452      return "GeometryShaderPassthroughNV";
453    case SpvCapabilityShaderViewportIndexLayerEXT:
454      return "ShaderViewportIndexLayerEXT";
455    case SpvCapabilityShaderViewportMaskNV:
456      return "ShaderViewportMaskNV";
457    case SpvCapabilityShaderStereoViewNV:
458      return "ShaderStereoViewNV";
459    case SpvCapabilityPerViewAttributesNV:
460      return "PerViewAttributesNV";
461    case SpvCapabilityFragmentFullyCoveredEXT:
462      return "FragmentFullyCoveredEXT";
463    case SpvCapabilityMeshShadingNV:
464      return "MeshShadingNV";
465    case SpvCapabilityImageFootprintNV:
466      return "ImageFootprintNV";
467    case SpvCapabilityMeshShadingEXT:
468      return "MeshShadingEXT";
469    case SpvCapabilityFragmentBarycentricKHR:
470      return "FragmentBarycentricKHR";
471    case SpvCapabilityComputeDerivativeGroupQuadsNV:
472      return "ComputeDerivativeGroupQuadsNV";
473    case SpvCapabilityFragmentDensityEXT:
474      return "FragmentDensityEXT";
475    case SpvCapabilityGroupNonUniformPartitionedNV:
476      return "GroupNonUniformPartitionedNV";
477    case SpvCapabilityShaderNonUniform:
478      return "ShaderNonUniform";
479    case SpvCapabilityRuntimeDescriptorArray:
480      return "RuntimeDescriptorArray";
481    case SpvCapabilityInputAttachmentArrayDynamicIndexing:
482      return "InputAttachmentArrayDynamicIndexing";
483    case SpvCapabilityUniformTexelBufferArrayDynamicIndexing:
484      return "UniformTexelBufferArrayDynamicIndexing";
485    case SpvCapabilityStorageTexelBufferArrayDynamicIndexing:
486      return "StorageTexelBufferArrayDynamicIndexing";
487    case SpvCapabilityUniformBufferArrayNonUniformIndexing:
488      return "UniformBufferArrayNonUniformIndexing";
489    case SpvCapabilitySampledImageArrayNonUniformIndexing:
490      return "SampledImageArrayNonUniformIndexing";
491    case SpvCapabilityStorageBufferArrayNonUniformIndexing:
492      return "StorageBufferArrayNonUniformIndexing";
493    case SpvCapabilityStorageImageArrayNonUniformIndexing:
494      return "StorageImageArrayNonUniformIndexing";
495    case SpvCapabilityInputAttachmentArrayNonUniformIndexing:
496      return "InputAttachmentArrayNonUniformIndexing";
497    case SpvCapabilityUniformTexelBufferArrayNonUniformIndexing:
498      return "UniformTexelBufferArrayNonUniformIndexing";
499    case SpvCapabilityStorageTexelBufferArrayNonUniformIndexing:
500      return "StorageTexelBufferArrayNonUniformIndexing";
501    case SpvCapabilityRayTracingNV:
502      return "RayTracingNV";
503    case SpvCapabilityRayTracingMotionBlurNV:
504      return "RayTracingMotionBlurNV";
505    case SpvCapabilityVulkanMemoryModel:
506      return "VulkanMemoryModel";
507    case SpvCapabilityVulkanMemoryModelDeviceScope:
508      return "VulkanMemoryModelDeviceScope";
509    case SpvCapabilityPhysicalStorageBufferAddresses:
510      return "PhysicalStorageBufferAddresses";
511    case SpvCapabilityComputeDerivativeGroupLinearNV:
512      return "ComputeDerivativeGroupLinearNV";
513    case SpvCapabilityRayTracingProvisionalKHR:
514      return "RayTracingProvisionalKHR";
515    case SpvCapabilityCooperativeMatrixNV:
516      return "CooperativeMatrixNV";
517    case SpvCapabilityFragmentShaderSampleInterlockEXT:
518      return "FragmentShaderSampleInterlockEXT";
519    case SpvCapabilityFragmentShaderShadingRateInterlockEXT:
520      return "FragmentShaderShadingRateInterlockEXT";
521    case SpvCapabilityShaderSMBuiltinsNV:
522      return "ShaderSMBuiltinsNV";
523    case SpvCapabilityFragmentShaderPixelInterlockEXT:
524      return "FragmentShaderPixelInterlockEXT";
525    case SpvCapabilityDemoteToHelperInvocation:
526      return "DemoteToHelperInvocation";
527    case SpvCapabilityBindlessTextureNV:
528      return "BindlessTextureNV";
529    case SpvCapabilitySubgroupShuffleINTEL:
530      return "SubgroupShuffleINTEL";
531    case SpvCapabilitySubgroupBufferBlockIOINTEL:
532      return "SubgroupBufferBlockIOINTEL";
533    case SpvCapabilitySubgroupImageBlockIOINTEL:
534      return "SubgroupImageBlockIOINTEL";
535    case SpvCapabilitySubgroupImageMediaBlockIOINTEL:
536      return "SubgroupImageMediaBlockIOINTEL";
537    case SpvCapabilityRoundToInfinityINTEL:
538      return "RoundToInfinityINTEL";
539    case SpvCapabilityFloatingPointModeINTEL:
540      return "FloatingPointModeINTEL";
541    case SpvCapabilityIntegerFunctions2INTEL:
542      return "IntegerFunctions2INTEL";
543    case SpvCapabilityFunctionPointersINTEL:
544      return "FunctionPointersINTEL";
545    case SpvCapabilityIndirectReferencesINTEL:
546      return "IndirectReferencesINTEL";
547    case SpvCapabilityAsmINTEL:
548      return "AsmINTEL";
549    case SpvCapabilityAtomicFloat32MinMaxEXT:
550      return "AtomicFloat32MinMaxEXT";
551    case SpvCapabilityAtomicFloat64MinMaxEXT:
552      return "AtomicFloat64MinMaxEXT";
553    case SpvCapabilityAtomicFloat16MinMaxEXT:
554      return "AtomicFloat16MinMaxEXT";
555    case SpvCapabilityVectorComputeINTEL:
556      return "VectorComputeINTEL";
557    case SpvCapabilityVectorAnyINTEL:
558      return "VectorAnyINTEL";
559    case SpvCapabilityExpectAssumeKHR:
560      return "ExpectAssumeKHR";
561    case SpvCapabilitySubgroupAvcMotionEstimationINTEL:
562      return "SubgroupAvcMotionEstimationINTEL";
563    case SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL:
564      return "SubgroupAvcMotionEstimationIntraINTEL";
565    case SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL:
566      return "SubgroupAvcMotionEstimationChromaINTEL";
567    case SpvCapabilityVariableLengthArrayINTEL:
568      return "VariableLengthArrayINTEL";
569    case SpvCapabilityFunctionFloatControlINTEL:
570      return "FunctionFloatControlINTEL";
571    case SpvCapabilityFPGAMemoryAttributesINTEL:
572      return "FPGAMemoryAttributesINTEL";
573    case SpvCapabilityFPFastMathModeINTEL:
574      return "FPFastMathModeINTEL";
575    case SpvCapabilityArbitraryPrecisionIntegersINTEL:
576      return "ArbitraryPrecisionIntegersINTEL";
577    case SpvCapabilityArbitraryPrecisionFloatingPointINTEL:
578      return "ArbitraryPrecisionFloatingPointINTEL";
579    case SpvCapabilityUnstructuredLoopControlsINTEL:
580      return "UnstructuredLoopControlsINTEL";
581    case SpvCapabilityFPGALoopControlsINTEL:
582      return "FPGALoopControlsINTEL";
583    case SpvCapabilityKernelAttributesINTEL:
584      return "KernelAttributesINTEL";
585    case SpvCapabilityFPGAKernelAttributesINTEL:
586      return "FPGAKernelAttributesINTEL";
587    case SpvCapabilityFPGAMemoryAccessesINTEL:
588      return "FPGAMemoryAccessesINTEL";
589    case SpvCapabilityFPGAClusterAttributesINTEL:
590      return "FPGAClusterAttributesINTEL";
591    case SpvCapabilityLoopFuseINTEL:
592      return "LoopFuseINTEL";
593    case SpvCapabilityMemoryAccessAliasingINTEL:
594      return "MemoryAccessAliasingINTEL";
595    case SpvCapabilityFPGABufferLocationINTEL:
596      return "FPGABufferLocationINTEL";
597    case SpvCapabilityArbitraryPrecisionFixedPointINTEL:
598      return "ArbitraryPrecisionFixedPointINTEL";
599    case SpvCapabilityUSMStorageClassesINTEL:
600      return "USMStorageClassesINTEL";
601    case SpvCapabilityIOPipesINTEL:
602      return "IOPipesINTEL";
603    case SpvCapabilityBlockingPipesINTEL:
604      return "BlockingPipesINTEL";
605    case SpvCapabilityFPGARegINTEL:
606      return "FPGARegINTEL";
607    case SpvCapabilityDotProductInputAll:
608      return "DotProductInputAll";
609    case SpvCapabilityDotProductInput4x8Bit:
610      return "DotProductInput4x8Bit";
611    case SpvCapabilityDotProductInput4x8BitPacked:
612      return "DotProductInput4x8BitPacked";
613    case SpvCapabilityDotProduct:
614      return "DotProduct";
615    case SpvCapabilityRayCullMaskKHR:
616      return "RayCullMaskKHR";
617    case SpvCapabilityBitInstructions:
618      return "BitInstructions";
619    case SpvCapabilityGroupNonUniformRotateKHR:
620      return "GroupNonUniformRotateKHR";
621    case SpvCapabilityAtomicFloat32AddEXT:
622      return "AtomicFloat32AddEXT";
623    case SpvCapabilityAtomicFloat64AddEXT:
624      return "AtomicFloat64AddEXT";
625    case SpvCapabilityLongConstantCompositeINTEL:
626      return "LongConstantCompositeINTEL";
627    case SpvCapabilityOptNoneINTEL:
628      return "OptNoneINTEL";
629    case SpvCapabilityAtomicFloat16AddEXT:
630      return "AtomicFloat16AddEXT";
631    case SpvCapabilityDebugInfoModuleINTEL:
632      return "DebugInfoModuleINTEL";
633    case SpvCapabilitySplitBarrierINTEL:
634      return "SplitBarrierINTEL";
635    case SpvCapabilityGroupUniformArithmeticKHR:
636      return "GroupUniformArithmeticKHR";
637    case SpvCapabilityMax:
638      assert(0 && "Attempting to convert SpvCapabilityMax to string");
639      return "";
640  }
641
642  return "";
643}