1//===- SPIRVBase.td - MLIR SPIR-V Op Definitions Base file -*- tablegen -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This is the base file for SPIR-V operation definition specification. 10// This file defines the SPIR-V dialect, common SPIR-V types, and utilities 11// for facilitating defining SPIR-V ops. 12// 13//===----------------------------------------------------------------------===// 14 15#ifndef SPIRV_BASE 16#define SPIRV_BASE 17 18include "mlir/IR/OpBase.td" 19include "mlir/Dialect/SPIRV/SPIRVAvailability.td" 20 21//===----------------------------------------------------------------------===// 22// SPIR-V dialect definitions 23//===----------------------------------------------------------------------===// 24 25def SPIRV_Dialect : Dialect { 26 let name = "spv"; 27 28 let summary = "The SPIR-V dialect in MLIR."; 29 30 let description = [{ 31 SPIR-V is a binary intermediate language for representing graphical-shader 32 stages and compute kernels for multiple Khronos APIs, including OpenCL, 33 OpenGL, and Vulkan. 34 See https://www.khronos.org/registry/spir-v for more details regarding 35 SPIR-V itself. 36 37 The SPIR-V dialect aims to be a proper compiler intermediate representation 38 to facilitate transformations. Ops in this dialect stay at the same semantic 39 level as the SPIR-V specification and try to have one-to-one mapping to the 40 corresponding SPIR-V instructions; but they may deviate representationally 41 to utilize MLIR mechanisms if it results in better representation and thus 42 benefits transformations. The dialect also aims to maintain straightforward 43 serialization into and deserialization from the SPIR-V binary format. 44 See https://mlir.llvm.org/docs/Dialects/SPIR-V/ for more details regarding 45 high-level designs and implementation structures of the SPIR-V dialect. 46 }]; 47 48 let cppNamespace = "::mlir::spirv"; 49 let hasConstantMaterializer = 1; 50 let hasOperationAttrVerify = 1; 51 let hasRegionArgAttrVerify = 1; 52 let hasRegionResultAttrVerify = 1; 53 54 let extraClassDeclaration = [{ 55 //===------------------------------------------------------------------===// 56 // Attribute 57 //===------------------------------------------------------------------===// 58 59 /// Returns the attribute name to use when specifying decorations on results 60 /// of operations. 61 static std::string getAttributeName(Decoration decoration); 62 }]; 63} 64 65//===----------------------------------------------------------------------===// 66// Utility definitions 67//===----------------------------------------------------------------------===// 68 69// A predicate that checks whether `$_self` is a known enum case for the 70// enum class with `name`. 71class SPV_IsKnownEnumCaseFor<string name> : 72 CPred<"::mlir::spirv::symbolize" # name # "(" 73 "$_self.cast<IntegerAttr>().getValue().getZExtValue()).hasValue()">; 74 75// Wrapper over base BitEnumAttr to set common fields. 76class SPV_BitEnumAttr<string name, string description, 77 list<BitEnumAttrCase> cases> : 78 BitEnumAttr<name, description, cases> { 79 let predicate = And<[ 80 I32Attr.predicate, 81 SPV_IsKnownEnumCaseFor<name>, 82 ]>; 83 let cppNamespace = "::mlir::spirv"; 84} 85 86// Wrapper over base I32EnumAttr to set common fields. 87class SPV_I32EnumAttr<string name, string description, 88 list<I32EnumAttrCase> cases> : 89 I32EnumAttr<name, description, cases> { 90 let predicate = And<[ 91 I32Attr.predicate, 92 SPV_IsKnownEnumCaseFor<name>, 93 ]>; 94 let cppNamespace = "::mlir::spirv"; 95} 96 97// Wrapper over base StrEnumAttr to set common fields. 98class SPV_StrEnumAttr<string name, string description, 99 list<StrEnumAttrCase> cases> : 100 StrEnumAttr<name, description, cases> { 101 let predicate = And<[ 102 StrAttr.predicate, 103 CPred<"::mlir::spirv::symbolize" # name # "(" 104 "$_self.cast<StringAttr>().getValue()).hasValue()">, 105 ]>; 106 let cppNamespace = "::mlir::spirv"; 107} 108 109//===----------------------------------------------------------------------===// 110// SPIR-V availability definitions 111//===----------------------------------------------------------------------===// 112 113def SPV_V_1_0 : I32EnumAttrCase<"V_1_0", 0, "v1.0">; 114def SPV_V_1_1 : I32EnumAttrCase<"V_1_1", 1, "v1.1">; 115def SPV_V_1_2 : I32EnumAttrCase<"V_1_2", 2, "v1.2">; 116def SPV_V_1_3 : I32EnumAttrCase<"V_1_3", 3, "v1.3">; 117def SPV_V_1_4 : I32EnumAttrCase<"V_1_4", 4, "v1.4">; 118def SPV_V_1_5 : I32EnumAttrCase<"V_1_5", 5, "v1.5">; 119 120def SPV_VersionAttr : SPV_I32EnumAttr<"Version", "valid SPIR-V version", [ 121 SPV_V_1_0, SPV_V_1_1, SPV_V_1_2, SPV_V_1_3, SPV_V_1_4, SPV_V_1_5]>; 122 123class MinVersion<I32EnumAttrCase min> : MinVersionBase< 124 "QueryMinVersionInterface", SPV_VersionAttr, min> { 125 let interfaceDescription = [{ 126 Querying interface for minimal required SPIR-V version. 127 128 This interface provides a `getMinVersion()` method to query the minimal 129 required version for the implementing SPIR-V operation. The returned value 130 is a `mlir::spirv::Version` enumerant. 131 }]; 132} 133 134class MaxVersion<I32EnumAttrCase max> : MaxVersionBase< 135 "QueryMaxVersionInterface", SPV_VersionAttr, max> { 136 let interfaceDescription = [{ 137 Querying interface for maximal supported SPIR-V version. 138 139 This interface provides a `getMaxVersion()` method to query the maximal 140 supported version for the implementing SPIR-V operation. The returned value 141 is a `mlir::spirv::Version` enumerant. 142 }]; 143} 144 145class Extension<list<StrEnumAttrCase> extensions> : Availability { 146 let interfaceName = "QueryExtensionInterface"; 147 let interfaceDescription = [{ 148 Querying interface for required SPIR-V extensions. 149 150 This interface provides a `getExtensions()` method to query the required 151 extensions for the implementing SPIR-V operation. The returned value 152 is a nested vector whose element is `mlir::spirv::Extension`s. The outer 153 vector's elements (which are vectors) should be interpreted as conjunction 154 while the inner vector's elements (which are `mlir::spirv::Extension`s) 155 should be interpreted as disjunction. For example, given 156 157 ``` 158 {{Extension::A, Extension::B}, {Extension::C}, {{Extension::D, Extension::E}} 159 ``` 160 161 The operation instance is available when (`Extension::A` OR `Extension::B`) 162 AND (`Extension::C`) AND (`Extension::D` OR `Extension::E`) is enabled. 163 }]; 164 165 // TODO: Returning SmallVector<ArrayRef<...>> is not recommended. 166 // Find a better way for this. 167 let queryFnRetType = "::llvm::SmallVector<::llvm::ArrayRef<" 168 "::mlir::spirv::Extension>, 1>"; 169 let queryFnName = "getExtensions"; 170 171 let mergeAction = !if( 172 !empty(extensions), "", "$overall.emplace_back($instance)"); 173 let initializer = "{}"; 174 let instanceType = "::llvm::ArrayRef<::mlir::spirv::Extension>"; 175 176 // Pack all extensions as a static array and get its reference. 177 let instancePreparation = !if(!empty(extensions), "", 178 "static const ::mlir::spirv::Extension exts[] = {" # 179 StrJoin<!foreach(ext, extensions, 180 "::mlir::spirv::Extension::" # ext.symbol)>.result # 181 "}; " # 182 // The following manual ArrayRef constructor call is to satisfy GCC 5. 183 "ArrayRef<::mlir::spirv::Extension> " # 184 "ref(exts, ::llvm::array_lengthof(exts));"); 185 let instance = "ref"; 186} 187 188class Capability<list<I32EnumAttrCase> capabilities> : Availability { 189 let interfaceName = "QueryCapabilityInterface"; 190 let interfaceDescription = [{ 191 Querying interface for required SPIR-V capabilities. 192 193 This interface provides a `getCapabilities()` method to query the required 194 capabilities for the implementing SPIR-V operation. The returned value 195 is a nested vector whose element is `mlir::spirv::Capability`s. The outer 196 vector's elements (which are vectors) should be interpreted as conjunction 197 while the inner vector's elements (which are `mlir::spirv::Capability`s) 198 should be interpreted as disjunction. For example, given 199 200 ``` 201 {{Capability::A, Capability::B}, {Capability::C}, {{Capability::D, Capability::E}} 202 ``` 203 204 The operation instance is available when (`Capability::A` OR `Capability::B`) 205 AND (`Capability::C`) AND (`Capability::D` OR `Capability::E`) is enabled. 206 }]; 207 208 let queryFnRetType = "::llvm::SmallVector<::llvm::ArrayRef<" 209 "::mlir::spirv::Capability>, 1>"; 210 let queryFnName = "getCapabilities"; 211 212 let mergeAction = !if( 213 !empty(capabilities), "", "$overall.emplace_back($instance)"); 214 let initializer = "{}"; 215 let instanceType = "::llvm::ArrayRef<::mlir::spirv::Capability>"; 216 217 // Pack all capabilities as a static array and get its reference. 218 let instancePreparation = !if(!empty(capabilities), "", 219 "static const ::mlir::spirv::Capability caps[] = {" # 220 StrJoin<!foreach(cap, capabilities, 221 "::mlir::spirv::Capability::" # cap.symbol)>.result # 222 "}; " # 223 // The following manual ArrayRef constructor call is to satisfy GCC 5. 224 "ArrayRef<::mlir::spirv::Capability> " # 225 "ref(caps, ::llvm::array_lengthof(caps));"); 226 let instance = "ref"; 227} 228 229class SPIRVOpInterface<string name> : OpInterface<name> { 230 let cppNamespace = "::mlir::spirv"; 231} 232// TODO: the following interfaces definitions are duplicating with the above. 233// Remove them once we are able to support dialect-specific contents in ODS. 234def QueryMinVersionInterface : SPIRVOpInterface<"QueryMinVersionInterface"> { 235 let methods = [InterfaceMethod<"", "::mlir::spirv::Version", "getMinVersion">]; 236} 237def QueryMaxVersionInterface : SPIRVOpInterface<"QueryMaxVersionInterface"> { 238 let methods = [InterfaceMethod<"", "::mlir::spirv::Version", "getMaxVersion">]; 239} 240def QueryExtensionInterface : SPIRVOpInterface<"QueryExtensionInterface"> { 241 let methods = [InterfaceMethod< 242 "", 243 "::llvm::SmallVector<::llvm::ArrayRef<::mlir::spirv::Extension>, 1>", 244 "getExtensions">]; 245} 246def QueryCapabilityInterface : SPIRVOpInterface<"QueryCapabilityInterface"> { 247 let methods = [InterfaceMethod< 248 "", 249 "::llvm::SmallVector<::llvm::ArrayRef<::mlir::spirv::Capability>, 1>", 250 "getCapabilities">]; 251} 252 253//===----------------------------------------------------------------------===// 254// SPIR-V target GPU vendor and device definitions 255//===----------------------------------------------------------------------===// 256 257def SPV_DT_CPU : StrEnumAttrCase<"CPU">; 258def SPV_DT_DiscreteGPU : StrEnumAttrCase<"DiscreteGPU">; 259def SPV_DT_IntegratedGPU : StrEnumAttrCase<"IntegratedGPU">; 260// An accelerator other than GPU or CPU 261def SPV_DT_Other : StrEnumAttrCase<"Other">; 262// Information missing. 263def SPV_DT_Unknown : StrEnumAttrCase<"Unknown">; 264 265def SPV_DeviceTypeAttr : SPV_StrEnumAttr< 266 "DeviceType", "valid SPIR-V device types", [ 267 SPV_DT_Other, SPV_DT_IntegratedGPU, SPV_DT_DiscreteGPU, 268 SPV_DT_CPU, SPV_DT_Unknown 269 ]>; 270 271def SPV_V_AMD : StrEnumAttrCase<"AMD">; 272def SPV_V_ARM : StrEnumAttrCase<"ARM">; 273def SPV_V_Imagination : StrEnumAttrCase<"Imagination">; 274def SPV_V_Intel : StrEnumAttrCase<"Intel">; 275def SPV_V_NVIDIA : StrEnumAttrCase<"NVIDIA">; 276def SPV_V_Qualcomm : StrEnumAttrCase<"Qualcomm">; 277def SPV_V_SwiftShader : StrEnumAttrCase<"SwiftShader">; 278def SPV_V_Unknown : StrEnumAttrCase<"Unknown">; 279 280def SPV_VendorAttr : SPV_StrEnumAttr< 281 "Vendor", "recognized SPIR-V vendor strings", [ 282 SPV_V_AMD, SPV_V_ARM, SPV_V_Imagination, SPV_V_Intel, 283 SPV_V_NVIDIA, SPV_V_Qualcomm, SPV_V_SwiftShader, 284 SPV_V_Unknown 285 ]>; 286 287//===----------------------------------------------------------------------===// 288// SPIR-V extension definitions 289//===----------------------------------------------------------------------===// 290 291// Extensions known to the SPIR-V dialect. 292// https://github.com/KhronosGroup/SPIRV-Registry has the full list. 293def SPV_KHR_16bit_storage : StrEnumAttrCase<"SPV_KHR_16bit_storage">; 294def SPV_KHR_8bit_storage : StrEnumAttrCase<"SPV_KHR_8bit_storage">; 295def SPV_KHR_device_group : StrEnumAttrCase<"SPV_KHR_device_group">; 296def SPV_KHR_float_controls : StrEnumAttrCase<"SPV_KHR_float_controls">; 297def SPV_KHR_physical_storage_buffer : StrEnumAttrCase<"SPV_KHR_physical_storage_buffer">; 298def SPV_KHR_multiview : StrEnumAttrCase<"SPV_KHR_multiview">; 299def SPV_KHR_no_integer_wrap_decoration : StrEnumAttrCase<"SPV_KHR_no_integer_wrap_decoration">; 300def SPV_KHR_post_depth_coverage : StrEnumAttrCase<"SPV_KHR_post_depth_coverage">; 301def SPV_KHR_shader_atomic_counter_ops : StrEnumAttrCase<"SPV_KHR_shader_atomic_counter_ops">; 302def SPV_KHR_shader_ballot : StrEnumAttrCase<"SPV_KHR_shader_ballot">; 303def SPV_KHR_shader_clock : StrEnumAttrCase<"SPV_KHR_shader_clock">; 304def SPV_KHR_shader_draw_parameters : StrEnumAttrCase<"SPV_KHR_shader_draw_parameters">; 305def SPV_KHR_storage_buffer_storage_class : StrEnumAttrCase<"SPV_KHR_storage_buffer_storage_class">; 306def SPV_KHR_subgroup_vote : StrEnumAttrCase<"SPV_KHR_subgroup_vote">; 307def SPV_KHR_variable_pointers : StrEnumAttrCase<"SPV_KHR_variable_pointers">; 308def SPV_KHR_vulkan_memory_model : StrEnumAttrCase<"SPV_KHR_vulkan_memory_model">; 309 310def SPV_EXT_demote_to_helper_invocation : StrEnumAttrCase<"SPV_EXT_demote_to_helper_invocation">; 311def SPV_EXT_descriptor_indexing : StrEnumAttrCase<"SPV_EXT_descriptor_indexing">; 312def SPV_EXT_fragment_fully_covered : StrEnumAttrCase<"SPV_EXT_fragment_fully_covered">; 313def SPV_EXT_fragment_invocation_density : StrEnumAttrCase<"SPV_EXT_fragment_invocation_density">; 314def SPV_EXT_fragment_shader_interlock : StrEnumAttrCase<"SPV_EXT_fragment_shader_interlock">; 315def SPV_EXT_physical_storage_buffer : StrEnumAttrCase<"SPV_EXT_physical_storage_buffer">; 316def SPV_EXT_shader_stencil_export : StrEnumAttrCase<"SPV_EXT_shader_stencil_export">; 317def SPV_EXT_shader_viewport_index_layer : StrEnumAttrCase<"SPV_EXT_shader_viewport_index_layer">; 318 319def SPV_AMD_gpu_shader_half_float_fetch : StrEnumAttrCase<"SPV_AMD_gpu_shader_half_float_fetch">; 320def SPV_AMD_shader_ballot : StrEnumAttrCase<"SPV_AMD_shader_ballot">; 321def SPV_AMD_shader_explicit_vertex_parameter : StrEnumAttrCase<"SPV_AMD_shader_explicit_vertex_parameter">; 322def SPV_AMD_shader_fragment_mask : StrEnumAttrCase<"SPV_AMD_shader_fragment_mask">; 323def SPV_AMD_shader_image_load_store_lod : StrEnumAttrCase<"SPV_AMD_shader_image_load_store_lod">; 324def SPV_AMD_texture_gather_bias_lod : StrEnumAttrCase<"SPV_AMD_texture_gather_bias_lod">; 325 326def SPV_GOOGLE_decorate_string : StrEnumAttrCase<"SPV_GOOGLE_decorate_string">; 327def SPV_GOOGLE_hlsl_functionality1 : StrEnumAttrCase<"SPV_GOOGLE_hlsl_functionality1">; 328def SPV_GOOGLE_user_type : StrEnumAttrCase<"SPV_GOOGLE_user_type">; 329 330def SPV_INTEL_device_side_avc_motion_estimation : StrEnumAttrCase<"SPV_INTEL_device_side_avc_motion_estimation">; 331def SPV_INTEL_media_block_io : StrEnumAttrCase<"SPV_INTEL_media_block_io">; 332def SPV_INTEL_shader_integer_functions2 : StrEnumAttrCase<"SPV_INTEL_shader_integer_functions2">; 333def SPV_INTEL_subgroups : StrEnumAttrCase<"SPV_INTEL_subgroups">; 334 335def SPV_NV_compute_shader_derivatives : StrEnumAttrCase<"SPV_NV_compute_shader_derivatives">; 336def SPV_NV_cooperative_matrix : StrEnumAttrCase<"SPV_NV_cooperative_matrix">; 337def SPV_NV_fragment_shader_barycentric : StrEnumAttrCase<"SPV_NV_fragment_shader_barycentric">; 338def SPV_NV_geometry_shader_passthrough : StrEnumAttrCase<"SPV_NV_geometry_shader_passthrough">; 339def SPV_NV_mesh_shader : StrEnumAttrCase<"SPV_NV_mesh_shader">; 340def SPV_NV_ray_tracing : StrEnumAttrCase<"SPV_NV_ray_tracing">; 341def SPV_NV_sample_mask_override_coverage : StrEnumAttrCase<"SPV_NV_sample_mask_override_coverage">; 342def SPV_NV_shader_image_footprint : StrEnumAttrCase<"SPV_NV_shader_image_footprint">; 343def SPV_NV_shader_sm_builtins : StrEnumAttrCase<"SPV_NV_shader_sm_builtins">; 344def SPV_NV_shader_subgroup_partitioned : StrEnumAttrCase<"SPV_NV_shader_subgroup_partitioned">; 345def SPV_NV_shading_rate : StrEnumAttrCase<"SPV_NV_shading_rate">; 346def SPV_NV_stereo_view_rendering : StrEnumAttrCase<"SPV_NV_stereo_view_rendering">; 347def SPV_NV_viewport_array2 : StrEnumAttrCase<"SPV_NV_viewport_array2">; 348 349def SPV_NVX_multiview_per_view_attributes : StrEnumAttrCase<"SPV_NVX_multiview_per_view_attributes">; 350 351def SPV_ExtensionAttr : 352 SPV_StrEnumAttr<"Extension", "supported SPIR-V extensions", [ 353 SPV_KHR_16bit_storage, SPV_KHR_8bit_storage, SPV_KHR_device_group, 354 SPV_KHR_float_controls, SPV_KHR_physical_storage_buffer, SPV_KHR_multiview, 355 SPV_KHR_no_integer_wrap_decoration, SPV_KHR_post_depth_coverage, 356 SPV_KHR_shader_atomic_counter_ops, SPV_KHR_shader_ballot, 357 SPV_KHR_shader_clock, SPV_KHR_shader_draw_parameters, 358 SPV_KHR_storage_buffer_storage_class, SPV_KHR_subgroup_vote, 359 SPV_KHR_variable_pointers, SPV_KHR_vulkan_memory_model, 360 SPV_EXT_demote_to_helper_invocation, SPV_EXT_descriptor_indexing, 361 SPV_EXT_fragment_fully_covered, SPV_EXT_fragment_invocation_density, 362 SPV_EXT_fragment_shader_interlock, SPV_EXT_physical_storage_buffer, 363 SPV_EXT_shader_stencil_export, SPV_EXT_shader_viewport_index_layer, 364 SPV_AMD_gpu_shader_half_float_fetch, SPV_AMD_shader_ballot, 365 SPV_AMD_shader_explicit_vertex_parameter, SPV_AMD_shader_fragment_mask, 366 SPV_AMD_shader_image_load_store_lod, SPV_AMD_texture_gather_bias_lod, 367 SPV_GOOGLE_decorate_string, SPV_GOOGLE_hlsl_functionality1, SPV_GOOGLE_user_type, 368 SPV_INTEL_device_side_avc_motion_estimation, SPV_INTEL_media_block_io, 369 SPV_INTEL_shader_integer_functions2, SPV_INTEL_subgroups, 370 SPV_NV_compute_shader_derivatives, SPV_NV_cooperative_matrix, 371 SPV_NV_fragment_shader_barycentric, SPV_NV_geometry_shader_passthrough, 372 SPV_NV_mesh_shader, SPV_NV_ray_tracing, SPV_NV_sample_mask_override_coverage, 373 SPV_NV_shader_image_footprint, SPV_NV_shader_sm_builtins, 374 SPV_NV_shader_subgroup_partitioned, SPV_NV_shading_rate, 375 SPV_NV_stereo_view_rendering, SPV_NV_viewport_array2, 376 SPV_NVX_multiview_per_view_attributes 377 ]>; 378 379//===----------------------------------------------------------------------===// 380// SPIR-V enum definitions 381//===----------------------------------------------------------------------===// 382 383// Begin enum section. Generated from SPIR-V spec; DO NOT MODIFY! 384 385def SPV_C_Matrix : I32EnumAttrCase<"Matrix", 0>; 386def SPV_C_Addresses : I32EnumAttrCase<"Addresses", 4>; 387def SPV_C_Linkage : I32EnumAttrCase<"Linkage", 5>; 388def SPV_C_Kernel : I32EnumAttrCase<"Kernel", 6>; 389def SPV_C_Float16 : I32EnumAttrCase<"Float16", 9>; 390def SPV_C_Float64 : I32EnumAttrCase<"Float64", 10>; 391def SPV_C_Int64 : I32EnumAttrCase<"Int64", 11>; 392def SPV_C_Groups : I32EnumAttrCase<"Groups", 18> { 393 list<Availability> availability = [ 394 Extension<[SPV_AMD_shader_ballot]> 395 ]; 396} 397def SPV_C_Int16 : I32EnumAttrCase<"Int16", 22>; 398def SPV_C_Int8 : I32EnumAttrCase<"Int8", 39>; 399def SPV_C_Sampled1D : I32EnumAttrCase<"Sampled1D", 43>; 400def SPV_C_SampledBuffer : I32EnumAttrCase<"SampledBuffer", 46>; 401def SPV_C_GroupNonUniform : I32EnumAttrCase<"GroupNonUniform", 61> { 402 list<Availability> availability = [ 403 MinVersion<SPV_V_1_3> 404 ]; 405} 406def SPV_C_ShaderLayer : I32EnumAttrCase<"ShaderLayer", 69> { 407 list<Availability> availability = [ 408 MinVersion<SPV_V_1_5> 409 ]; 410} 411def SPV_C_ShaderViewportIndex : I32EnumAttrCase<"ShaderViewportIndex", 70> { 412 list<Availability> availability = [ 413 MinVersion<SPV_V_1_5> 414 ]; 415} 416def SPV_C_SubgroupBallotKHR : I32EnumAttrCase<"SubgroupBallotKHR", 4423> { 417 list<Availability> availability = [ 418 Extension<[SPV_KHR_shader_ballot]> 419 ]; 420} 421def SPV_C_SubgroupVoteKHR : I32EnumAttrCase<"SubgroupVoteKHR", 4431> { 422 list<Availability> availability = [ 423 Extension<[SPV_KHR_subgroup_vote]> 424 ]; 425} 426def SPV_C_StorageBuffer16BitAccess : I32EnumAttrCase<"StorageBuffer16BitAccess", 4433> { 427 list<Availability> availability = [ 428 Extension<[SPV_KHR_16bit_storage]> 429 ]; 430} 431def SPV_C_StoragePushConstant16 : I32EnumAttrCase<"StoragePushConstant16", 4435> { 432 list<Availability> availability = [ 433 Extension<[SPV_KHR_16bit_storage]> 434 ]; 435} 436def SPV_C_StorageInputOutput16 : I32EnumAttrCase<"StorageInputOutput16", 4436> { 437 list<Availability> availability = [ 438 Extension<[SPV_KHR_16bit_storage]> 439 ]; 440} 441def SPV_C_DeviceGroup : I32EnumAttrCase<"DeviceGroup", 4437> { 442 list<Availability> availability = [ 443 Extension<[SPV_KHR_device_group]> 444 ]; 445} 446def SPV_C_AtomicStorageOps : I32EnumAttrCase<"AtomicStorageOps", 4445> { 447 list<Availability> availability = [ 448 Extension<[SPV_KHR_shader_atomic_counter_ops]> 449 ]; 450} 451def SPV_C_SampleMaskPostDepthCoverage : I32EnumAttrCase<"SampleMaskPostDepthCoverage", 4447> { 452 list<Availability> availability = [ 453 Extension<[SPV_KHR_post_depth_coverage]> 454 ]; 455} 456def SPV_C_StorageBuffer8BitAccess : I32EnumAttrCase<"StorageBuffer8BitAccess", 4448> { 457 list<Availability> availability = [ 458 Extension<[SPV_KHR_8bit_storage]> 459 ]; 460} 461def SPV_C_StoragePushConstant8 : I32EnumAttrCase<"StoragePushConstant8", 4450> { 462 list<Availability> availability = [ 463 Extension<[SPV_KHR_8bit_storage]> 464 ]; 465} 466def SPV_C_DenormPreserve : I32EnumAttrCase<"DenormPreserve", 4464> { 467 list<Availability> availability = [ 468 Extension<[SPV_KHR_float_controls]> 469 ]; 470} 471def SPV_C_DenormFlushToZero : I32EnumAttrCase<"DenormFlushToZero", 4465> { 472 list<Availability> availability = [ 473 Extension<[SPV_KHR_float_controls]> 474 ]; 475} 476def SPV_C_SignedZeroInfNanPreserve : I32EnumAttrCase<"SignedZeroInfNanPreserve", 4466> { 477 list<Availability> availability = [ 478 Extension<[SPV_KHR_float_controls]> 479 ]; 480} 481def SPV_C_RoundingModeRTE : I32EnumAttrCase<"RoundingModeRTE", 4467> { 482 list<Availability> availability = [ 483 Extension<[SPV_KHR_float_controls]> 484 ]; 485} 486def SPV_C_RoundingModeRTZ : I32EnumAttrCase<"RoundingModeRTZ", 4468> { 487 list<Availability> availability = [ 488 Extension<[SPV_KHR_float_controls]> 489 ]; 490} 491def SPV_C_ImageFootprintNV : I32EnumAttrCase<"ImageFootprintNV", 5282> { 492 list<Availability> availability = [ 493 Extension<[SPV_NV_shader_image_footprint]> 494 ]; 495} 496def SPV_C_FragmentBarycentricNV : I32EnumAttrCase<"FragmentBarycentricNV", 5284> { 497 list<Availability> availability = [ 498 Extension<[SPV_NV_fragment_shader_barycentric]> 499 ]; 500} 501def SPV_C_ComputeDerivativeGroupQuadsNV : I32EnumAttrCase<"ComputeDerivativeGroupQuadsNV", 5288> { 502 list<Availability> availability = [ 503 Extension<[SPV_NV_compute_shader_derivatives]> 504 ]; 505} 506def SPV_C_GroupNonUniformPartitionedNV : I32EnumAttrCase<"GroupNonUniformPartitionedNV", 5297> { 507 list<Availability> availability = [ 508 Extension<[SPV_NV_shader_subgroup_partitioned]> 509 ]; 510} 511def SPV_C_VulkanMemoryModel : I32EnumAttrCase<"VulkanMemoryModel", 5345> { 512 list<Availability> availability = [ 513 MinVersion<SPV_V_1_5> 514 ]; 515} 516def SPV_C_VulkanMemoryModelDeviceScope : I32EnumAttrCase<"VulkanMemoryModelDeviceScope", 5346> { 517 list<Availability> availability = [ 518 MinVersion<SPV_V_1_5> 519 ]; 520} 521def SPV_C_ComputeDerivativeGroupLinearNV : I32EnumAttrCase<"ComputeDerivativeGroupLinearNV", 5350> { 522 list<Availability> availability = [ 523 Extension<[SPV_NV_compute_shader_derivatives]> 524 ]; 525} 526def SPV_C_SubgroupShuffleINTEL : I32EnumAttrCase<"SubgroupShuffleINTEL", 5568> { 527 list<Availability> availability = [ 528 Extension<[SPV_INTEL_subgroups]> 529 ]; 530} 531def SPV_C_SubgroupBufferBlockIOINTEL : I32EnumAttrCase<"SubgroupBufferBlockIOINTEL", 5569> { 532 list<Availability> availability = [ 533 Extension<[SPV_INTEL_subgroups]> 534 ]; 535} 536def SPV_C_SubgroupImageBlockIOINTEL : I32EnumAttrCase<"SubgroupImageBlockIOINTEL", 5570> { 537 list<Availability> availability = [ 538 Extension<[SPV_INTEL_subgroups]> 539 ]; 540} 541def SPV_C_SubgroupImageMediaBlockIOINTEL : I32EnumAttrCase<"SubgroupImageMediaBlockIOINTEL", 5579> { 542 list<Availability> availability = [ 543 Extension<[SPV_INTEL_media_block_io]> 544 ]; 545} 546def SPV_C_SubgroupAvcMotionEstimationINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationINTEL", 5696> { 547 list<Availability> availability = [ 548 Extension<[SPV_INTEL_device_side_avc_motion_estimation]> 549 ]; 550} 551def SPV_C_SubgroupAvcMotionEstimationIntraINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationIntraINTEL", 5697> { 552 list<Availability> availability = [ 553 Extension<[SPV_INTEL_device_side_avc_motion_estimation]> 554 ]; 555} 556def SPV_C_SubgroupAvcMotionEstimationChromaINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationChromaINTEL", 5698> { 557 list<Availability> availability = [ 558 Extension<[SPV_INTEL_device_side_avc_motion_estimation]> 559 ]; 560} 561def SPV_C_Shader : I32EnumAttrCase<"Shader", 1> { 562 list<I32EnumAttrCase> implies = [SPV_C_Matrix]; 563} 564def SPV_C_Vector16 : I32EnumAttrCase<"Vector16", 7> { 565 list<I32EnumAttrCase> implies = [SPV_C_Kernel]; 566} 567def SPV_C_Float16Buffer : I32EnumAttrCase<"Float16Buffer", 8> { 568 list<I32EnumAttrCase> implies = [SPV_C_Kernel]; 569} 570def SPV_C_Int64Atomics : I32EnumAttrCase<"Int64Atomics", 12> { 571 list<I32EnumAttrCase> implies = [SPV_C_Int64]; 572} 573def SPV_C_ImageBasic : I32EnumAttrCase<"ImageBasic", 13> { 574 list<I32EnumAttrCase> implies = [SPV_C_Kernel]; 575} 576def SPV_C_Pipes : I32EnumAttrCase<"Pipes", 17> { 577 list<I32EnumAttrCase> implies = [SPV_C_Kernel]; 578} 579def SPV_C_DeviceEnqueue : I32EnumAttrCase<"DeviceEnqueue", 19> { 580 list<I32EnumAttrCase> implies = [SPV_C_Kernel]; 581} 582def SPV_C_LiteralSampler : I32EnumAttrCase<"LiteralSampler", 20> { 583 list<I32EnumAttrCase> implies = [SPV_C_Kernel]; 584} 585def SPV_C_GenericPointer : I32EnumAttrCase<"GenericPointer", 38> { 586 list<I32EnumAttrCase> implies = [SPV_C_Addresses]; 587} 588def SPV_C_Image1D : I32EnumAttrCase<"Image1D", 44> { 589 list<I32EnumAttrCase> implies = [SPV_C_Sampled1D]; 590} 591def SPV_C_ImageBuffer : I32EnumAttrCase<"ImageBuffer", 47> { 592 list<I32EnumAttrCase> implies = [SPV_C_SampledBuffer]; 593} 594def SPV_C_NamedBarrier : I32EnumAttrCase<"NamedBarrier", 59> { 595 list<I32EnumAttrCase> implies = [SPV_C_Kernel]; 596 list<Availability> availability = [ 597 MinVersion<SPV_V_1_1> 598 ]; 599} 600def SPV_C_GroupNonUniformVote : I32EnumAttrCase<"GroupNonUniformVote", 62> { 601 list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform]; 602 list<Availability> availability = [ 603 MinVersion<SPV_V_1_3> 604 ]; 605} 606def SPV_C_GroupNonUniformArithmetic : I32EnumAttrCase<"GroupNonUniformArithmetic", 63> { 607 list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform]; 608 list<Availability> availability = [ 609 MinVersion<SPV_V_1_3> 610 ]; 611} 612def SPV_C_GroupNonUniformBallot : I32EnumAttrCase<"GroupNonUniformBallot", 64> { 613 list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform]; 614 list<Availability> availability = [ 615 MinVersion<SPV_V_1_3> 616 ]; 617} 618def SPV_C_GroupNonUniformShuffle : I32EnumAttrCase<"GroupNonUniformShuffle", 65> { 619 list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform]; 620 list<Availability> availability = [ 621 MinVersion<SPV_V_1_3> 622 ]; 623} 624def SPV_C_GroupNonUniformShuffleRelative : I32EnumAttrCase<"GroupNonUniformShuffleRelative", 66> { 625 list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform]; 626 list<Availability> availability = [ 627 MinVersion<SPV_V_1_3> 628 ]; 629} 630def SPV_C_GroupNonUniformClustered : I32EnumAttrCase<"GroupNonUniformClustered", 67> { 631 list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform]; 632 list<Availability> availability = [ 633 MinVersion<SPV_V_1_3> 634 ]; 635} 636def SPV_C_GroupNonUniformQuad : I32EnumAttrCase<"GroupNonUniformQuad", 68> { 637 list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform]; 638 list<Availability> availability = [ 639 MinVersion<SPV_V_1_3> 640 ]; 641} 642def SPV_C_StorageUniform16 : I32EnumAttrCase<"StorageUniform16", 4434> { 643 list<I32EnumAttrCase> implies = [SPV_C_StorageBuffer16BitAccess]; 644 list<Availability> availability = [ 645 Extension<[SPV_KHR_16bit_storage]> 646 ]; 647} 648def SPV_C_UniformAndStorageBuffer8BitAccess : I32EnumAttrCase<"UniformAndStorageBuffer8BitAccess", 4449> { 649 list<I32EnumAttrCase> implies = [SPV_C_StorageBuffer8BitAccess]; 650 list<Availability> availability = [ 651 Extension<[SPV_KHR_8bit_storage]> 652 ]; 653} 654def SPV_C_UniformTexelBufferArrayDynamicIndexing : I32EnumAttrCase<"UniformTexelBufferArrayDynamicIndexing", 5304> { 655 list<I32EnumAttrCase> implies = [SPV_C_SampledBuffer]; 656 list<Availability> availability = [ 657 MinVersion<SPV_V_1_5> 658 ]; 659} 660def SPV_C_Geometry : I32EnumAttrCase<"Geometry", 2> { 661 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 662} 663def SPV_C_Tessellation : I32EnumAttrCase<"Tessellation", 3> { 664 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 665} 666def SPV_C_ImageReadWrite : I32EnumAttrCase<"ImageReadWrite", 14> { 667 list<I32EnumAttrCase> implies = [SPV_C_ImageBasic]; 668} 669def SPV_C_ImageMipmap : I32EnumAttrCase<"ImageMipmap", 15> { 670 list<I32EnumAttrCase> implies = [SPV_C_ImageBasic]; 671} 672def SPV_C_AtomicStorage : I32EnumAttrCase<"AtomicStorage", 21> { 673 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 674} 675def SPV_C_ImageGatherExtended : I32EnumAttrCase<"ImageGatherExtended", 25> { 676 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 677} 678def SPV_C_StorageImageMultisample : I32EnumAttrCase<"StorageImageMultisample", 27> { 679 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 680} 681def SPV_C_UniformBufferArrayDynamicIndexing : I32EnumAttrCase<"UniformBufferArrayDynamicIndexing", 28> { 682 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 683} 684def SPV_C_SampledImageArrayDynamicIndexing : I32EnumAttrCase<"SampledImageArrayDynamicIndexing", 29> { 685 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 686} 687def SPV_C_StorageBufferArrayDynamicIndexing : I32EnumAttrCase<"StorageBufferArrayDynamicIndexing", 30> { 688 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 689} 690def SPV_C_StorageImageArrayDynamicIndexing : I32EnumAttrCase<"StorageImageArrayDynamicIndexing", 31> { 691 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 692} 693def SPV_C_ClipDistance : I32EnumAttrCase<"ClipDistance", 32> { 694 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 695} 696def SPV_C_CullDistance : I32EnumAttrCase<"CullDistance", 33> { 697 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 698} 699def SPV_C_SampleRateShading : I32EnumAttrCase<"SampleRateShading", 35> { 700 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 701} 702def SPV_C_SampledRect : I32EnumAttrCase<"SampledRect", 37> { 703 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 704} 705def SPV_C_InputAttachment : I32EnumAttrCase<"InputAttachment", 40> { 706 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 707} 708def SPV_C_SparseResidency : I32EnumAttrCase<"SparseResidency", 41> { 709 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 710} 711def SPV_C_MinLod : I32EnumAttrCase<"MinLod", 42> { 712 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 713} 714def SPV_C_SampledCubeArray : I32EnumAttrCase<"SampledCubeArray", 45> { 715 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 716} 717def SPV_C_ImageMSArray : I32EnumAttrCase<"ImageMSArray", 48> { 718 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 719} 720def SPV_C_StorageImageExtendedFormats : I32EnumAttrCase<"StorageImageExtendedFormats", 49> { 721 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 722} 723def SPV_C_ImageQuery : I32EnumAttrCase<"ImageQuery", 50> { 724 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 725} 726def SPV_C_DerivativeControl : I32EnumAttrCase<"DerivativeControl", 51> { 727 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 728} 729def SPV_C_InterpolationFunction : I32EnumAttrCase<"InterpolationFunction", 52> { 730 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 731} 732def SPV_C_TransformFeedback : I32EnumAttrCase<"TransformFeedback", 53> { 733 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 734} 735def SPV_C_StorageImageReadWithoutFormat : I32EnumAttrCase<"StorageImageReadWithoutFormat", 55> { 736 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 737} 738def SPV_C_StorageImageWriteWithoutFormat : I32EnumAttrCase<"StorageImageWriteWithoutFormat", 56> { 739 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 740} 741def SPV_C_SubgroupDispatch : I32EnumAttrCase<"SubgroupDispatch", 58> { 742 list<I32EnumAttrCase> implies = [SPV_C_DeviceEnqueue]; 743 list<Availability> availability = [ 744 MinVersion<SPV_V_1_1> 745 ]; 746} 747def SPV_C_PipeStorage : I32EnumAttrCase<"PipeStorage", 60> { 748 list<I32EnumAttrCase> implies = [SPV_C_Pipes]; 749 list<Availability> availability = [ 750 MinVersion<SPV_V_1_1> 751 ]; 752} 753def SPV_C_DrawParameters : I32EnumAttrCase<"DrawParameters", 4427> { 754 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 755 list<Availability> availability = [ 756 Extension<[SPV_KHR_shader_draw_parameters]> 757 ]; 758} 759def SPV_C_MultiView : I32EnumAttrCase<"MultiView", 4439> { 760 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 761 list<Availability> availability = [ 762 Extension<[SPV_KHR_multiview]> 763 ]; 764} 765def SPV_C_VariablePointersStorageBuffer : I32EnumAttrCase<"VariablePointersStorageBuffer", 4441> { 766 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 767 list<Availability> availability = [ 768 Extension<[SPV_KHR_variable_pointers]> 769 ]; 770} 771def SPV_C_Float16ImageAMD : I32EnumAttrCase<"Float16ImageAMD", 5008> { 772 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 773 list<Availability> availability = [ 774 Extension<[SPV_AMD_gpu_shader_half_float_fetch]> 775 ]; 776} 777def SPV_C_ImageGatherBiasLodAMD : I32EnumAttrCase<"ImageGatherBiasLodAMD", 5009> { 778 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 779 list<Availability> availability = [ 780 Extension<[SPV_AMD_texture_gather_bias_lod]> 781 ]; 782} 783def SPV_C_FragmentMaskAMD : I32EnumAttrCase<"FragmentMaskAMD", 5010> { 784 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 785 list<Availability> availability = [ 786 Extension<[SPV_AMD_shader_fragment_mask]> 787 ]; 788} 789def SPV_C_StencilExportEXT : I32EnumAttrCase<"StencilExportEXT", 5013> { 790 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 791 list<Availability> availability = [ 792 Extension<[SPV_EXT_shader_stencil_export]> 793 ]; 794} 795def SPV_C_ImageReadWriteLodAMD : I32EnumAttrCase<"ImageReadWriteLodAMD", 5015> { 796 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 797 list<Availability> availability = [ 798 Extension<[SPV_AMD_shader_image_load_store_lod]> 799 ]; 800} 801def SPV_C_ShaderClockKHR : I32EnumAttrCase<"ShaderClockKHR", 5055> { 802 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 803 list<Availability> availability = [ 804 Extension<[SPV_KHR_shader_clock]> 805 ]; 806} 807def SPV_C_FragmentFullyCoveredEXT : I32EnumAttrCase<"FragmentFullyCoveredEXT", 5265> { 808 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 809 list<Availability> availability = [ 810 Extension<[SPV_EXT_fragment_fully_covered]> 811 ]; 812} 813def SPV_C_MeshShadingNV : I32EnumAttrCase<"MeshShadingNV", 5266> { 814 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 815 list<Availability> availability = [ 816 Extension<[SPV_NV_mesh_shader]> 817 ]; 818} 819def SPV_C_FragmentDensityEXT : I32EnumAttrCase<"FragmentDensityEXT", 5291> { 820 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 821 list<Availability> availability = [ 822 Extension<[SPV_EXT_fragment_invocation_density, SPV_NV_shading_rate]> 823 ]; 824} 825def SPV_C_ShaderNonUniform : I32EnumAttrCase<"ShaderNonUniform", 5301> { 826 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 827 list<Availability> availability = [ 828 MinVersion<SPV_V_1_5> 829 ]; 830} 831def SPV_C_RuntimeDescriptorArray : I32EnumAttrCase<"RuntimeDescriptorArray", 5302> { 832 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 833 list<Availability> availability = [ 834 MinVersion<SPV_V_1_5> 835 ]; 836} 837def SPV_C_StorageTexelBufferArrayDynamicIndexing : I32EnumAttrCase<"StorageTexelBufferArrayDynamicIndexing", 5305> { 838 list<I32EnumAttrCase> implies = [SPV_C_ImageBuffer]; 839 list<Availability> availability = [ 840 MinVersion<SPV_V_1_5> 841 ]; 842} 843def SPV_C_RayTracingNV : I32EnumAttrCase<"RayTracingNV", 5340> { 844 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 845 list<Availability> availability = [ 846 Extension<[SPV_NV_ray_tracing]> 847 ]; 848} 849def SPV_C_PhysicalStorageBufferAddresses : I32EnumAttrCase<"PhysicalStorageBufferAddresses", 5347> { 850 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 851 list<Availability> availability = [ 852 Extension<[SPV_EXT_physical_storage_buffer, SPV_KHR_physical_storage_buffer]> 853 ]; 854} 855def SPV_C_CooperativeMatrixNV : I32EnumAttrCase<"CooperativeMatrixNV", 5357> { 856 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 857 list<Availability> availability = [ 858 Extension<[SPV_NV_cooperative_matrix]> 859 ]; 860} 861def SPV_C_FragmentShaderSampleInterlockEXT : I32EnumAttrCase<"FragmentShaderSampleInterlockEXT", 5363> { 862 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 863 list<Availability> availability = [ 864 Extension<[SPV_EXT_fragment_shader_interlock]> 865 ]; 866} 867def SPV_C_FragmentShaderShadingRateInterlockEXT : I32EnumAttrCase<"FragmentShaderShadingRateInterlockEXT", 5372> { 868 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 869 list<Availability> availability = [ 870 Extension<[SPV_EXT_fragment_shader_interlock]> 871 ]; 872} 873def SPV_C_ShaderSMBuiltinsNV : I32EnumAttrCase<"ShaderSMBuiltinsNV", 5373> { 874 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 875 list<Availability> availability = [ 876 Extension<[SPV_NV_shader_sm_builtins]> 877 ]; 878} 879def SPV_C_FragmentShaderPixelInterlockEXT : I32EnumAttrCase<"FragmentShaderPixelInterlockEXT", 5378> { 880 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 881 list<Availability> availability = [ 882 Extension<[SPV_EXT_fragment_shader_interlock]> 883 ]; 884} 885def SPV_C_DemoteToHelperInvocationEXT : I32EnumAttrCase<"DemoteToHelperInvocationEXT", 5379> { 886 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 887 list<Availability> availability = [ 888 Extension<[SPV_EXT_demote_to_helper_invocation]> 889 ]; 890} 891def SPV_C_IntegerFunctions2INTEL : I32EnumAttrCase<"IntegerFunctions2INTEL", 5584> { 892 list<I32EnumAttrCase> implies = [SPV_C_Shader]; 893 list<Availability> availability = [ 894 Extension<[SPV_INTEL_shader_integer_functions2]> 895 ]; 896} 897def SPV_C_TessellationPointSize : I32EnumAttrCase<"TessellationPointSize", 23> { 898 list<I32EnumAttrCase> implies = [SPV_C_Tessellation]; 899} 900def SPV_C_GeometryPointSize : I32EnumAttrCase<"GeometryPointSize", 24> { 901 list<I32EnumAttrCase> implies = [SPV_C_Geometry]; 902} 903def SPV_C_ImageCubeArray : I32EnumAttrCase<"ImageCubeArray", 34> { 904 list<I32EnumAttrCase> implies = [SPV_C_SampledCubeArray]; 905} 906def SPV_C_ImageRect : I32EnumAttrCase<"ImageRect", 36> { 907 list<I32EnumAttrCase> implies = [SPV_C_SampledRect]; 908} 909def SPV_C_GeometryStreams : I32EnumAttrCase<"GeometryStreams", 54> { 910 list<I32EnumAttrCase> implies = [SPV_C_Geometry]; 911} 912def SPV_C_MultiViewport : I32EnumAttrCase<"MultiViewport", 57> { 913 list<I32EnumAttrCase> implies = [SPV_C_Geometry]; 914} 915def SPV_C_VariablePointers : I32EnumAttrCase<"VariablePointers", 4442> { 916 list<I32EnumAttrCase> implies = [SPV_C_VariablePointersStorageBuffer]; 917 list<Availability> availability = [ 918 Extension<[SPV_KHR_variable_pointers]> 919 ]; 920} 921def SPV_C_SampleMaskOverrideCoverageNV : I32EnumAttrCase<"SampleMaskOverrideCoverageNV", 5249> { 922 list<I32EnumAttrCase> implies = [SPV_C_SampleRateShading]; 923 list<Availability> availability = [ 924 Extension<[SPV_NV_sample_mask_override_coverage]> 925 ]; 926} 927def SPV_C_GeometryShaderPassthroughNV : I32EnumAttrCase<"GeometryShaderPassthroughNV", 5251> { 928 list<I32EnumAttrCase> implies = [SPV_C_Geometry]; 929 list<Availability> availability = [ 930 Extension<[SPV_NV_geometry_shader_passthrough]> 931 ]; 932} 933def SPV_C_PerViewAttributesNV : I32EnumAttrCase<"PerViewAttributesNV", 5260> { 934 list<I32EnumAttrCase> implies = [SPV_C_MultiView]; 935 list<Availability> availability = [ 936 Extension<[SPV_NVX_multiview_per_view_attributes]> 937 ]; 938} 939def SPV_C_InputAttachmentArrayDynamicIndexing : I32EnumAttrCase<"InputAttachmentArrayDynamicIndexing", 5303> { 940 list<I32EnumAttrCase> implies = [SPV_C_InputAttachment]; 941 list<Availability> availability = [ 942 MinVersion<SPV_V_1_5> 943 ]; 944} 945def SPV_C_UniformBufferArrayNonUniformIndexing : I32EnumAttrCase<"UniformBufferArrayNonUniformIndexing", 5306> { 946 list<I32EnumAttrCase> implies = [SPV_C_ShaderNonUniform]; 947 list<Availability> availability = [ 948 MinVersion<SPV_V_1_5> 949 ]; 950} 951def SPV_C_SampledImageArrayNonUniformIndexing : I32EnumAttrCase<"SampledImageArrayNonUniformIndexing", 5307> { 952 list<I32EnumAttrCase> implies = [SPV_C_ShaderNonUniform]; 953 list<Availability> availability = [ 954 MinVersion<SPV_V_1_5> 955 ]; 956} 957def SPV_C_StorageBufferArrayNonUniformIndexing : I32EnumAttrCase<"StorageBufferArrayNonUniformIndexing", 5308> { 958 list<I32EnumAttrCase> implies = [SPV_C_ShaderNonUniform]; 959 list<Availability> availability = [ 960 MinVersion<SPV_V_1_5> 961 ]; 962} 963def SPV_C_StorageImageArrayNonUniformIndexing : I32EnumAttrCase<"StorageImageArrayNonUniformIndexing", 5309> { 964 list<I32EnumAttrCase> implies = [SPV_C_ShaderNonUniform]; 965 list<Availability> availability = [ 966 MinVersion<SPV_V_1_5> 967 ]; 968} 969def SPV_C_InputAttachmentArrayNonUniformIndexing : I32EnumAttrCase<"InputAttachmentArrayNonUniformIndexing", 5310> { 970 list<I32EnumAttrCase> implies = [SPV_C_InputAttachment, SPV_C_ShaderNonUniform]; 971 list<Availability> availability = [ 972 MinVersion<SPV_V_1_5> 973 ]; 974} 975def SPV_C_UniformTexelBufferArrayNonUniformIndexing : I32EnumAttrCase<"UniformTexelBufferArrayNonUniformIndexing", 5311> { 976 list<I32EnumAttrCase> implies = [SPV_C_SampledBuffer, SPV_C_ShaderNonUniform]; 977 list<Availability> availability = [ 978 MinVersion<SPV_V_1_5> 979 ]; 980} 981def SPV_C_StorageTexelBufferArrayNonUniformIndexing : I32EnumAttrCase<"StorageTexelBufferArrayNonUniformIndexing", 5312> { 982 list<I32EnumAttrCase> implies = [SPV_C_ImageBuffer, SPV_C_ShaderNonUniform]; 983 list<Availability> availability = [ 984 MinVersion<SPV_V_1_5> 985 ]; 986} 987def SPV_C_ShaderViewportIndexLayerEXT : I32EnumAttrCase<"ShaderViewportIndexLayerEXT", 5254> { 988 list<I32EnumAttrCase> implies = [SPV_C_MultiViewport]; 989 list<Availability> availability = [ 990 Extension<[SPV_EXT_shader_viewport_index_layer]> 991 ]; 992} 993def SPV_C_ShaderViewportMaskNV : I32EnumAttrCase<"ShaderViewportMaskNV", 5255> { 994 list<I32EnumAttrCase> implies = [SPV_C_ShaderViewportIndexLayerEXT]; 995 list<Availability> availability = [ 996 Extension<[SPV_NV_viewport_array2]> 997 ]; 998} 999def SPV_C_ShaderStereoViewNV : I32EnumAttrCase<"ShaderStereoViewNV", 5259> { 1000 list<I32EnumAttrCase> implies = [SPV_C_ShaderViewportMaskNV]; 1001 list<Availability> availability = [ 1002 Extension<[SPV_NV_stereo_view_rendering]> 1003 ]; 1004} 1005 1006def SPV_CapabilityAttr : 1007 SPV_I32EnumAttr<"Capability", "valid SPIR-V Capability", [ 1008 SPV_C_Matrix, SPV_C_Addresses, SPV_C_Linkage, SPV_C_Kernel, SPV_C_Float16, 1009 SPV_C_Float64, SPV_C_Int64, SPV_C_Groups, SPV_C_Int16, SPV_C_Int8, 1010 SPV_C_Sampled1D, SPV_C_SampledBuffer, SPV_C_GroupNonUniform, SPV_C_ShaderLayer, 1011 SPV_C_ShaderViewportIndex, SPV_C_SubgroupBallotKHR, SPV_C_SubgroupVoteKHR, 1012 SPV_C_StorageBuffer16BitAccess, SPV_C_StoragePushConstant16, 1013 SPV_C_StorageInputOutput16, SPV_C_DeviceGroup, SPV_C_AtomicStorageOps, 1014 SPV_C_SampleMaskPostDepthCoverage, SPV_C_StorageBuffer8BitAccess, 1015 SPV_C_StoragePushConstant8, SPV_C_DenormPreserve, SPV_C_DenormFlushToZero, 1016 SPV_C_SignedZeroInfNanPreserve, SPV_C_RoundingModeRTE, SPV_C_RoundingModeRTZ, 1017 SPV_C_ImageFootprintNV, SPV_C_FragmentBarycentricNV, 1018 SPV_C_ComputeDerivativeGroupQuadsNV, SPV_C_GroupNonUniformPartitionedNV, 1019 SPV_C_VulkanMemoryModel, SPV_C_VulkanMemoryModelDeviceScope, 1020 SPV_C_ComputeDerivativeGroupLinearNV, SPV_C_SubgroupShuffleINTEL, 1021 SPV_C_SubgroupBufferBlockIOINTEL, SPV_C_SubgroupImageBlockIOINTEL, 1022 SPV_C_SubgroupImageMediaBlockIOINTEL, SPV_C_SubgroupAvcMotionEstimationINTEL, 1023 SPV_C_SubgroupAvcMotionEstimationIntraINTEL, 1024 SPV_C_SubgroupAvcMotionEstimationChromaINTEL, SPV_C_Shader, SPV_C_Vector16, 1025 SPV_C_Float16Buffer, SPV_C_Int64Atomics, SPV_C_ImageBasic, SPV_C_Pipes, 1026 SPV_C_DeviceEnqueue, SPV_C_LiteralSampler, SPV_C_GenericPointer, SPV_C_Image1D, 1027 SPV_C_ImageBuffer, SPV_C_NamedBarrier, SPV_C_GroupNonUniformVote, 1028 SPV_C_GroupNonUniformArithmetic, SPV_C_GroupNonUniformBallot, 1029 SPV_C_GroupNonUniformShuffle, SPV_C_GroupNonUniformShuffleRelative, 1030 SPV_C_GroupNonUniformClustered, SPV_C_GroupNonUniformQuad, 1031 SPV_C_StorageUniform16, SPV_C_UniformAndStorageBuffer8BitAccess, 1032 SPV_C_UniformTexelBufferArrayDynamicIndexing, SPV_C_Geometry, 1033 SPV_C_Tessellation, SPV_C_ImageReadWrite, SPV_C_ImageMipmap, 1034 SPV_C_AtomicStorage, SPV_C_ImageGatherExtended, SPV_C_StorageImageMultisample, 1035 SPV_C_UniformBufferArrayDynamicIndexing, 1036 SPV_C_SampledImageArrayDynamicIndexing, 1037 SPV_C_StorageBufferArrayDynamicIndexing, 1038 SPV_C_StorageImageArrayDynamicIndexing, SPV_C_ClipDistance, SPV_C_CullDistance, 1039 SPV_C_SampleRateShading, SPV_C_SampledRect, SPV_C_InputAttachment, 1040 SPV_C_SparseResidency, SPV_C_MinLod, SPV_C_SampledCubeArray, 1041 SPV_C_ImageMSArray, SPV_C_StorageImageExtendedFormats, SPV_C_ImageQuery, 1042 SPV_C_DerivativeControl, SPV_C_InterpolationFunction, SPV_C_TransformFeedback, 1043 SPV_C_StorageImageReadWithoutFormat, SPV_C_StorageImageWriteWithoutFormat, 1044 SPV_C_SubgroupDispatch, SPV_C_PipeStorage, SPV_C_DrawParameters, 1045 SPV_C_MultiView, SPV_C_VariablePointersStorageBuffer, SPV_C_Float16ImageAMD, 1046 SPV_C_ImageGatherBiasLodAMD, SPV_C_FragmentMaskAMD, SPV_C_StencilExportEXT, 1047 SPV_C_ImageReadWriteLodAMD, SPV_C_ShaderClockKHR, 1048 SPV_C_FragmentFullyCoveredEXT, SPV_C_MeshShadingNV, SPV_C_FragmentDensityEXT, 1049 SPV_C_ShaderNonUniform, SPV_C_RuntimeDescriptorArray, 1050 SPV_C_StorageTexelBufferArrayDynamicIndexing, SPV_C_RayTracingNV, 1051 SPV_C_PhysicalStorageBufferAddresses, SPV_C_CooperativeMatrixNV, 1052 SPV_C_FragmentShaderSampleInterlockEXT, 1053 SPV_C_FragmentShaderShadingRateInterlockEXT, SPV_C_ShaderSMBuiltinsNV, 1054 SPV_C_FragmentShaderPixelInterlockEXT, SPV_C_DemoteToHelperInvocationEXT, 1055 SPV_C_IntegerFunctions2INTEL, SPV_C_TessellationPointSize, 1056 SPV_C_GeometryPointSize, SPV_C_ImageCubeArray, SPV_C_ImageRect, 1057 SPV_C_GeometryStreams, SPV_C_MultiViewport, SPV_C_VariablePointers, 1058 SPV_C_SampleMaskOverrideCoverageNV, SPV_C_GeometryShaderPassthroughNV, 1059 SPV_C_PerViewAttributesNV, SPV_C_InputAttachmentArrayDynamicIndexing, 1060 SPV_C_UniformBufferArrayNonUniformIndexing, 1061 SPV_C_SampledImageArrayNonUniformIndexing, 1062 SPV_C_StorageBufferArrayNonUniformIndexing, 1063 SPV_C_StorageImageArrayNonUniformIndexing, 1064 SPV_C_InputAttachmentArrayNonUniformIndexing, 1065 SPV_C_UniformTexelBufferArrayNonUniformIndexing, 1066 SPV_C_StorageTexelBufferArrayNonUniformIndexing, 1067 SPV_C_ShaderViewportIndexLayerEXT, SPV_C_ShaderViewportMaskNV, 1068 SPV_C_ShaderStereoViewNV 1069 ]>; 1070 1071def SPV_AM_Logical : I32EnumAttrCase<"Logical", 0>; 1072def SPV_AM_Physical32 : I32EnumAttrCase<"Physical32", 1> { 1073 list<Availability> availability = [ 1074 Capability<[SPV_C_Addresses]> 1075 ]; 1076} 1077def SPV_AM_Physical64 : I32EnumAttrCase<"Physical64", 2> { 1078 list<Availability> availability = [ 1079 Capability<[SPV_C_Addresses]> 1080 ]; 1081} 1082def SPV_AM_PhysicalStorageBuffer64 : I32EnumAttrCase<"PhysicalStorageBuffer64", 5348> { 1083 list<Availability> availability = [ 1084 Extension<[SPV_EXT_physical_storage_buffer, SPV_KHR_physical_storage_buffer]>, 1085 Capability<[SPV_C_PhysicalStorageBufferAddresses]> 1086 ]; 1087} 1088 1089def SPV_AddressingModelAttr : 1090 SPV_I32EnumAttr<"AddressingModel", "valid SPIR-V AddressingModel", [ 1091 SPV_AM_Logical, SPV_AM_Physical32, SPV_AM_Physical64, 1092 SPV_AM_PhysicalStorageBuffer64 1093 ]>; 1094 1095def SPV_BI_Position : I32EnumAttrCase<"Position", 0> { 1096 list<Availability> availability = [ 1097 Capability<[SPV_C_Shader]> 1098 ]; 1099} 1100def SPV_BI_PointSize : I32EnumAttrCase<"PointSize", 1> { 1101 list<Availability> availability = [ 1102 Capability<[SPV_C_Shader]> 1103 ]; 1104} 1105def SPV_BI_ClipDistance : I32EnumAttrCase<"ClipDistance", 3> { 1106 list<Availability> availability = [ 1107 Capability<[SPV_C_ClipDistance]> 1108 ]; 1109} 1110def SPV_BI_CullDistance : I32EnumAttrCase<"CullDistance", 4> { 1111 list<Availability> availability = [ 1112 Capability<[SPV_C_CullDistance]> 1113 ]; 1114} 1115def SPV_BI_VertexId : I32EnumAttrCase<"VertexId", 5> { 1116 list<Availability> availability = [ 1117 Capability<[SPV_C_Shader]> 1118 ]; 1119} 1120def SPV_BI_InstanceId : I32EnumAttrCase<"InstanceId", 6> { 1121 list<Availability> availability = [ 1122 Capability<[SPV_C_Shader]> 1123 ]; 1124} 1125def SPV_BI_PrimitiveId : I32EnumAttrCase<"PrimitiveId", 7> { 1126 list<Availability> availability = [ 1127 Capability<[SPV_C_Geometry, SPV_C_RayTracingNV, SPV_C_Tessellation]> 1128 ]; 1129} 1130def SPV_BI_InvocationId : I32EnumAttrCase<"InvocationId", 8> { 1131 list<Availability> availability = [ 1132 Capability<[SPV_C_Geometry, SPV_C_Tessellation]> 1133 ]; 1134} 1135def SPV_BI_Layer : I32EnumAttrCase<"Layer", 9> { 1136 list<Availability> availability = [ 1137 Capability<[SPV_C_Geometry, SPV_C_ShaderLayer, SPV_C_ShaderViewportIndexLayerEXT]> 1138 ]; 1139} 1140def SPV_BI_ViewportIndex : I32EnumAttrCase<"ViewportIndex", 10> { 1141 list<Availability> availability = [ 1142 Capability<[SPV_C_MultiViewport, SPV_C_ShaderViewportIndex, SPV_C_ShaderViewportIndexLayerEXT]> 1143 ]; 1144} 1145def SPV_BI_TessLevelOuter : I32EnumAttrCase<"TessLevelOuter", 11> { 1146 list<Availability> availability = [ 1147 Capability<[SPV_C_Tessellation]> 1148 ]; 1149} 1150def SPV_BI_TessLevelInner : I32EnumAttrCase<"TessLevelInner", 12> { 1151 list<Availability> availability = [ 1152 Capability<[SPV_C_Tessellation]> 1153 ]; 1154} 1155def SPV_BI_TessCoord : I32EnumAttrCase<"TessCoord", 13> { 1156 list<Availability> availability = [ 1157 Capability<[SPV_C_Tessellation]> 1158 ]; 1159} 1160def SPV_BI_PatchVertices : I32EnumAttrCase<"PatchVertices", 14> { 1161 list<Availability> availability = [ 1162 Capability<[SPV_C_Tessellation]> 1163 ]; 1164} 1165def SPV_BI_FragCoord : I32EnumAttrCase<"FragCoord", 15> { 1166 list<Availability> availability = [ 1167 Capability<[SPV_C_Shader]> 1168 ]; 1169} 1170def SPV_BI_PointCoord : I32EnumAttrCase<"PointCoord", 16> { 1171 list<Availability> availability = [ 1172 Capability<[SPV_C_Shader]> 1173 ]; 1174} 1175def SPV_BI_FrontFacing : I32EnumAttrCase<"FrontFacing", 17> { 1176 list<Availability> availability = [ 1177 Capability<[SPV_C_Shader]> 1178 ]; 1179} 1180def SPV_BI_SampleId : I32EnumAttrCase<"SampleId", 18> { 1181 list<Availability> availability = [ 1182 Capability<[SPV_C_SampleRateShading]> 1183 ]; 1184} 1185def SPV_BI_SamplePosition : I32EnumAttrCase<"SamplePosition", 19> { 1186 list<Availability> availability = [ 1187 Capability<[SPV_C_SampleRateShading]> 1188 ]; 1189} 1190def SPV_BI_SampleMask : I32EnumAttrCase<"SampleMask", 20> { 1191 list<Availability> availability = [ 1192 Capability<[SPV_C_Shader]> 1193 ]; 1194} 1195def SPV_BI_FragDepth : I32EnumAttrCase<"FragDepth", 22> { 1196 list<Availability> availability = [ 1197 Capability<[SPV_C_Shader]> 1198 ]; 1199} 1200def SPV_BI_HelperInvocation : I32EnumAttrCase<"HelperInvocation", 23> { 1201 list<Availability> availability = [ 1202 Capability<[SPV_C_Shader]> 1203 ]; 1204} 1205def SPV_BI_NumWorkgroups : I32EnumAttrCase<"NumWorkgroups", 24>; 1206def SPV_BI_WorkgroupSize : I32EnumAttrCase<"WorkgroupSize", 25>; 1207def SPV_BI_WorkgroupId : I32EnumAttrCase<"WorkgroupId", 26>; 1208def SPV_BI_LocalInvocationId : I32EnumAttrCase<"LocalInvocationId", 27>; 1209def SPV_BI_GlobalInvocationId : I32EnumAttrCase<"GlobalInvocationId", 28>; 1210def SPV_BI_LocalInvocationIndex : I32EnumAttrCase<"LocalInvocationIndex", 29>; 1211def SPV_BI_WorkDim : I32EnumAttrCase<"WorkDim", 30> { 1212 list<Availability> availability = [ 1213 Capability<[SPV_C_Kernel]> 1214 ]; 1215} 1216def SPV_BI_GlobalSize : I32EnumAttrCase<"GlobalSize", 31> { 1217 list<Availability> availability = [ 1218 Capability<[SPV_C_Kernel]> 1219 ]; 1220} 1221def SPV_BI_EnqueuedWorkgroupSize : I32EnumAttrCase<"EnqueuedWorkgroupSize", 32> { 1222 list<Availability> availability = [ 1223 Capability<[SPV_C_Kernel]> 1224 ]; 1225} 1226def SPV_BI_GlobalOffset : I32EnumAttrCase<"GlobalOffset", 33> { 1227 list<Availability> availability = [ 1228 Capability<[SPV_C_Kernel]> 1229 ]; 1230} 1231def SPV_BI_GlobalLinearId : I32EnumAttrCase<"GlobalLinearId", 34> { 1232 list<Availability> availability = [ 1233 Capability<[SPV_C_Kernel]> 1234 ]; 1235} 1236def SPV_BI_SubgroupSize : I32EnumAttrCase<"SubgroupSize", 36> { 1237 list<Availability> availability = [ 1238 Capability<[SPV_C_GroupNonUniform, SPV_C_Kernel, SPV_C_SubgroupBallotKHR]> 1239 ]; 1240} 1241def SPV_BI_SubgroupMaxSize : I32EnumAttrCase<"SubgroupMaxSize", 37> { 1242 list<Availability> availability = [ 1243 Capability<[SPV_C_Kernel]> 1244 ]; 1245} 1246def SPV_BI_NumSubgroups : I32EnumAttrCase<"NumSubgroups", 38> { 1247 list<Availability> availability = [ 1248 Capability<[SPV_C_GroupNonUniform, SPV_C_Kernel]> 1249 ]; 1250} 1251def SPV_BI_NumEnqueuedSubgroups : I32EnumAttrCase<"NumEnqueuedSubgroups", 39> { 1252 list<Availability> availability = [ 1253 Capability<[SPV_C_Kernel]> 1254 ]; 1255} 1256def SPV_BI_SubgroupId : I32EnumAttrCase<"SubgroupId", 40> { 1257 list<Availability> availability = [ 1258 Capability<[SPV_C_GroupNonUniform, SPV_C_Kernel]> 1259 ]; 1260} 1261def SPV_BI_SubgroupLocalInvocationId : I32EnumAttrCase<"SubgroupLocalInvocationId", 41> { 1262 list<Availability> availability = [ 1263 Capability<[SPV_C_GroupNonUniform, SPV_C_Kernel, SPV_C_SubgroupBallotKHR]> 1264 ]; 1265} 1266def SPV_BI_VertexIndex : I32EnumAttrCase<"VertexIndex", 42> { 1267 list<Availability> availability = [ 1268 Capability<[SPV_C_Shader]> 1269 ]; 1270} 1271def SPV_BI_InstanceIndex : I32EnumAttrCase<"InstanceIndex", 43> { 1272 list<Availability> availability = [ 1273 Capability<[SPV_C_Shader]> 1274 ]; 1275} 1276def SPV_BI_SubgroupEqMask : I32EnumAttrCase<"SubgroupEqMask", 4416> { 1277 list<Availability> availability = [ 1278 MinVersion<SPV_V_1_3>, 1279 Capability<[SPV_C_GroupNonUniformBallot, SPV_C_SubgroupBallotKHR]> 1280 ]; 1281} 1282def SPV_BI_SubgroupGeMask : I32EnumAttrCase<"SubgroupGeMask", 4417> { 1283 list<Availability> availability = [ 1284 MinVersion<SPV_V_1_3>, 1285 Capability<[SPV_C_GroupNonUniformBallot, SPV_C_SubgroupBallotKHR]> 1286 ]; 1287} 1288def SPV_BI_SubgroupGtMask : I32EnumAttrCase<"SubgroupGtMask", 4418> { 1289 list<Availability> availability = [ 1290 MinVersion<SPV_V_1_3>, 1291 Capability<[SPV_C_GroupNonUniformBallot, SPV_C_SubgroupBallotKHR]> 1292 ]; 1293} 1294def SPV_BI_SubgroupLeMask : I32EnumAttrCase<"SubgroupLeMask", 4419> { 1295 list<Availability> availability = [ 1296 MinVersion<SPV_V_1_3>, 1297 Capability<[SPV_C_GroupNonUniformBallot, SPV_C_SubgroupBallotKHR]> 1298 ]; 1299} 1300def SPV_BI_SubgroupLtMask : I32EnumAttrCase<"SubgroupLtMask", 4420> { 1301 list<Availability> availability = [ 1302 MinVersion<SPV_V_1_3>, 1303 Capability<[SPV_C_GroupNonUniformBallot, SPV_C_SubgroupBallotKHR]> 1304 ]; 1305} 1306def SPV_BI_BaseVertex : I32EnumAttrCase<"BaseVertex", 4424> { 1307 list<Availability> availability = [ 1308 Extension<[SPV_KHR_shader_draw_parameters]>, 1309 Capability<[SPV_C_DrawParameters]> 1310 ]; 1311} 1312def SPV_BI_BaseInstance : I32EnumAttrCase<"BaseInstance", 4425> { 1313 list<Availability> availability = [ 1314 Extension<[SPV_KHR_shader_draw_parameters]>, 1315 Capability<[SPV_C_DrawParameters]> 1316 ]; 1317} 1318def SPV_BI_DrawIndex : I32EnumAttrCase<"DrawIndex", 4426> { 1319 list<Availability> availability = [ 1320 Extension<[SPV_KHR_shader_draw_parameters, SPV_NV_mesh_shader]>, 1321 Capability<[SPV_C_DrawParameters, SPV_C_MeshShadingNV]> 1322 ]; 1323} 1324def SPV_BI_DeviceIndex : I32EnumAttrCase<"DeviceIndex", 4438> { 1325 list<Availability> availability = [ 1326 Extension<[SPV_KHR_device_group]>, 1327 Capability<[SPV_C_DeviceGroup]> 1328 ]; 1329} 1330def SPV_BI_ViewIndex : I32EnumAttrCase<"ViewIndex", 4440> { 1331 list<Availability> availability = [ 1332 Extension<[SPV_KHR_multiview]>, 1333 Capability<[SPV_C_MultiView]> 1334 ]; 1335} 1336def SPV_BI_BaryCoordNoPerspAMD : I32EnumAttrCase<"BaryCoordNoPerspAMD", 4992> { 1337 list<Availability> availability = [ 1338 Extension<[SPV_AMD_shader_explicit_vertex_parameter]> 1339 ]; 1340} 1341def SPV_BI_BaryCoordNoPerspCentroidAMD : I32EnumAttrCase<"BaryCoordNoPerspCentroidAMD", 4993> { 1342 list<Availability> availability = [ 1343 Extension<[SPV_AMD_shader_explicit_vertex_parameter]> 1344 ]; 1345} 1346def SPV_BI_BaryCoordNoPerspSampleAMD : I32EnumAttrCase<"BaryCoordNoPerspSampleAMD", 4994> { 1347 list<Availability> availability = [ 1348 Extension<[SPV_AMD_shader_explicit_vertex_parameter]> 1349 ]; 1350} 1351def SPV_BI_BaryCoordSmoothAMD : I32EnumAttrCase<"BaryCoordSmoothAMD", 4995> { 1352 list<Availability> availability = [ 1353 Extension<[SPV_AMD_shader_explicit_vertex_parameter]> 1354 ]; 1355} 1356def SPV_BI_BaryCoordSmoothCentroidAMD : I32EnumAttrCase<"BaryCoordSmoothCentroidAMD", 4996> { 1357 list<Availability> availability = [ 1358 Extension<[SPV_AMD_shader_explicit_vertex_parameter]> 1359 ]; 1360} 1361def SPV_BI_BaryCoordSmoothSampleAMD : I32EnumAttrCase<"BaryCoordSmoothSampleAMD", 4997> { 1362 list<Availability> availability = [ 1363 Extension<[SPV_AMD_shader_explicit_vertex_parameter]> 1364 ]; 1365} 1366def SPV_BI_BaryCoordPullModelAMD : I32EnumAttrCase<"BaryCoordPullModelAMD", 4998> { 1367 list<Availability> availability = [ 1368 Extension<[SPV_AMD_shader_explicit_vertex_parameter]> 1369 ]; 1370} 1371def SPV_BI_FragStencilRefEXT : I32EnumAttrCase<"FragStencilRefEXT", 5014> { 1372 list<Availability> availability = [ 1373 Extension<[SPV_EXT_shader_stencil_export]>, 1374 Capability<[SPV_C_StencilExportEXT]> 1375 ]; 1376} 1377def SPV_BI_ViewportMaskNV : I32EnumAttrCase<"ViewportMaskNV", 5253> { 1378 list<Availability> availability = [ 1379 Extension<[SPV_NV_mesh_shader, SPV_NV_viewport_array2]>, 1380 Capability<[SPV_C_MeshShadingNV, SPV_C_ShaderViewportMaskNV]> 1381 ]; 1382} 1383def SPV_BI_SecondaryPositionNV : I32EnumAttrCase<"SecondaryPositionNV", 5257> { 1384 list<Availability> availability = [ 1385 Extension<[SPV_NV_stereo_view_rendering]>, 1386 Capability<[SPV_C_ShaderStereoViewNV]> 1387 ]; 1388} 1389def SPV_BI_SecondaryViewportMaskNV : I32EnumAttrCase<"SecondaryViewportMaskNV", 5258> { 1390 list<Availability> availability = [ 1391 Extension<[SPV_NV_stereo_view_rendering]>, 1392 Capability<[SPV_C_ShaderStereoViewNV]> 1393 ]; 1394} 1395def SPV_BI_PositionPerViewNV : I32EnumAttrCase<"PositionPerViewNV", 5261> { 1396 list<Availability> availability = [ 1397 Extension<[SPV_NVX_multiview_per_view_attributes, SPV_NV_mesh_shader]>, 1398 Capability<[SPV_C_MeshShadingNV, SPV_C_PerViewAttributesNV]> 1399 ]; 1400} 1401def SPV_BI_ViewportMaskPerViewNV : I32EnumAttrCase<"ViewportMaskPerViewNV", 5262> { 1402 list<Availability> availability = [ 1403 Extension<[SPV_NVX_multiview_per_view_attributes, SPV_NV_mesh_shader]>, 1404 Capability<[SPV_C_MeshShadingNV, SPV_C_PerViewAttributesNV]> 1405 ]; 1406} 1407def SPV_BI_FullyCoveredEXT : I32EnumAttrCase<"FullyCoveredEXT", 5264> { 1408 list<Availability> availability = [ 1409 Extension<[SPV_EXT_fragment_fully_covered]>, 1410 Capability<[SPV_C_FragmentFullyCoveredEXT]> 1411 ]; 1412} 1413def SPV_BI_TaskCountNV : I32EnumAttrCase<"TaskCountNV", 5274> { 1414 list<Availability> availability = [ 1415 Extension<[SPV_NV_mesh_shader]>, 1416 Capability<[SPV_C_MeshShadingNV]> 1417 ]; 1418} 1419def SPV_BI_PrimitiveCountNV : I32EnumAttrCase<"PrimitiveCountNV", 5275> { 1420 list<Availability> availability = [ 1421 Extension<[SPV_NV_mesh_shader]>, 1422 Capability<[SPV_C_MeshShadingNV]> 1423 ]; 1424} 1425def SPV_BI_PrimitiveIndicesNV : I32EnumAttrCase<"PrimitiveIndicesNV", 5276> { 1426 list<Availability> availability = [ 1427 Extension<[SPV_NV_mesh_shader]>, 1428 Capability<[SPV_C_MeshShadingNV]> 1429 ]; 1430} 1431def SPV_BI_ClipDistancePerViewNV : I32EnumAttrCase<"ClipDistancePerViewNV", 5277> { 1432 list<Availability> availability = [ 1433 Extension<[SPV_NV_mesh_shader]>, 1434 Capability<[SPV_C_MeshShadingNV]> 1435 ]; 1436} 1437def SPV_BI_CullDistancePerViewNV : I32EnumAttrCase<"CullDistancePerViewNV", 5278> { 1438 list<Availability> availability = [ 1439 Extension<[SPV_NV_mesh_shader]>, 1440 Capability<[SPV_C_MeshShadingNV]> 1441 ]; 1442} 1443def SPV_BI_LayerPerViewNV : I32EnumAttrCase<"LayerPerViewNV", 5279> { 1444 list<Availability> availability = [ 1445 Extension<[SPV_NV_mesh_shader]>, 1446 Capability<[SPV_C_MeshShadingNV]> 1447 ]; 1448} 1449def SPV_BI_MeshViewCountNV : I32EnumAttrCase<"MeshViewCountNV", 5280> { 1450 list<Availability> availability = [ 1451 Extension<[SPV_NV_mesh_shader]>, 1452 Capability<[SPV_C_MeshShadingNV]> 1453 ]; 1454} 1455def SPV_BI_MeshViewIndicesNV : I32EnumAttrCase<"MeshViewIndicesNV", 5281> { 1456 list<Availability> availability = [ 1457 Extension<[SPV_NV_mesh_shader]>, 1458 Capability<[SPV_C_MeshShadingNV]> 1459 ]; 1460} 1461def SPV_BI_BaryCoordNV : I32EnumAttrCase<"BaryCoordNV", 5286> { 1462 list<Availability> availability = [ 1463 Extension<[SPV_NV_fragment_shader_barycentric]>, 1464 Capability<[SPV_C_FragmentBarycentricNV]> 1465 ]; 1466} 1467def SPV_BI_BaryCoordNoPerspNV : I32EnumAttrCase<"BaryCoordNoPerspNV", 5287> { 1468 list<Availability> availability = [ 1469 Extension<[SPV_NV_fragment_shader_barycentric]>, 1470 Capability<[SPV_C_FragmentBarycentricNV]> 1471 ]; 1472} 1473def SPV_BI_FragSizeEXT : I32EnumAttrCase<"FragSizeEXT", 5292> { 1474 list<Availability> availability = [ 1475 Extension<[SPV_EXT_fragment_invocation_density, SPV_NV_shading_rate]>, 1476 Capability<[SPV_C_FragmentDensityEXT]> 1477 ]; 1478} 1479def SPV_BI_FragInvocationCountEXT : I32EnumAttrCase<"FragInvocationCountEXT", 5293> { 1480 list<Availability> availability = [ 1481 Extension<[SPV_EXT_fragment_invocation_density, SPV_NV_shading_rate]>, 1482 Capability<[SPV_C_FragmentDensityEXT]> 1483 ]; 1484} 1485def SPV_BI_LaunchIdNV : I32EnumAttrCase<"LaunchIdNV", 5319> { 1486 list<Availability> availability = [ 1487 Extension<[SPV_NV_ray_tracing]>, 1488 Capability<[SPV_C_RayTracingNV]> 1489 ]; 1490} 1491def SPV_BI_LaunchSizeNV : I32EnumAttrCase<"LaunchSizeNV", 5320> { 1492 list<Availability> availability = [ 1493 Extension<[SPV_NV_ray_tracing]>, 1494 Capability<[SPV_C_RayTracingNV]> 1495 ]; 1496} 1497def SPV_BI_WorldRayOriginNV : I32EnumAttrCase<"WorldRayOriginNV", 5321> { 1498 list<Availability> availability = [ 1499 Extension<[SPV_NV_ray_tracing]>, 1500 Capability<[SPV_C_RayTracingNV]> 1501 ]; 1502} 1503def SPV_BI_WorldRayDirectionNV : I32EnumAttrCase<"WorldRayDirectionNV", 5322> { 1504 list<Availability> availability = [ 1505 Extension<[SPV_NV_ray_tracing]>, 1506 Capability<[SPV_C_RayTracingNV]> 1507 ]; 1508} 1509def SPV_BI_ObjectRayOriginNV : I32EnumAttrCase<"ObjectRayOriginNV", 5323> { 1510 list<Availability> availability = [ 1511 Extension<[SPV_NV_ray_tracing]>, 1512 Capability<[SPV_C_RayTracingNV]> 1513 ]; 1514} 1515def SPV_BI_ObjectRayDirectionNV : I32EnumAttrCase<"ObjectRayDirectionNV", 5324> { 1516 list<Availability> availability = [ 1517 Extension<[SPV_NV_ray_tracing]>, 1518 Capability<[SPV_C_RayTracingNV]> 1519 ]; 1520} 1521def SPV_BI_RayTminNV : I32EnumAttrCase<"RayTminNV", 5325> { 1522 list<Availability> availability = [ 1523 Extension<[SPV_NV_ray_tracing]>, 1524 Capability<[SPV_C_RayTracingNV]> 1525 ]; 1526} 1527def SPV_BI_RayTmaxNV : I32EnumAttrCase<"RayTmaxNV", 5326> { 1528 list<Availability> availability = [ 1529 Extension<[SPV_NV_ray_tracing]>, 1530 Capability<[SPV_C_RayTracingNV]> 1531 ]; 1532} 1533def SPV_BI_InstanceCustomIndexNV : I32EnumAttrCase<"InstanceCustomIndexNV", 5327> { 1534 list<Availability> availability = [ 1535 Extension<[SPV_NV_ray_tracing]>, 1536 Capability<[SPV_C_RayTracingNV]> 1537 ]; 1538} 1539def SPV_BI_ObjectToWorldNV : I32EnumAttrCase<"ObjectToWorldNV", 5330> { 1540 list<Availability> availability = [ 1541 Extension<[SPV_NV_ray_tracing]>, 1542 Capability<[SPV_C_RayTracingNV]> 1543 ]; 1544} 1545def SPV_BI_WorldToObjectNV : I32EnumAttrCase<"WorldToObjectNV", 5331> { 1546 list<Availability> availability = [ 1547 Extension<[SPV_NV_ray_tracing]>, 1548 Capability<[SPV_C_RayTracingNV]> 1549 ]; 1550} 1551def SPV_BI_HitTNV : I32EnumAttrCase<"HitTNV", 5332> { 1552 list<Availability> availability = [ 1553 Extension<[SPV_NV_ray_tracing]>, 1554 Capability<[SPV_C_RayTracingNV]> 1555 ]; 1556} 1557def SPV_BI_HitKindNV : I32EnumAttrCase<"HitKindNV", 5333> { 1558 list<Availability> availability = [ 1559 Extension<[SPV_NV_ray_tracing]>, 1560 Capability<[SPV_C_RayTracingNV]> 1561 ]; 1562} 1563def SPV_BI_IncomingRayFlagsNV : I32EnumAttrCase<"IncomingRayFlagsNV", 5351> { 1564 list<Availability> availability = [ 1565 Extension<[SPV_NV_ray_tracing]>, 1566 Capability<[SPV_C_RayTracingNV]> 1567 ]; 1568} 1569def SPV_BI_WarpsPerSMNV : I32EnumAttrCase<"WarpsPerSMNV", 5374> { 1570 list<Availability> availability = [ 1571 Extension<[SPV_NV_shader_sm_builtins]>, 1572 Capability<[SPV_C_ShaderSMBuiltinsNV]> 1573 ]; 1574} 1575def SPV_BI_SMCountNV : I32EnumAttrCase<"SMCountNV", 5375> { 1576 list<Availability> availability = [ 1577 Extension<[SPV_NV_shader_sm_builtins]>, 1578 Capability<[SPV_C_ShaderSMBuiltinsNV]> 1579 ]; 1580} 1581def SPV_BI_WarpIDNV : I32EnumAttrCase<"WarpIDNV", 5376> { 1582 list<Availability> availability = [ 1583 Extension<[SPV_NV_shader_sm_builtins]>, 1584 Capability<[SPV_C_ShaderSMBuiltinsNV]> 1585 ]; 1586} 1587def SPV_BI_SMIDNV : I32EnumAttrCase<"SMIDNV", 5377> { 1588 list<Availability> availability = [ 1589 Extension<[SPV_NV_shader_sm_builtins]>, 1590 Capability<[SPV_C_ShaderSMBuiltinsNV]> 1591 ]; 1592} 1593 1594def SPV_BuiltInAttr : 1595 SPV_I32EnumAttr<"BuiltIn", "valid SPIR-V BuiltIn", [ 1596 SPV_BI_Position, SPV_BI_PointSize, SPV_BI_ClipDistance, SPV_BI_CullDistance, 1597 SPV_BI_VertexId, SPV_BI_InstanceId, SPV_BI_PrimitiveId, SPV_BI_InvocationId, 1598 SPV_BI_Layer, SPV_BI_ViewportIndex, SPV_BI_TessLevelOuter, 1599 SPV_BI_TessLevelInner, SPV_BI_TessCoord, SPV_BI_PatchVertices, 1600 SPV_BI_FragCoord, SPV_BI_PointCoord, SPV_BI_FrontFacing, SPV_BI_SampleId, 1601 SPV_BI_SamplePosition, SPV_BI_SampleMask, SPV_BI_FragDepth, 1602 SPV_BI_HelperInvocation, SPV_BI_NumWorkgroups, SPV_BI_WorkgroupSize, 1603 SPV_BI_WorkgroupId, SPV_BI_LocalInvocationId, SPV_BI_GlobalInvocationId, 1604 SPV_BI_LocalInvocationIndex, SPV_BI_WorkDim, SPV_BI_GlobalSize, 1605 SPV_BI_EnqueuedWorkgroupSize, SPV_BI_GlobalOffset, SPV_BI_GlobalLinearId, 1606 SPV_BI_SubgroupSize, SPV_BI_SubgroupMaxSize, SPV_BI_NumSubgroups, 1607 SPV_BI_NumEnqueuedSubgroups, SPV_BI_SubgroupId, 1608 SPV_BI_SubgroupLocalInvocationId, SPV_BI_VertexIndex, SPV_BI_InstanceIndex, 1609 SPV_BI_SubgroupEqMask, SPV_BI_SubgroupGeMask, SPV_BI_SubgroupGtMask, 1610 SPV_BI_SubgroupLeMask, SPV_BI_SubgroupLtMask, SPV_BI_BaseVertex, 1611 SPV_BI_BaseInstance, SPV_BI_DrawIndex, SPV_BI_DeviceIndex, SPV_BI_ViewIndex, 1612 SPV_BI_BaryCoordNoPerspAMD, SPV_BI_BaryCoordNoPerspCentroidAMD, 1613 SPV_BI_BaryCoordNoPerspSampleAMD, SPV_BI_BaryCoordSmoothAMD, 1614 SPV_BI_BaryCoordSmoothCentroidAMD, SPV_BI_BaryCoordSmoothSampleAMD, 1615 SPV_BI_BaryCoordPullModelAMD, SPV_BI_FragStencilRefEXT, SPV_BI_ViewportMaskNV, 1616 SPV_BI_SecondaryPositionNV, SPV_BI_SecondaryViewportMaskNV, 1617 SPV_BI_PositionPerViewNV, SPV_BI_ViewportMaskPerViewNV, SPV_BI_FullyCoveredEXT, 1618 SPV_BI_TaskCountNV, SPV_BI_PrimitiveCountNV, SPV_BI_PrimitiveIndicesNV, 1619 SPV_BI_ClipDistancePerViewNV, SPV_BI_CullDistancePerViewNV, 1620 SPV_BI_LayerPerViewNV, SPV_BI_MeshViewCountNV, SPV_BI_MeshViewIndicesNV, 1621 SPV_BI_BaryCoordNV, SPV_BI_BaryCoordNoPerspNV, SPV_BI_FragSizeEXT, 1622 SPV_BI_FragInvocationCountEXT, SPV_BI_LaunchIdNV, SPV_BI_LaunchSizeNV, 1623 SPV_BI_WorldRayOriginNV, SPV_BI_WorldRayDirectionNV, SPV_BI_ObjectRayOriginNV, 1624 SPV_BI_ObjectRayDirectionNV, SPV_BI_RayTminNV, SPV_BI_RayTmaxNV, 1625 SPV_BI_InstanceCustomIndexNV, SPV_BI_ObjectToWorldNV, SPV_BI_WorldToObjectNV, 1626 SPV_BI_HitTNV, SPV_BI_HitKindNV, SPV_BI_IncomingRayFlagsNV, 1627 SPV_BI_WarpsPerSMNV, SPV_BI_SMCountNV, SPV_BI_WarpIDNV, SPV_BI_SMIDNV 1628 ]>; 1629 1630def SPV_D_RelaxedPrecision : I32EnumAttrCase<"RelaxedPrecision", 0> { 1631 list<Availability> availability = [ 1632 Capability<[SPV_C_Shader]> 1633 ]; 1634} 1635def SPV_D_SpecId : I32EnumAttrCase<"SpecId", 1> { 1636 list<Availability> availability = [ 1637 Capability<[SPV_C_Kernel, SPV_C_Shader]> 1638 ]; 1639} 1640def SPV_D_Block : I32EnumAttrCase<"Block", 2> { 1641 list<Availability> availability = [ 1642 Capability<[SPV_C_Shader]> 1643 ]; 1644} 1645def SPV_D_BufferBlock : I32EnumAttrCase<"BufferBlock", 3> { 1646 list<Availability> availability = [ 1647 MaxVersion<SPV_V_1_3>, 1648 Capability<[SPV_C_Shader]> 1649 ]; 1650} 1651def SPV_D_RowMajor : I32EnumAttrCase<"RowMajor", 4> { 1652 list<Availability> availability = [ 1653 Capability<[SPV_C_Matrix]> 1654 ]; 1655} 1656def SPV_D_ColMajor : I32EnumAttrCase<"ColMajor", 5> { 1657 list<Availability> availability = [ 1658 Capability<[SPV_C_Matrix]> 1659 ]; 1660} 1661def SPV_D_ArrayStride : I32EnumAttrCase<"ArrayStride", 6> { 1662 list<Availability> availability = [ 1663 Capability<[SPV_C_Shader]> 1664 ]; 1665} 1666def SPV_D_MatrixStride : I32EnumAttrCase<"MatrixStride", 7> { 1667 list<Availability> availability = [ 1668 Capability<[SPV_C_Matrix]> 1669 ]; 1670} 1671def SPV_D_GLSLShared : I32EnumAttrCase<"GLSLShared", 8> { 1672 list<Availability> availability = [ 1673 Capability<[SPV_C_Shader]> 1674 ]; 1675} 1676def SPV_D_GLSLPacked : I32EnumAttrCase<"GLSLPacked", 9> { 1677 list<Availability> availability = [ 1678 Capability<[SPV_C_Shader]> 1679 ]; 1680} 1681def SPV_D_CPacked : I32EnumAttrCase<"CPacked", 10> { 1682 list<Availability> availability = [ 1683 Capability<[SPV_C_Kernel]> 1684 ]; 1685} 1686def SPV_D_BuiltIn : I32EnumAttrCase<"BuiltIn", 11>; 1687def SPV_D_NoPerspective : I32EnumAttrCase<"NoPerspective", 13> { 1688 list<Availability> availability = [ 1689 Capability<[SPV_C_Shader]> 1690 ]; 1691} 1692def SPV_D_Flat : I32EnumAttrCase<"Flat", 14> { 1693 list<Availability> availability = [ 1694 Capability<[SPV_C_Shader]> 1695 ]; 1696} 1697def SPV_D_Patch : I32EnumAttrCase<"Patch", 15> { 1698 list<Availability> availability = [ 1699 Capability<[SPV_C_Tessellation]> 1700 ]; 1701} 1702def SPV_D_Centroid : I32EnumAttrCase<"Centroid", 16> { 1703 list<Availability> availability = [ 1704 Capability<[SPV_C_Shader]> 1705 ]; 1706} 1707def SPV_D_Sample : I32EnumAttrCase<"Sample", 17> { 1708 list<Availability> availability = [ 1709 Capability<[SPV_C_SampleRateShading]> 1710 ]; 1711} 1712def SPV_D_Invariant : I32EnumAttrCase<"Invariant", 18> { 1713 list<Availability> availability = [ 1714 Capability<[SPV_C_Shader]> 1715 ]; 1716} 1717def SPV_D_Restrict : I32EnumAttrCase<"Restrict", 19>; 1718def SPV_D_Aliased : I32EnumAttrCase<"Aliased", 20>; 1719def SPV_D_Volatile : I32EnumAttrCase<"Volatile", 21>; 1720def SPV_D_Constant : I32EnumAttrCase<"Constant", 22> { 1721 list<Availability> availability = [ 1722 Capability<[SPV_C_Kernel]> 1723 ]; 1724} 1725def SPV_D_Coherent : I32EnumAttrCase<"Coherent", 23>; 1726def SPV_D_NonWritable : I32EnumAttrCase<"NonWritable", 24>; 1727def SPV_D_NonReadable : I32EnumAttrCase<"NonReadable", 25>; 1728def SPV_D_Uniform : I32EnumAttrCase<"Uniform", 26> { 1729 list<Availability> availability = [ 1730 Capability<[SPV_C_Shader]> 1731 ]; 1732} 1733def SPV_D_UniformId : I32EnumAttrCase<"UniformId", 27> { 1734 list<Availability> availability = [ 1735 MinVersion<SPV_V_1_4>, 1736 Capability<[SPV_C_Shader]> 1737 ]; 1738} 1739def SPV_D_SaturatedConversion : I32EnumAttrCase<"SaturatedConversion", 28> { 1740 list<Availability> availability = [ 1741 Capability<[SPV_C_Kernel]> 1742 ]; 1743} 1744def SPV_D_Stream : I32EnumAttrCase<"Stream", 29> { 1745 list<Availability> availability = [ 1746 Capability<[SPV_C_GeometryStreams]> 1747 ]; 1748} 1749def SPV_D_Location : I32EnumAttrCase<"Location", 30> { 1750 list<Availability> availability = [ 1751 Capability<[SPV_C_Shader]> 1752 ]; 1753} 1754def SPV_D_Component : I32EnumAttrCase<"Component", 31> { 1755 list<Availability> availability = [ 1756 Capability<[SPV_C_Shader]> 1757 ]; 1758} 1759def SPV_D_Index : I32EnumAttrCase<"Index", 32> { 1760 list<Availability> availability = [ 1761 Capability<[SPV_C_Shader]> 1762 ]; 1763} 1764def SPV_D_Binding : I32EnumAttrCase<"Binding", 33> { 1765 list<Availability> availability = [ 1766 Capability<[SPV_C_Shader]> 1767 ]; 1768} 1769def SPV_D_DescriptorSet : I32EnumAttrCase<"DescriptorSet", 34> { 1770 list<Availability> availability = [ 1771 Capability<[SPV_C_Shader]> 1772 ]; 1773} 1774def SPV_D_Offset : I32EnumAttrCase<"Offset", 35> { 1775 list<Availability> availability = [ 1776 Capability<[SPV_C_Shader]> 1777 ]; 1778} 1779def SPV_D_XfbBuffer : I32EnumAttrCase<"XfbBuffer", 36> { 1780 list<Availability> availability = [ 1781 Capability<[SPV_C_TransformFeedback]> 1782 ]; 1783} 1784def SPV_D_XfbStride : I32EnumAttrCase<"XfbStride", 37> { 1785 list<Availability> availability = [ 1786 Capability<[SPV_C_TransformFeedback]> 1787 ]; 1788} 1789def SPV_D_FuncParamAttr : I32EnumAttrCase<"FuncParamAttr", 38> { 1790 list<Availability> availability = [ 1791 Capability<[SPV_C_Kernel]> 1792 ]; 1793} 1794def SPV_D_FPRoundingMode : I32EnumAttrCase<"FPRoundingMode", 39>; 1795def SPV_D_FPFastMathMode : I32EnumAttrCase<"FPFastMathMode", 40> { 1796 list<Availability> availability = [ 1797 Capability<[SPV_C_Kernel]> 1798 ]; 1799} 1800def SPV_D_LinkageAttributes : I32EnumAttrCase<"LinkageAttributes", 41> { 1801 list<Availability> availability = [ 1802 Capability<[SPV_C_Linkage]> 1803 ]; 1804} 1805def SPV_D_NoContraction : I32EnumAttrCase<"NoContraction", 42> { 1806 list<Availability> availability = [ 1807 Capability<[SPV_C_Shader]> 1808 ]; 1809} 1810def SPV_D_InputAttachmentIndex : I32EnumAttrCase<"InputAttachmentIndex", 43> { 1811 list<Availability> availability = [ 1812 Capability<[SPV_C_InputAttachment]> 1813 ]; 1814} 1815def SPV_D_Alignment : I32EnumAttrCase<"Alignment", 44> { 1816 list<Availability> availability = [ 1817 Capability<[SPV_C_Kernel]> 1818 ]; 1819} 1820def SPV_D_MaxByteOffset : I32EnumAttrCase<"MaxByteOffset", 45> { 1821 list<Availability> availability = [ 1822 MinVersion<SPV_V_1_1>, 1823 Capability<[SPV_C_Addresses]> 1824 ]; 1825} 1826def SPV_D_AlignmentId : I32EnumAttrCase<"AlignmentId", 46> { 1827 list<Availability> availability = [ 1828 MinVersion<SPV_V_1_2>, 1829 Capability<[SPV_C_Kernel]> 1830 ]; 1831} 1832def SPV_D_MaxByteOffsetId : I32EnumAttrCase<"MaxByteOffsetId", 47> { 1833 list<Availability> availability = [ 1834 MinVersion<SPV_V_1_2>, 1835 Capability<[SPV_C_Addresses]> 1836 ]; 1837} 1838def SPV_D_NoSignedWrap : I32EnumAttrCase<"NoSignedWrap", 4469> { 1839 list<Availability> availability = [ 1840 Extension<[SPV_KHR_no_integer_wrap_decoration]> 1841 ]; 1842} 1843def SPV_D_NoUnsignedWrap : I32EnumAttrCase<"NoUnsignedWrap", 4470> { 1844 list<Availability> availability = [ 1845 Extension<[SPV_KHR_no_integer_wrap_decoration]> 1846 ]; 1847} 1848def SPV_D_ExplicitInterpAMD : I32EnumAttrCase<"ExplicitInterpAMD", 4999> { 1849 list<Availability> availability = [ 1850 Extension<[SPV_AMD_shader_explicit_vertex_parameter]> 1851 ]; 1852} 1853def SPV_D_OverrideCoverageNV : I32EnumAttrCase<"OverrideCoverageNV", 5248> { 1854 list<Availability> availability = [ 1855 Extension<[SPV_NV_sample_mask_override_coverage]>, 1856 Capability<[SPV_C_SampleMaskOverrideCoverageNV]> 1857 ]; 1858} 1859def SPV_D_PassthroughNV : I32EnumAttrCase<"PassthroughNV", 5250> { 1860 list<Availability> availability = [ 1861 Extension<[SPV_NV_geometry_shader_passthrough]>, 1862 Capability<[SPV_C_GeometryShaderPassthroughNV]> 1863 ]; 1864} 1865def SPV_D_ViewportRelativeNV : I32EnumAttrCase<"ViewportRelativeNV", 5252> { 1866 list<Availability> availability = [ 1867 Capability<[SPV_C_ShaderViewportMaskNV]> 1868 ]; 1869} 1870def SPV_D_SecondaryViewportRelativeNV : I32EnumAttrCase<"SecondaryViewportRelativeNV", 5256> { 1871 list<Availability> availability = [ 1872 Extension<[SPV_NV_stereo_view_rendering]>, 1873 Capability<[SPV_C_ShaderStereoViewNV]> 1874 ]; 1875} 1876def SPV_D_PerPrimitiveNV : I32EnumAttrCase<"PerPrimitiveNV", 5271> { 1877 list<Availability> availability = [ 1878 Extension<[SPV_NV_mesh_shader]>, 1879 Capability<[SPV_C_MeshShadingNV]> 1880 ]; 1881} 1882def SPV_D_PerViewNV : I32EnumAttrCase<"PerViewNV", 5272> { 1883 list<Availability> availability = [ 1884 Extension<[SPV_NV_mesh_shader]>, 1885 Capability<[SPV_C_MeshShadingNV]> 1886 ]; 1887} 1888def SPV_D_PerTaskNV : I32EnumAttrCase<"PerTaskNV", 5273> { 1889 list<Availability> availability = [ 1890 Extension<[SPV_NV_mesh_shader]>, 1891 Capability<[SPV_C_MeshShadingNV]> 1892 ]; 1893} 1894def SPV_D_PerVertexNV : I32EnumAttrCase<"PerVertexNV", 5285> { 1895 list<Availability> availability = [ 1896 Extension<[SPV_NV_fragment_shader_barycentric]>, 1897 Capability<[SPV_C_FragmentBarycentricNV]> 1898 ]; 1899} 1900def SPV_D_NonUniform : I32EnumAttrCase<"NonUniform", 5300> { 1901 list<Availability> availability = [ 1902 MinVersion<SPV_V_1_5>, 1903 Capability<[SPV_C_ShaderNonUniform]> 1904 ]; 1905} 1906def SPV_D_RestrictPointer : I32EnumAttrCase<"RestrictPointer", 5355> { 1907 list<Availability> availability = [ 1908 Extension<[SPV_EXT_physical_storage_buffer, SPV_KHR_physical_storage_buffer]>, 1909 Capability<[SPV_C_PhysicalStorageBufferAddresses]> 1910 ]; 1911} 1912def SPV_D_AliasedPointer : I32EnumAttrCase<"AliasedPointer", 5356> { 1913 list<Availability> availability = [ 1914 Extension<[SPV_EXT_physical_storage_buffer, SPV_KHR_physical_storage_buffer]>, 1915 Capability<[SPV_C_PhysicalStorageBufferAddresses]> 1916 ]; 1917} 1918def SPV_D_CounterBuffer : I32EnumAttrCase<"CounterBuffer", 5634> { 1919 list<Availability> availability = [ 1920 MinVersion<SPV_V_1_4> 1921 ]; 1922} 1923def SPV_D_UserSemantic : I32EnumAttrCase<"UserSemantic", 5635> { 1924 list<Availability> availability = [ 1925 MinVersion<SPV_V_1_4> 1926 ]; 1927} 1928def SPV_D_UserTypeGOOGLE : I32EnumAttrCase<"UserTypeGOOGLE", 5636> { 1929 list<Availability> availability = [ 1930 Extension<[SPV_GOOGLE_user_type]> 1931 ]; 1932} 1933 1934def SPV_DecorationAttr : 1935 SPV_I32EnumAttr<"Decoration", "valid SPIR-V Decoration", [ 1936 SPV_D_RelaxedPrecision, SPV_D_SpecId, SPV_D_Block, SPV_D_BufferBlock, 1937 SPV_D_RowMajor, SPV_D_ColMajor, SPV_D_ArrayStride, SPV_D_MatrixStride, 1938 SPV_D_GLSLShared, SPV_D_GLSLPacked, SPV_D_CPacked, SPV_D_BuiltIn, 1939 SPV_D_NoPerspective, SPV_D_Flat, SPV_D_Patch, SPV_D_Centroid, SPV_D_Sample, 1940 SPV_D_Invariant, SPV_D_Restrict, SPV_D_Aliased, SPV_D_Volatile, SPV_D_Constant, 1941 SPV_D_Coherent, SPV_D_NonWritable, SPV_D_NonReadable, SPV_D_Uniform, 1942 SPV_D_UniformId, SPV_D_SaturatedConversion, SPV_D_Stream, SPV_D_Location, 1943 SPV_D_Component, SPV_D_Index, SPV_D_Binding, SPV_D_DescriptorSet, SPV_D_Offset, 1944 SPV_D_XfbBuffer, SPV_D_XfbStride, SPV_D_FuncParamAttr, SPV_D_FPRoundingMode, 1945 SPV_D_FPFastMathMode, SPV_D_LinkageAttributes, SPV_D_NoContraction, 1946 SPV_D_InputAttachmentIndex, SPV_D_Alignment, SPV_D_MaxByteOffset, 1947 SPV_D_AlignmentId, SPV_D_MaxByteOffsetId, SPV_D_NoSignedWrap, 1948 SPV_D_NoUnsignedWrap, SPV_D_ExplicitInterpAMD, SPV_D_OverrideCoverageNV, 1949 SPV_D_PassthroughNV, SPV_D_ViewportRelativeNV, 1950 SPV_D_SecondaryViewportRelativeNV, SPV_D_PerPrimitiveNV, SPV_D_PerViewNV, 1951 SPV_D_PerTaskNV, SPV_D_PerVertexNV, SPV_D_NonUniform, SPV_D_RestrictPointer, 1952 SPV_D_AliasedPointer, SPV_D_CounterBuffer, SPV_D_UserSemantic, 1953 SPV_D_UserTypeGOOGLE 1954 ]>; 1955 1956def SPV_D_1D : I32EnumAttrCase<"Dim1D", 0> { 1957 list<Availability> availability = [ 1958 Capability<[SPV_C_Image1D, SPV_C_Sampled1D]> 1959 ]; 1960} 1961def SPV_D_2D : I32EnumAttrCase<"Dim2D", 1> { 1962 list<Availability> availability = [ 1963 Capability<[SPV_C_ImageMSArray, SPV_C_Kernel, SPV_C_Shader]> 1964 ]; 1965} 1966def SPV_D_3D : I32EnumAttrCase<"Dim3D", 2>; 1967def SPV_D_Cube : I32EnumAttrCase<"Cube", 3> { 1968 list<Availability> availability = [ 1969 Capability<[SPV_C_ImageCubeArray, SPV_C_Shader]> 1970 ]; 1971} 1972def SPV_D_Rect : I32EnumAttrCase<"Rect", 4> { 1973 list<Availability> availability = [ 1974 Capability<[SPV_C_ImageRect, SPV_C_SampledRect]> 1975 ]; 1976} 1977def SPV_D_Buffer : I32EnumAttrCase<"Buffer", 5> { 1978 list<Availability> availability = [ 1979 Capability<[SPV_C_ImageBuffer, SPV_C_SampledBuffer]> 1980 ]; 1981} 1982def SPV_D_SubpassData : I32EnumAttrCase<"SubpassData", 6> { 1983 list<Availability> availability = [ 1984 Capability<[SPV_C_InputAttachment]> 1985 ]; 1986} 1987 1988def SPV_DimAttr : 1989 SPV_I32EnumAttr<"Dim", "valid SPIR-V Dim", [ 1990 SPV_D_1D, SPV_D_2D, SPV_D_3D, SPV_D_Cube, SPV_D_Rect, SPV_D_Buffer, 1991 SPV_D_SubpassData 1992 ]>; 1993 1994def SPV_EM_Invocations : I32EnumAttrCase<"Invocations", 0> { 1995 list<Availability> availability = [ 1996 Capability<[SPV_C_Geometry]> 1997 ]; 1998} 1999def SPV_EM_SpacingEqual : I32EnumAttrCase<"SpacingEqual", 1> { 2000 list<Availability> availability = [ 2001 Capability<[SPV_C_Tessellation]> 2002 ]; 2003} 2004def SPV_EM_SpacingFractionalEven : I32EnumAttrCase<"SpacingFractionalEven", 2> { 2005 list<Availability> availability = [ 2006 Capability<[SPV_C_Tessellation]> 2007 ]; 2008} 2009def SPV_EM_SpacingFractionalOdd : I32EnumAttrCase<"SpacingFractionalOdd", 3> { 2010 list<Availability> availability = [ 2011 Capability<[SPV_C_Tessellation]> 2012 ]; 2013} 2014def SPV_EM_VertexOrderCw : I32EnumAttrCase<"VertexOrderCw", 4> { 2015 list<Availability> availability = [ 2016 Capability<[SPV_C_Tessellation]> 2017 ]; 2018} 2019def SPV_EM_VertexOrderCcw : I32EnumAttrCase<"VertexOrderCcw", 5> { 2020 list<Availability> availability = [ 2021 Capability<[SPV_C_Tessellation]> 2022 ]; 2023} 2024def SPV_EM_PixelCenterInteger : I32EnumAttrCase<"PixelCenterInteger", 6> { 2025 list<Availability> availability = [ 2026 Capability<[SPV_C_Shader]> 2027 ]; 2028} 2029def SPV_EM_OriginUpperLeft : I32EnumAttrCase<"OriginUpperLeft", 7> { 2030 list<Availability> availability = [ 2031 Capability<[SPV_C_Shader]> 2032 ]; 2033} 2034def SPV_EM_OriginLowerLeft : I32EnumAttrCase<"OriginLowerLeft", 8> { 2035 list<Availability> availability = [ 2036 Capability<[SPV_C_Shader]> 2037 ]; 2038} 2039def SPV_EM_EarlyFragmentTests : I32EnumAttrCase<"EarlyFragmentTests", 9> { 2040 list<Availability> availability = [ 2041 Capability<[SPV_C_Shader]> 2042 ]; 2043} 2044def SPV_EM_PointMode : I32EnumAttrCase<"PointMode", 10> { 2045 list<Availability> availability = [ 2046 Capability<[SPV_C_Tessellation]> 2047 ]; 2048} 2049def SPV_EM_Xfb : I32EnumAttrCase<"Xfb", 11> { 2050 list<Availability> availability = [ 2051 Capability<[SPV_C_TransformFeedback]> 2052 ]; 2053} 2054def SPV_EM_DepthReplacing : I32EnumAttrCase<"DepthReplacing", 12> { 2055 list<Availability> availability = [ 2056 Capability<[SPV_C_Shader]> 2057 ]; 2058} 2059def SPV_EM_DepthGreater : I32EnumAttrCase<"DepthGreater", 14> { 2060 list<Availability> availability = [ 2061 Capability<[SPV_C_Shader]> 2062 ]; 2063} 2064def SPV_EM_DepthLess : I32EnumAttrCase<"DepthLess", 15> { 2065 list<Availability> availability = [ 2066 Capability<[SPV_C_Shader]> 2067 ]; 2068} 2069def SPV_EM_DepthUnchanged : I32EnumAttrCase<"DepthUnchanged", 16> { 2070 list<Availability> availability = [ 2071 Capability<[SPV_C_Shader]> 2072 ]; 2073} 2074def SPV_EM_LocalSize : I32EnumAttrCase<"LocalSize", 17>; 2075def SPV_EM_LocalSizeHint : I32EnumAttrCase<"LocalSizeHint", 18> { 2076 list<Availability> availability = [ 2077 Capability<[SPV_C_Kernel]> 2078 ]; 2079} 2080def SPV_EM_InputPoints : I32EnumAttrCase<"InputPoints", 19> { 2081 list<Availability> availability = [ 2082 Capability<[SPV_C_Geometry]> 2083 ]; 2084} 2085def SPV_EM_InputLines : I32EnumAttrCase<"InputLines", 20> { 2086 list<Availability> availability = [ 2087 Capability<[SPV_C_Geometry]> 2088 ]; 2089} 2090def SPV_EM_InputLinesAdjacency : I32EnumAttrCase<"InputLinesAdjacency", 21> { 2091 list<Availability> availability = [ 2092 Capability<[SPV_C_Geometry]> 2093 ]; 2094} 2095def SPV_EM_Triangles : I32EnumAttrCase<"Triangles", 22> { 2096 list<Availability> availability = [ 2097 Capability<[SPV_C_Geometry, SPV_C_Tessellation]> 2098 ]; 2099} 2100def SPV_EM_InputTrianglesAdjacency : I32EnumAttrCase<"InputTrianglesAdjacency", 23> { 2101 list<Availability> availability = [ 2102 Capability<[SPV_C_Geometry]> 2103 ]; 2104} 2105def SPV_EM_Quads : I32EnumAttrCase<"Quads", 24> { 2106 list<Availability> availability = [ 2107 Capability<[SPV_C_Tessellation]> 2108 ]; 2109} 2110def SPV_EM_Isolines : I32EnumAttrCase<"Isolines", 25> { 2111 list<Availability> availability = [ 2112 Capability<[SPV_C_Tessellation]> 2113 ]; 2114} 2115def SPV_EM_OutputVertices : I32EnumAttrCase<"OutputVertices", 26> { 2116 list<Availability> availability = [ 2117 Capability<[SPV_C_Geometry, SPV_C_MeshShadingNV, SPV_C_Tessellation]> 2118 ]; 2119} 2120def SPV_EM_OutputPoints : I32EnumAttrCase<"OutputPoints", 27> { 2121 list<Availability> availability = [ 2122 Capability<[SPV_C_Geometry, SPV_C_MeshShadingNV]> 2123 ]; 2124} 2125def SPV_EM_OutputLineStrip : I32EnumAttrCase<"OutputLineStrip", 28> { 2126 list<Availability> availability = [ 2127 Capability<[SPV_C_Geometry]> 2128 ]; 2129} 2130def SPV_EM_OutputTriangleStrip : I32EnumAttrCase<"OutputTriangleStrip", 29> { 2131 list<Availability> availability = [ 2132 Capability<[SPV_C_Geometry]> 2133 ]; 2134} 2135def SPV_EM_VecTypeHint : I32EnumAttrCase<"VecTypeHint", 30> { 2136 list<Availability> availability = [ 2137 Capability<[SPV_C_Kernel]> 2138 ]; 2139} 2140def SPV_EM_ContractionOff : I32EnumAttrCase<"ContractionOff", 31> { 2141 list<Availability> availability = [ 2142 Capability<[SPV_C_Kernel]> 2143 ]; 2144} 2145def SPV_EM_Initializer : I32EnumAttrCase<"Initializer", 33> { 2146 list<Availability> availability = [ 2147 MinVersion<SPV_V_1_1>, 2148 Capability<[SPV_C_Kernel]> 2149 ]; 2150} 2151def SPV_EM_Finalizer : I32EnumAttrCase<"Finalizer", 34> { 2152 list<Availability> availability = [ 2153 MinVersion<SPV_V_1_1>, 2154 Capability<[SPV_C_Kernel]> 2155 ]; 2156} 2157def SPV_EM_SubgroupSize : I32EnumAttrCase<"SubgroupSize", 35> { 2158 list<Availability> availability = [ 2159 MinVersion<SPV_V_1_1>, 2160 Capability<[SPV_C_SubgroupDispatch]> 2161 ]; 2162} 2163def SPV_EM_SubgroupsPerWorkgroup : I32EnumAttrCase<"SubgroupsPerWorkgroup", 36> { 2164 list<Availability> availability = [ 2165 MinVersion<SPV_V_1_1>, 2166 Capability<[SPV_C_SubgroupDispatch]> 2167 ]; 2168} 2169def SPV_EM_SubgroupsPerWorkgroupId : I32EnumAttrCase<"SubgroupsPerWorkgroupId", 37> { 2170 list<Availability> availability = [ 2171 MinVersion<SPV_V_1_2>, 2172 Capability<[SPV_C_SubgroupDispatch]> 2173 ]; 2174} 2175def SPV_EM_LocalSizeId : I32EnumAttrCase<"LocalSizeId", 38> { 2176 list<Availability> availability = [ 2177 MinVersion<SPV_V_1_2> 2178 ]; 2179} 2180def SPV_EM_LocalSizeHintId : I32EnumAttrCase<"LocalSizeHintId", 39> { 2181 list<Availability> availability = [ 2182 MinVersion<SPV_V_1_2>, 2183 Capability<[SPV_C_Kernel]> 2184 ]; 2185} 2186def SPV_EM_PostDepthCoverage : I32EnumAttrCase<"PostDepthCoverage", 4446> { 2187 list<Availability> availability = [ 2188 Extension<[SPV_KHR_post_depth_coverage]>, 2189 Capability<[SPV_C_SampleMaskPostDepthCoverage]> 2190 ]; 2191} 2192def SPV_EM_DenormPreserve : I32EnumAttrCase<"DenormPreserve", 4459> { 2193 list<Availability> availability = [ 2194 Extension<[SPV_KHR_float_controls]>, 2195 Capability<[SPV_C_DenormPreserve]> 2196 ]; 2197} 2198def SPV_EM_DenormFlushToZero : I32EnumAttrCase<"DenormFlushToZero", 4460> { 2199 list<Availability> availability = [ 2200 Extension<[SPV_KHR_float_controls]>, 2201 Capability<[SPV_C_DenormFlushToZero]> 2202 ]; 2203} 2204def SPV_EM_SignedZeroInfNanPreserve : I32EnumAttrCase<"SignedZeroInfNanPreserve", 4461> { 2205 list<Availability> availability = [ 2206 Extension<[SPV_KHR_float_controls]>, 2207 Capability<[SPV_C_SignedZeroInfNanPreserve]> 2208 ]; 2209} 2210def SPV_EM_RoundingModeRTE : I32EnumAttrCase<"RoundingModeRTE", 4462> { 2211 list<Availability> availability = [ 2212 Extension<[SPV_KHR_float_controls]>, 2213 Capability<[SPV_C_RoundingModeRTE]> 2214 ]; 2215} 2216def SPV_EM_RoundingModeRTZ : I32EnumAttrCase<"RoundingModeRTZ", 4463> { 2217 list<Availability> availability = [ 2218 Extension<[SPV_KHR_float_controls]>, 2219 Capability<[SPV_C_RoundingModeRTZ]> 2220 ]; 2221} 2222def SPV_EM_StencilRefReplacingEXT : I32EnumAttrCase<"StencilRefReplacingEXT", 5027> { 2223 list<Availability> availability = [ 2224 Extension<[SPV_EXT_shader_stencil_export]>, 2225 Capability<[SPV_C_StencilExportEXT]> 2226 ]; 2227} 2228def SPV_EM_OutputLinesNV : I32EnumAttrCase<"OutputLinesNV", 5269> { 2229 list<Availability> availability = [ 2230 Extension<[SPV_NV_mesh_shader]>, 2231 Capability<[SPV_C_MeshShadingNV]> 2232 ]; 2233} 2234def SPV_EM_OutputPrimitivesNV : I32EnumAttrCase<"OutputPrimitivesNV", 5270> { 2235 list<Availability> availability = [ 2236 Extension<[SPV_NV_mesh_shader]>, 2237 Capability<[SPV_C_MeshShadingNV]> 2238 ]; 2239} 2240def SPV_EM_DerivativeGroupQuadsNV : I32EnumAttrCase<"DerivativeGroupQuadsNV", 5289> { 2241 list<Availability> availability = [ 2242 Extension<[SPV_NV_compute_shader_derivatives]>, 2243 Capability<[SPV_C_ComputeDerivativeGroupQuadsNV]> 2244 ]; 2245} 2246def SPV_EM_DerivativeGroupLinearNV : I32EnumAttrCase<"DerivativeGroupLinearNV", 5290> { 2247 list<Availability> availability = [ 2248 Extension<[SPV_NV_compute_shader_derivatives]>, 2249 Capability<[SPV_C_ComputeDerivativeGroupLinearNV]> 2250 ]; 2251} 2252def SPV_EM_OutputTrianglesNV : I32EnumAttrCase<"OutputTrianglesNV", 5298> { 2253 list<Availability> availability = [ 2254 Extension<[SPV_NV_mesh_shader]>, 2255 Capability<[SPV_C_MeshShadingNV]> 2256 ]; 2257} 2258def SPV_EM_PixelInterlockOrderedEXT : I32EnumAttrCase<"PixelInterlockOrderedEXT", 5366> { 2259 list<Availability> availability = [ 2260 Extension<[SPV_EXT_fragment_shader_interlock]>, 2261 Capability<[SPV_C_FragmentShaderPixelInterlockEXT]> 2262 ]; 2263} 2264def SPV_EM_PixelInterlockUnorderedEXT : I32EnumAttrCase<"PixelInterlockUnorderedEXT", 5367> { 2265 list<Availability> availability = [ 2266 Extension<[SPV_EXT_fragment_shader_interlock]>, 2267 Capability<[SPV_C_FragmentShaderPixelInterlockEXT]> 2268 ]; 2269} 2270def SPV_EM_SampleInterlockOrderedEXT : I32EnumAttrCase<"SampleInterlockOrderedEXT", 5368> { 2271 list<Availability> availability = [ 2272 Extension<[SPV_EXT_fragment_shader_interlock]>, 2273 Capability<[SPV_C_FragmentShaderSampleInterlockEXT]> 2274 ]; 2275} 2276def SPV_EM_SampleInterlockUnorderedEXT : I32EnumAttrCase<"SampleInterlockUnorderedEXT", 5369> { 2277 list<Availability> availability = [ 2278 Extension<[SPV_EXT_fragment_shader_interlock]>, 2279 Capability<[SPV_C_FragmentShaderSampleInterlockEXT]> 2280 ]; 2281} 2282def SPV_EM_ShadingRateInterlockOrderedEXT : I32EnumAttrCase<"ShadingRateInterlockOrderedEXT", 5370> { 2283 list<Availability> availability = [ 2284 Extension<[SPV_EXT_fragment_shader_interlock]>, 2285 Capability<[SPV_C_FragmentShaderShadingRateInterlockEXT]> 2286 ]; 2287} 2288def SPV_EM_ShadingRateInterlockUnorderedEXT : I32EnumAttrCase<"ShadingRateInterlockUnorderedEXT", 5371> { 2289 list<Availability> availability = [ 2290 Extension<[SPV_EXT_fragment_shader_interlock]>, 2291 Capability<[SPV_C_FragmentShaderShadingRateInterlockEXT]> 2292 ]; 2293} 2294 2295def SPV_ExecutionModeAttr : 2296 SPV_I32EnumAttr<"ExecutionMode", "valid SPIR-V ExecutionMode", [ 2297 SPV_EM_Invocations, SPV_EM_SpacingEqual, SPV_EM_SpacingFractionalEven, 2298 SPV_EM_SpacingFractionalOdd, SPV_EM_VertexOrderCw, SPV_EM_VertexOrderCcw, 2299 SPV_EM_PixelCenterInteger, SPV_EM_OriginUpperLeft, SPV_EM_OriginLowerLeft, 2300 SPV_EM_EarlyFragmentTests, SPV_EM_PointMode, SPV_EM_Xfb, SPV_EM_DepthReplacing, 2301 SPV_EM_DepthGreater, SPV_EM_DepthLess, SPV_EM_DepthUnchanged, SPV_EM_LocalSize, 2302 SPV_EM_LocalSizeHint, SPV_EM_InputPoints, SPV_EM_InputLines, 2303 SPV_EM_InputLinesAdjacency, SPV_EM_Triangles, SPV_EM_InputTrianglesAdjacency, 2304 SPV_EM_Quads, SPV_EM_Isolines, SPV_EM_OutputVertices, SPV_EM_OutputPoints, 2305 SPV_EM_OutputLineStrip, SPV_EM_OutputTriangleStrip, SPV_EM_VecTypeHint, 2306 SPV_EM_ContractionOff, SPV_EM_Initializer, SPV_EM_Finalizer, 2307 SPV_EM_SubgroupSize, SPV_EM_SubgroupsPerWorkgroup, 2308 SPV_EM_SubgroupsPerWorkgroupId, SPV_EM_LocalSizeId, SPV_EM_LocalSizeHintId, 2309 SPV_EM_PostDepthCoverage, SPV_EM_DenormPreserve, SPV_EM_DenormFlushToZero, 2310 SPV_EM_SignedZeroInfNanPreserve, SPV_EM_RoundingModeRTE, 2311 SPV_EM_RoundingModeRTZ, SPV_EM_StencilRefReplacingEXT, SPV_EM_OutputLinesNV, 2312 SPV_EM_OutputPrimitivesNV, SPV_EM_DerivativeGroupQuadsNV, 2313 SPV_EM_DerivativeGroupLinearNV, SPV_EM_OutputTrianglesNV, 2314 SPV_EM_PixelInterlockOrderedEXT, SPV_EM_PixelInterlockUnorderedEXT, 2315 SPV_EM_SampleInterlockOrderedEXT, SPV_EM_SampleInterlockUnorderedEXT, 2316 SPV_EM_ShadingRateInterlockOrderedEXT, SPV_EM_ShadingRateInterlockUnorderedEXT 2317 ]>; 2318 2319def SPV_EM_Vertex : I32EnumAttrCase<"Vertex", 0> { 2320 list<Availability> availability = [ 2321 Capability<[SPV_C_Shader]> 2322 ]; 2323} 2324def SPV_EM_TessellationControl : I32EnumAttrCase<"TessellationControl", 1> { 2325 list<Availability> availability = [ 2326 Capability<[SPV_C_Tessellation]> 2327 ]; 2328} 2329def SPV_EM_TessellationEvaluation : I32EnumAttrCase<"TessellationEvaluation", 2> { 2330 list<Availability> availability = [ 2331 Capability<[SPV_C_Tessellation]> 2332 ]; 2333} 2334def SPV_EM_Geometry : I32EnumAttrCase<"Geometry", 3> { 2335 list<Availability> availability = [ 2336 Capability<[SPV_C_Geometry]> 2337 ]; 2338} 2339def SPV_EM_Fragment : I32EnumAttrCase<"Fragment", 4> { 2340 list<Availability> availability = [ 2341 Capability<[SPV_C_Shader]> 2342 ]; 2343} 2344def SPV_EM_GLCompute : I32EnumAttrCase<"GLCompute", 5> { 2345 list<Availability> availability = [ 2346 Capability<[SPV_C_Shader]> 2347 ]; 2348} 2349def SPV_EM_Kernel : I32EnumAttrCase<"Kernel", 6> { 2350 list<Availability> availability = [ 2351 Capability<[SPV_C_Kernel]> 2352 ]; 2353} 2354def SPV_EM_TaskNV : I32EnumAttrCase<"TaskNV", 5267> { 2355 list<Availability> availability = [ 2356 Capability<[SPV_C_MeshShadingNV]> 2357 ]; 2358} 2359def SPV_EM_MeshNV : I32EnumAttrCase<"MeshNV", 5268> { 2360 list<Availability> availability = [ 2361 Capability<[SPV_C_MeshShadingNV]> 2362 ]; 2363} 2364def SPV_EM_RayGenerationNV : I32EnumAttrCase<"RayGenerationNV", 5313> { 2365 list<Availability> availability = [ 2366 Capability<[SPV_C_RayTracingNV]> 2367 ]; 2368} 2369def SPV_EM_IntersectionNV : I32EnumAttrCase<"IntersectionNV", 5314> { 2370 list<Availability> availability = [ 2371 Capability<[SPV_C_RayTracingNV]> 2372 ]; 2373} 2374def SPV_EM_AnyHitNV : I32EnumAttrCase<"AnyHitNV", 5315> { 2375 list<Availability> availability = [ 2376 Capability<[SPV_C_RayTracingNV]> 2377 ]; 2378} 2379def SPV_EM_ClosestHitNV : I32EnumAttrCase<"ClosestHitNV", 5316> { 2380 list<Availability> availability = [ 2381 Capability<[SPV_C_RayTracingNV]> 2382 ]; 2383} 2384def SPV_EM_MissNV : I32EnumAttrCase<"MissNV", 5317> { 2385 list<Availability> availability = [ 2386 Capability<[SPV_C_RayTracingNV]> 2387 ]; 2388} 2389def SPV_EM_CallableNV : I32EnumAttrCase<"CallableNV", 5318> { 2390 list<Availability> availability = [ 2391 Capability<[SPV_C_RayTracingNV]> 2392 ]; 2393} 2394 2395def SPV_ExecutionModelAttr : 2396 SPV_I32EnumAttr<"ExecutionModel", "valid SPIR-V ExecutionModel", [ 2397 SPV_EM_Vertex, SPV_EM_TessellationControl, SPV_EM_TessellationEvaluation, 2398 SPV_EM_Geometry, SPV_EM_Fragment, SPV_EM_GLCompute, SPV_EM_Kernel, 2399 SPV_EM_TaskNV, SPV_EM_MeshNV, SPV_EM_RayGenerationNV, SPV_EM_IntersectionNV, 2400 SPV_EM_AnyHitNV, SPV_EM_ClosestHitNV, SPV_EM_MissNV, SPV_EM_CallableNV 2401 ]>; 2402 2403def SPV_FC_None : BitEnumAttrCase<"None", 0x0000>; 2404def SPV_FC_Inline : BitEnumAttrCase<"Inline", 0x0001>; 2405def SPV_FC_DontInline : BitEnumAttrCase<"DontInline", 0x0002>; 2406def SPV_FC_Pure : BitEnumAttrCase<"Pure", 0x0004>; 2407def SPV_FC_Const : BitEnumAttrCase<"Const", 0x0008>; 2408 2409def SPV_FunctionControlAttr : 2410 SPV_BitEnumAttr<"FunctionControl", "valid SPIR-V FunctionControl", [ 2411 SPV_FC_None, SPV_FC_Inline, SPV_FC_DontInline, SPV_FC_Pure, SPV_FC_Const 2412 ]>; 2413 2414def SPV_GO_Reduce : I32EnumAttrCase<"Reduce", 0> { 2415 list<Availability> availability = [ 2416 Capability<[SPV_C_GroupNonUniformArithmetic, SPV_C_GroupNonUniformBallot, SPV_C_Kernel]> 2417 ]; 2418} 2419def SPV_GO_InclusiveScan : I32EnumAttrCase<"InclusiveScan", 1> { 2420 list<Availability> availability = [ 2421 Capability<[SPV_C_GroupNonUniformArithmetic, SPV_C_GroupNonUniformBallot, SPV_C_Kernel]> 2422 ]; 2423} 2424def SPV_GO_ExclusiveScan : I32EnumAttrCase<"ExclusiveScan", 2> { 2425 list<Availability> availability = [ 2426 Capability<[SPV_C_GroupNonUniformArithmetic, SPV_C_GroupNonUniformBallot, SPV_C_Kernel]> 2427 ]; 2428} 2429def SPV_GO_ClusteredReduce : I32EnumAttrCase<"ClusteredReduce", 3> { 2430 list<Availability> availability = [ 2431 MinVersion<SPV_V_1_3>, 2432 Capability<[SPV_C_GroupNonUniformClustered]> 2433 ]; 2434} 2435def SPV_GO_PartitionedReduceNV : I32EnumAttrCase<"PartitionedReduceNV", 6> { 2436 list<Availability> availability = [ 2437 Extension<[SPV_NV_shader_subgroup_partitioned]>, 2438 Capability<[SPV_C_GroupNonUniformPartitionedNV]> 2439 ]; 2440} 2441def SPV_GO_PartitionedInclusiveScanNV : I32EnumAttrCase<"PartitionedInclusiveScanNV", 7> { 2442 list<Availability> availability = [ 2443 Extension<[SPV_NV_shader_subgroup_partitioned]>, 2444 Capability<[SPV_C_GroupNonUniformPartitionedNV]> 2445 ]; 2446} 2447def SPV_GO_PartitionedExclusiveScanNV : I32EnumAttrCase<"PartitionedExclusiveScanNV", 8> { 2448 list<Availability> availability = [ 2449 Extension<[SPV_NV_shader_subgroup_partitioned]>, 2450 Capability<[SPV_C_GroupNonUniformPartitionedNV]> 2451 ]; 2452} 2453 2454def SPV_GroupOperationAttr : 2455 SPV_I32EnumAttr<"GroupOperation", "valid SPIR-V GroupOperation", [ 2456 SPV_GO_Reduce, SPV_GO_InclusiveScan, SPV_GO_ExclusiveScan, 2457 SPV_GO_ClusteredReduce, SPV_GO_PartitionedReduceNV, 2458 SPV_GO_PartitionedInclusiveScanNV, SPV_GO_PartitionedExclusiveScanNV 2459 ]>; 2460 2461def SPV_IF_Unknown : I32EnumAttrCase<"Unknown", 0>; 2462def SPV_IF_Rgba32f : I32EnumAttrCase<"Rgba32f", 1> { 2463 list<Availability> availability = [ 2464 Capability<[SPV_C_Shader]> 2465 ]; 2466} 2467def SPV_IF_Rgba16f : I32EnumAttrCase<"Rgba16f", 2> { 2468 list<Availability> availability = [ 2469 Capability<[SPV_C_Shader]> 2470 ]; 2471} 2472def SPV_IF_R32f : I32EnumAttrCase<"R32f", 3> { 2473 list<Availability> availability = [ 2474 Capability<[SPV_C_Shader]> 2475 ]; 2476} 2477def SPV_IF_Rgba8 : I32EnumAttrCase<"Rgba8", 4> { 2478 list<Availability> availability = [ 2479 Capability<[SPV_C_Shader]> 2480 ]; 2481} 2482def SPV_IF_Rgba8Snorm : I32EnumAttrCase<"Rgba8Snorm", 5> { 2483 list<Availability> availability = [ 2484 Capability<[SPV_C_Shader]> 2485 ]; 2486} 2487def SPV_IF_Rg32f : I32EnumAttrCase<"Rg32f", 6> { 2488 list<Availability> availability = [ 2489 Capability<[SPV_C_StorageImageExtendedFormats]> 2490 ]; 2491} 2492def SPV_IF_Rg16f : I32EnumAttrCase<"Rg16f", 7> { 2493 list<Availability> availability = [ 2494 Capability<[SPV_C_StorageImageExtendedFormats]> 2495 ]; 2496} 2497def SPV_IF_R11fG11fB10f : I32EnumAttrCase<"R11fG11fB10f", 8> { 2498 list<Availability> availability = [ 2499 Capability<[SPV_C_StorageImageExtendedFormats]> 2500 ]; 2501} 2502def SPV_IF_R16f : I32EnumAttrCase<"R16f", 9> { 2503 list<Availability> availability = [ 2504 Capability<[SPV_C_StorageImageExtendedFormats]> 2505 ]; 2506} 2507def SPV_IF_Rgba16 : I32EnumAttrCase<"Rgba16", 10> { 2508 list<Availability> availability = [ 2509 Capability<[SPV_C_StorageImageExtendedFormats]> 2510 ]; 2511} 2512def SPV_IF_Rgb10A2 : I32EnumAttrCase<"Rgb10A2", 11> { 2513 list<Availability> availability = [ 2514 Capability<[SPV_C_StorageImageExtendedFormats]> 2515 ]; 2516} 2517def SPV_IF_Rg16 : I32EnumAttrCase<"Rg16", 12> { 2518 list<Availability> availability = [ 2519 Capability<[SPV_C_StorageImageExtendedFormats]> 2520 ]; 2521} 2522def SPV_IF_Rg8 : I32EnumAttrCase<"Rg8", 13> { 2523 list<Availability> availability = [ 2524 Capability<[SPV_C_StorageImageExtendedFormats]> 2525 ]; 2526} 2527def SPV_IF_R16 : I32EnumAttrCase<"R16", 14> { 2528 list<Availability> availability = [ 2529 Capability<[SPV_C_StorageImageExtendedFormats]> 2530 ]; 2531} 2532def SPV_IF_R8 : I32EnumAttrCase<"R8", 15> { 2533 list<Availability> availability = [ 2534 Capability<[SPV_C_StorageImageExtendedFormats]> 2535 ]; 2536} 2537def SPV_IF_Rgba16Snorm : I32EnumAttrCase<"Rgba16Snorm", 16> { 2538 list<Availability> availability = [ 2539 Capability<[SPV_C_StorageImageExtendedFormats]> 2540 ]; 2541} 2542def SPV_IF_Rg16Snorm : I32EnumAttrCase<"Rg16Snorm", 17> { 2543 list<Availability> availability = [ 2544 Capability<[SPV_C_StorageImageExtendedFormats]> 2545 ]; 2546} 2547def SPV_IF_Rg8Snorm : I32EnumAttrCase<"Rg8Snorm", 18> { 2548 list<Availability> availability = [ 2549 Capability<[SPV_C_StorageImageExtendedFormats]> 2550 ]; 2551} 2552def SPV_IF_R16Snorm : I32EnumAttrCase<"R16Snorm", 19> { 2553 list<Availability> availability = [ 2554 Capability<[SPV_C_StorageImageExtendedFormats]> 2555 ]; 2556} 2557def SPV_IF_R8Snorm : I32EnumAttrCase<"R8Snorm", 20> { 2558 list<Availability> availability = [ 2559 Capability<[SPV_C_StorageImageExtendedFormats]> 2560 ]; 2561} 2562def SPV_IF_Rgba32i : I32EnumAttrCase<"Rgba32i", 21> { 2563 list<Availability> availability = [ 2564 Capability<[SPV_C_Shader]> 2565 ]; 2566} 2567def SPV_IF_Rgba16i : I32EnumAttrCase<"Rgba16i", 22> { 2568 list<Availability> availability = [ 2569 Capability<[SPV_C_Shader]> 2570 ]; 2571} 2572def SPV_IF_Rgba8i : I32EnumAttrCase<"Rgba8i", 23> { 2573 list<Availability> availability = [ 2574 Capability<[SPV_C_Shader]> 2575 ]; 2576} 2577def SPV_IF_R32i : I32EnumAttrCase<"R32i", 24> { 2578 list<Availability> availability = [ 2579 Capability<[SPV_C_Shader]> 2580 ]; 2581} 2582def SPV_IF_Rg32i : I32EnumAttrCase<"Rg32i", 25> { 2583 list<Availability> availability = [ 2584 Capability<[SPV_C_StorageImageExtendedFormats]> 2585 ]; 2586} 2587def SPV_IF_Rg16i : I32EnumAttrCase<"Rg16i", 26> { 2588 list<Availability> availability = [ 2589 Capability<[SPV_C_StorageImageExtendedFormats]> 2590 ]; 2591} 2592def SPV_IF_Rg8i : I32EnumAttrCase<"Rg8i", 27> { 2593 list<Availability> availability = [ 2594 Capability<[SPV_C_StorageImageExtendedFormats]> 2595 ]; 2596} 2597def SPV_IF_R16i : I32EnumAttrCase<"R16i", 28> { 2598 list<Availability> availability = [ 2599 Capability<[SPV_C_StorageImageExtendedFormats]> 2600 ]; 2601} 2602def SPV_IF_R8i : I32EnumAttrCase<"R8i", 29> { 2603 list<Availability> availability = [ 2604 Capability<[SPV_C_StorageImageExtendedFormats]> 2605 ]; 2606} 2607def SPV_IF_Rgba32ui : I32EnumAttrCase<"Rgba32ui", 30> { 2608 list<Availability> availability = [ 2609 Capability<[SPV_C_Shader]> 2610 ]; 2611} 2612def SPV_IF_Rgba16ui : I32EnumAttrCase<"Rgba16ui", 31> { 2613 list<Availability> availability = [ 2614 Capability<[SPV_C_Shader]> 2615 ]; 2616} 2617def SPV_IF_Rgba8ui : I32EnumAttrCase<"Rgba8ui", 32> { 2618 list<Availability> availability = [ 2619 Capability<[SPV_C_Shader]> 2620 ]; 2621} 2622def SPV_IF_R32ui : I32EnumAttrCase<"R32ui", 33> { 2623 list<Availability> availability = [ 2624 Capability<[SPV_C_Shader]> 2625 ]; 2626} 2627def SPV_IF_Rgb10a2ui : I32EnumAttrCase<"Rgb10a2ui", 34> { 2628 list<Availability> availability = [ 2629 Capability<[SPV_C_StorageImageExtendedFormats]> 2630 ]; 2631} 2632def SPV_IF_Rg32ui : I32EnumAttrCase<"Rg32ui", 35> { 2633 list<Availability> availability = [ 2634 Capability<[SPV_C_StorageImageExtendedFormats]> 2635 ]; 2636} 2637def SPV_IF_Rg16ui : I32EnumAttrCase<"Rg16ui", 36> { 2638 list<Availability> availability = [ 2639 Capability<[SPV_C_StorageImageExtendedFormats]> 2640 ]; 2641} 2642def SPV_IF_Rg8ui : I32EnumAttrCase<"Rg8ui", 37> { 2643 list<Availability> availability = [ 2644 Capability<[SPV_C_StorageImageExtendedFormats]> 2645 ]; 2646} 2647def SPV_IF_R16ui : I32EnumAttrCase<"R16ui", 38> { 2648 list<Availability> availability = [ 2649 Capability<[SPV_C_StorageImageExtendedFormats]> 2650 ]; 2651} 2652def SPV_IF_R8ui : I32EnumAttrCase<"R8ui", 39> { 2653 list<Availability> availability = [ 2654 Capability<[SPV_C_StorageImageExtendedFormats]> 2655 ]; 2656} 2657 2658def SPV_ImageFormatAttr : 2659 SPV_I32EnumAttr<"ImageFormat", "valid SPIR-V ImageFormat", [ 2660 SPV_IF_Unknown, SPV_IF_Rgba32f, SPV_IF_Rgba16f, SPV_IF_R32f, SPV_IF_Rgba8, 2661 SPV_IF_Rgba8Snorm, SPV_IF_Rg32f, SPV_IF_Rg16f, SPV_IF_R11fG11fB10f, 2662 SPV_IF_R16f, SPV_IF_Rgba16, SPV_IF_Rgb10A2, SPV_IF_Rg16, SPV_IF_Rg8, 2663 SPV_IF_R16, SPV_IF_R8, SPV_IF_Rgba16Snorm, SPV_IF_Rg16Snorm, SPV_IF_Rg8Snorm, 2664 SPV_IF_R16Snorm, SPV_IF_R8Snorm, SPV_IF_Rgba32i, SPV_IF_Rgba16i, SPV_IF_Rgba8i, 2665 SPV_IF_R32i, SPV_IF_Rg32i, SPV_IF_Rg16i, SPV_IF_Rg8i, SPV_IF_R16i, SPV_IF_R8i, 2666 SPV_IF_Rgba32ui, SPV_IF_Rgba16ui, SPV_IF_Rgba8ui, SPV_IF_R32ui, 2667 SPV_IF_Rgb10a2ui, SPV_IF_Rg32ui, SPV_IF_Rg16ui, SPV_IF_Rg8ui, SPV_IF_R16ui, 2668 SPV_IF_R8ui 2669 ]>; 2670 2671def SPV_LT_Export : I32EnumAttrCase<"Export", 0> { 2672 list<Availability> availability = [ 2673 Capability<[SPV_C_Linkage]> 2674 ]; 2675} 2676def SPV_LT_Import : I32EnumAttrCase<"Import", 1> { 2677 list<Availability> availability = [ 2678 Capability<[SPV_C_Linkage]> 2679 ]; 2680} 2681 2682def SPV_LinkageTypeAttr : 2683 SPV_I32EnumAttr<"LinkageType", "valid SPIR-V LinkageType", [ 2684 SPV_LT_Export, SPV_LT_Import 2685 ]>; 2686 2687def SPV_LC_None : BitEnumAttrCase<"None", 0x0000>; 2688def SPV_LC_Unroll : BitEnumAttrCase<"Unroll", 0x0001>; 2689def SPV_LC_DontUnroll : BitEnumAttrCase<"DontUnroll", 0x0002>; 2690def SPV_LC_DependencyInfinite : BitEnumAttrCase<"DependencyInfinite", 0x0004> { 2691 list<Availability> availability = [ 2692 MinVersion<SPV_V_1_1> 2693 ]; 2694} 2695def SPV_LC_DependencyLength : BitEnumAttrCase<"DependencyLength", 0x0008> { 2696 list<Availability> availability = [ 2697 MinVersion<SPV_V_1_1> 2698 ]; 2699} 2700def SPV_LC_MinIterations : BitEnumAttrCase<"MinIterations", 0x0010> { 2701 list<Availability> availability = [ 2702 MinVersion<SPV_V_1_4> 2703 ]; 2704} 2705def SPV_LC_MaxIterations : BitEnumAttrCase<"MaxIterations", 0x0020> { 2706 list<Availability> availability = [ 2707 MinVersion<SPV_V_1_4> 2708 ]; 2709} 2710def SPV_LC_IterationMultiple : BitEnumAttrCase<"IterationMultiple", 0x0040> { 2711 list<Availability> availability = [ 2712 MinVersion<SPV_V_1_4> 2713 ]; 2714} 2715def SPV_LC_PeelCount : BitEnumAttrCase<"PeelCount", 0x0080> { 2716 list<Availability> availability = [ 2717 MinVersion<SPV_V_1_4> 2718 ]; 2719} 2720def SPV_LC_PartialCount : BitEnumAttrCase<"PartialCount", 0x0100> { 2721 list<Availability> availability = [ 2722 MinVersion<SPV_V_1_4> 2723 ]; 2724} 2725 2726def SPV_LoopControlAttr : 2727 SPV_BitEnumAttr<"LoopControl", "valid SPIR-V LoopControl", [ 2728 SPV_LC_None, SPV_LC_Unroll, SPV_LC_DontUnroll, SPV_LC_DependencyInfinite, 2729 SPV_LC_DependencyLength, SPV_LC_MinIterations, SPV_LC_MaxIterations, 2730 SPV_LC_IterationMultiple, SPV_LC_PeelCount, SPV_LC_PartialCount 2731 ]>; 2732 2733def SPV_MA_None : BitEnumAttrCase<"None", 0x0000>; 2734def SPV_MA_Volatile : BitEnumAttrCase<"Volatile", 0x0001>; 2735def SPV_MA_Aligned : BitEnumAttrCase<"Aligned", 0x0002>; 2736def SPV_MA_Nontemporal : BitEnumAttrCase<"Nontemporal", 0x0004>; 2737def SPV_MA_MakePointerAvailable : BitEnumAttrCase<"MakePointerAvailable", 0x0008> { 2738 list<Availability> availability = [ 2739 MinVersion<SPV_V_1_5>, 2740 Capability<[SPV_C_VulkanMemoryModel]> 2741 ]; 2742} 2743def SPV_MA_MakePointerVisible : BitEnumAttrCase<"MakePointerVisible", 0x0010> { 2744 list<Availability> availability = [ 2745 MinVersion<SPV_V_1_5>, 2746 Capability<[SPV_C_VulkanMemoryModel]> 2747 ]; 2748} 2749def SPV_MA_NonPrivatePointer : BitEnumAttrCase<"NonPrivatePointer", 0x0020> { 2750 list<Availability> availability = [ 2751 MinVersion<SPV_V_1_5>, 2752 Capability<[SPV_C_VulkanMemoryModel]> 2753 ]; 2754} 2755 2756def SPV_MemoryAccessAttr : 2757 SPV_BitEnumAttr<"MemoryAccess", "valid SPIR-V MemoryAccess", [ 2758 SPV_MA_None, SPV_MA_Volatile, SPV_MA_Aligned, SPV_MA_Nontemporal, 2759 SPV_MA_MakePointerAvailable, SPV_MA_MakePointerVisible, 2760 SPV_MA_NonPrivatePointer 2761 ]>; 2762 2763def SPV_MM_Simple : I32EnumAttrCase<"Simple", 0> { 2764 list<Availability> availability = [ 2765 Capability<[SPV_C_Shader]> 2766 ]; 2767} 2768def SPV_MM_GLSL450 : I32EnumAttrCase<"GLSL450", 1> { 2769 list<Availability> availability = [ 2770 Capability<[SPV_C_Shader]> 2771 ]; 2772} 2773def SPV_MM_OpenCL : I32EnumAttrCase<"OpenCL", 2> { 2774 list<Availability> availability = [ 2775 Capability<[SPV_C_Kernel]> 2776 ]; 2777} 2778def SPV_MM_Vulkan : I32EnumAttrCase<"Vulkan", 3> { 2779 list<Availability> availability = [ 2780 Extension<[SPV_KHR_vulkan_memory_model]>, 2781 Capability<[SPV_C_VulkanMemoryModel]> 2782 ]; 2783} 2784 2785def SPV_MemoryModelAttr : 2786 SPV_I32EnumAttr<"MemoryModel", "valid SPIR-V MemoryModel", [ 2787 SPV_MM_Simple, SPV_MM_GLSL450, SPV_MM_OpenCL, SPV_MM_Vulkan 2788 ]>; 2789 2790def SPV_MS_None : BitEnumAttrCase<"None", 0x0000>; 2791def SPV_MS_Acquire : BitEnumAttrCase<"Acquire", 0x0002>; 2792def SPV_MS_Release : BitEnumAttrCase<"Release", 0x0004>; 2793def SPV_MS_AcquireRelease : BitEnumAttrCase<"AcquireRelease", 0x0008>; 2794def SPV_MS_SequentiallyConsistent : BitEnumAttrCase<"SequentiallyConsistent", 0x0010>; 2795def SPV_MS_UniformMemory : BitEnumAttrCase<"UniformMemory", 0x0040> { 2796 list<Availability> availability = [ 2797 Capability<[SPV_C_Shader]> 2798 ]; 2799} 2800def SPV_MS_SubgroupMemory : BitEnumAttrCase<"SubgroupMemory", 0x0080>; 2801def SPV_MS_WorkgroupMemory : BitEnumAttrCase<"WorkgroupMemory", 0x0100>; 2802def SPV_MS_CrossWorkgroupMemory : BitEnumAttrCase<"CrossWorkgroupMemory", 0x0200>; 2803def SPV_MS_AtomicCounterMemory : BitEnumAttrCase<"AtomicCounterMemory", 0x0400> { 2804 list<Availability> availability = [ 2805 Capability<[SPV_C_AtomicStorage]> 2806 ]; 2807} 2808def SPV_MS_ImageMemory : BitEnumAttrCase<"ImageMemory", 0x0800>; 2809def SPV_MS_OutputMemory : BitEnumAttrCase<"OutputMemory", 0x1000> { 2810 list<Availability> availability = [ 2811 MinVersion<SPV_V_1_5>, 2812 Capability<[SPV_C_VulkanMemoryModel]> 2813 ]; 2814} 2815def SPV_MS_MakeAvailable : BitEnumAttrCase<"MakeAvailable", 0x2000> { 2816 list<Availability> availability = [ 2817 MinVersion<SPV_V_1_5>, 2818 Capability<[SPV_C_VulkanMemoryModel]> 2819 ]; 2820} 2821def SPV_MS_MakeVisible : BitEnumAttrCase<"MakeVisible", 0x4000> { 2822 list<Availability> availability = [ 2823 MinVersion<SPV_V_1_5>, 2824 Capability<[SPV_C_VulkanMemoryModel]> 2825 ]; 2826} 2827def SPV_MS_Volatile : BitEnumAttrCase<"Volatile", 0x8000> { 2828 list<Availability> availability = [ 2829 Extension<[SPV_KHR_vulkan_memory_model]>, 2830 Capability<[SPV_C_VulkanMemoryModel]> 2831 ]; 2832} 2833 2834def SPV_MemorySemanticsAttr : 2835 SPV_BitEnumAttr<"MemorySemantics", "valid SPIR-V MemorySemantics", [ 2836 SPV_MS_None, SPV_MS_Acquire, SPV_MS_Release, SPV_MS_AcquireRelease, 2837 SPV_MS_SequentiallyConsistent, SPV_MS_UniformMemory, SPV_MS_SubgroupMemory, 2838 SPV_MS_WorkgroupMemory, SPV_MS_CrossWorkgroupMemory, 2839 SPV_MS_AtomicCounterMemory, SPV_MS_ImageMemory, SPV_MS_OutputMemory, 2840 SPV_MS_MakeAvailable, SPV_MS_MakeVisible, SPV_MS_Volatile 2841 ]>; 2842 2843def SPV_S_CrossDevice : I32EnumAttrCase<"CrossDevice", 0>; 2844def SPV_S_Device : I32EnumAttrCase<"Device", 1>; 2845def SPV_S_Workgroup : I32EnumAttrCase<"Workgroup", 2>; 2846def SPV_S_Subgroup : I32EnumAttrCase<"Subgroup", 3>; 2847def SPV_S_Invocation : I32EnumAttrCase<"Invocation", 4>; 2848def SPV_S_QueueFamily : I32EnumAttrCase<"QueueFamily", 5> { 2849 list<Availability> availability = [ 2850 MinVersion<SPV_V_1_5>, 2851 Capability<[SPV_C_VulkanMemoryModel]> 2852 ]; 2853} 2854 2855def SPV_ScopeAttr : 2856 SPV_I32EnumAttr<"Scope", "valid SPIR-V Scope", [ 2857 SPV_S_CrossDevice, SPV_S_Device, SPV_S_Workgroup, SPV_S_Subgroup, 2858 SPV_S_Invocation, SPV_S_QueueFamily 2859 ]>; 2860 2861def SPV_SC_None : BitEnumAttrCase<"None", 0x0000>; 2862def SPV_SC_Flatten : BitEnumAttrCase<"Flatten", 0x0001>; 2863def SPV_SC_DontFlatten : BitEnumAttrCase<"DontFlatten", 0x0002>; 2864 2865def SPV_SelectionControlAttr : 2866 SPV_BitEnumAttr<"SelectionControl", "valid SPIR-V SelectionControl", [ 2867 SPV_SC_None, SPV_SC_Flatten, SPV_SC_DontFlatten 2868 ]>; 2869 2870def SPV_SC_UniformConstant : I32EnumAttrCase<"UniformConstant", 0>; 2871def SPV_SC_Input : I32EnumAttrCase<"Input", 1>; 2872def SPV_SC_Uniform : I32EnumAttrCase<"Uniform", 2> { 2873 list<Availability> availability = [ 2874 Capability<[SPV_C_Shader]> 2875 ]; 2876} 2877def SPV_SC_Output : I32EnumAttrCase<"Output", 3> { 2878 list<Availability> availability = [ 2879 Capability<[SPV_C_Shader]> 2880 ]; 2881} 2882def SPV_SC_Workgroup : I32EnumAttrCase<"Workgroup", 4>; 2883def SPV_SC_CrossWorkgroup : I32EnumAttrCase<"CrossWorkgroup", 5>; 2884def SPV_SC_Private : I32EnumAttrCase<"Private", 6> { 2885 list<Availability> availability = [ 2886 Capability<[SPV_C_Shader]> 2887 ]; 2888} 2889def SPV_SC_Function : I32EnumAttrCase<"Function", 7>; 2890def SPV_SC_Generic : I32EnumAttrCase<"Generic", 8> { 2891 list<Availability> availability = [ 2892 Capability<[SPV_C_GenericPointer]> 2893 ]; 2894} 2895def SPV_SC_PushConstant : I32EnumAttrCase<"PushConstant", 9> { 2896 list<Availability> availability = [ 2897 Capability<[SPV_C_Shader]> 2898 ]; 2899} 2900def SPV_SC_AtomicCounter : I32EnumAttrCase<"AtomicCounter", 10> { 2901 list<Availability> availability = [ 2902 Capability<[SPV_C_AtomicStorage]> 2903 ]; 2904} 2905def SPV_SC_Image : I32EnumAttrCase<"Image", 11>; 2906def SPV_SC_StorageBuffer : I32EnumAttrCase<"StorageBuffer", 12> { 2907 list<Availability> availability = [ 2908 Extension<[SPV_KHR_storage_buffer_storage_class, SPV_KHR_variable_pointers]>, 2909 Capability<[SPV_C_Shader]> 2910 ]; 2911} 2912def SPV_SC_CallableDataNV : I32EnumAttrCase<"CallableDataNV", 5328> { 2913 list<Availability> availability = [ 2914 Extension<[SPV_NV_ray_tracing]>, 2915 Capability<[SPV_C_RayTracingNV]> 2916 ]; 2917} 2918def SPV_SC_IncomingCallableDataNV : I32EnumAttrCase<"IncomingCallableDataNV", 5329> { 2919 list<Availability> availability = [ 2920 Extension<[SPV_NV_ray_tracing]>, 2921 Capability<[SPV_C_RayTracingNV]> 2922 ]; 2923} 2924def SPV_SC_RayPayloadNV : I32EnumAttrCase<"RayPayloadNV", 5338> { 2925 list<Availability> availability = [ 2926 Extension<[SPV_NV_ray_tracing]>, 2927 Capability<[SPV_C_RayTracingNV]> 2928 ]; 2929} 2930def SPV_SC_HitAttributeNV : I32EnumAttrCase<"HitAttributeNV", 5339> { 2931 list<Availability> availability = [ 2932 Extension<[SPV_NV_ray_tracing]>, 2933 Capability<[SPV_C_RayTracingNV]> 2934 ]; 2935} 2936def SPV_SC_IncomingRayPayloadNV : I32EnumAttrCase<"IncomingRayPayloadNV", 5342> { 2937 list<Availability> availability = [ 2938 Extension<[SPV_NV_ray_tracing]>, 2939 Capability<[SPV_C_RayTracingNV]> 2940 ]; 2941} 2942def SPV_SC_ShaderRecordBufferNV : I32EnumAttrCase<"ShaderRecordBufferNV", 5343> { 2943 list<Availability> availability = [ 2944 Extension<[SPV_NV_ray_tracing]>, 2945 Capability<[SPV_C_RayTracingNV]> 2946 ]; 2947} 2948def SPV_SC_PhysicalStorageBuffer : I32EnumAttrCase<"PhysicalStorageBuffer", 5349> { 2949 list<Availability> availability = [ 2950 Extension<[SPV_EXT_physical_storage_buffer, SPV_KHR_physical_storage_buffer]>, 2951 Capability<[SPV_C_PhysicalStorageBufferAddresses]> 2952 ]; 2953} 2954 2955def SPV_StorageClassAttr : 2956 SPV_I32EnumAttr<"StorageClass", "valid SPIR-V StorageClass", [ 2957 SPV_SC_UniformConstant, SPV_SC_Input, SPV_SC_Uniform, SPV_SC_Output, 2958 SPV_SC_Workgroup, SPV_SC_CrossWorkgroup, SPV_SC_Private, SPV_SC_Function, 2959 SPV_SC_Generic, SPV_SC_PushConstant, SPV_SC_AtomicCounter, SPV_SC_Image, 2960 SPV_SC_StorageBuffer, SPV_SC_CallableDataNV, SPV_SC_IncomingCallableDataNV, 2961 SPV_SC_RayPayloadNV, SPV_SC_HitAttributeNV, SPV_SC_IncomingRayPayloadNV, 2962 SPV_SC_ShaderRecordBufferNV, SPV_SC_PhysicalStorageBuffer 2963 ]>; 2964 2965// End enum section. Generated from SPIR-V spec; DO NOT MODIFY! 2966 2967// Enums added manually that are not part of SPIR-V spec 2968 2969def SPV_IDI_NoDepth : I32EnumAttrCase<"NoDepth", 0>; 2970def SPV_IDI_IsDepth : I32EnumAttrCase<"IsDepth", 1>; 2971def SPV_IDI_DepthUnknown : I32EnumAttrCase<"DepthUnknown", 2>; 2972 2973def SPV_DepthAttr : 2974 SPV_I32EnumAttr<"ImageDepthInfo", "valid SPIR-V Image Depth specification", 2975 [SPV_IDI_NoDepth, SPV_IDI_IsDepth, SPV_IDI_DepthUnknown]>; 2976 2977def SPV_IAI_NonArrayed : I32EnumAttrCase<"NonArrayed", 0>; 2978def SPV_IAI_Arrayed : I32EnumAttrCase<"Arrayed", 1>; 2979 2980def SPV_ArrayedAttr : 2981 SPV_I32EnumAttr< 2982 "ImageArrayedInfo", "valid SPIR-V Image Arrayed specification", 2983 [SPV_IAI_NonArrayed, SPV_IAI_Arrayed]>; 2984 2985def SPV_ISI_SingleSampled : I32EnumAttrCase<"SingleSampled", 0>; 2986def SPV_ISI_MultiSampled : I32EnumAttrCase<"MultiSampled", 1>; 2987 2988def SPV_SamplingAttr: 2989 SPV_I32EnumAttr< 2990 "ImageSamplingInfo", "valid SPIR-V Image Sampling specification", 2991 [SPV_ISI_SingleSampled, SPV_ISI_MultiSampled]>; 2992 2993def SPV_ISUI_SamplerUnknown : I32EnumAttrCase<"SamplerUnknown", 0>; 2994def SPV_ISUI_NeedSampler : I32EnumAttrCase<"NeedSampler", 1>; 2995def SPV_ISUI_NoSampler : I32EnumAttrCase<"NoSampler", 2>; 2996 2997def SPV_SamplerUseAttr: 2998 SPV_I32EnumAttr< 2999 "ImageSamplerUseInfo", "valid SPIR-V Sampler Use specification", 3000 [SPV_ISUI_SamplerUnknown, SPV_ISUI_NeedSampler, SPV_ISUI_NoSampler]>; 3001 3002//===----------------------------------------------------------------------===// 3003// SPIR-V attribute definitions 3004//===----------------------------------------------------------------------===// 3005 3006def SPV_VerCapExtAttr : DialectAttr< 3007 SPIRV_Dialect, 3008 CPred<"$_self.isa<::mlir::spirv::VerCapExtAttr>()">, 3009 "version-capability-extension attribute"> { 3010 let storageType = "::mlir::spirv::VerCapExtAttr"; 3011 let returnType = "::mlir::spirv::VerCapExtAttr"; 3012 let convertFromStorage = "$_self"; 3013} 3014 3015//===----------------------------------------------------------------------===// 3016// SPIR-V type definitions 3017//===----------------------------------------------------------------------===// 3018 3019class IOrUI<int width> 3020 : Type<Or<[CPred<"$_self.isSignlessInteger(" # width # ")">, 3021 CPred<"$_self.isUnsignedInteger(" # width # ")">]>, 3022 width # "-bit signless/unsigned integer"> { 3023 int bitwidth = width; 3024} 3025 3026class SignlessOrUnsignedIntOfWidths<list<int> widths> : 3027 AnyTypeOf<!foreach(w, widths, IOrUI<w>), 3028 StrJoinInt<widths, "/">.result # "-bit signless/unsigned integer">; 3029 3030def SPV_IsArrayType : CPred<"$_self.isa<::mlir::spirv::ArrayType>()">; 3031def SPV_IsCooperativeMatrixType : 3032 CPred<"$_self.isa<::mlir::spirv::CooperativeMatrixNVType>()">; 3033def SPV_IsMatrixType : CPred<"$_self.isa<::mlir::spirv::MatrixType>()">; 3034def SPV_IsPtrType : CPred<"$_self.isa<::mlir::spirv::PointerType>()">; 3035def SPV_IsRTArrayType : CPred<"$_self.isa<::mlir::spirv::RuntimeArrayType>()">; 3036def SPV_IsStructType : CPred<"$_self.isa<::mlir::spirv::StructType>()">; 3037 3038 3039// See https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#_types 3040// for the definition of the following types and type categories. 3041 3042def SPV_Void : TypeAlias<NoneType, "void">; 3043def SPV_Bool : TypeAlias<I1, "bool">; 3044def SPV_Integer : AnyIntOfWidths<[8, 16, 32, 64]>; 3045def SPV_Int32 : TypeAlias<I32, "Int32">; 3046def SPV_Float : FloatOfWidths<[16, 32, 64]>; 3047def SPV_Float16or32 : FloatOfWidths<[16, 32]>; 3048def SPV_Vector : VectorOfLengthAndType<[2, 3, 4, 8, 16], 3049 [SPV_Bool, SPV_Integer, SPV_Float]>; 3050// Component type check is done in the type parser for the following SPIR-V 3051// dialect-specific types so we use "Any" here. 3052def SPV_AnyPtr : DialectType<SPIRV_Dialect, SPV_IsPtrType, 3053 "any SPIR-V pointer type">; 3054def SPV_AnyArray : DialectType<SPIRV_Dialect, SPV_IsArrayType, 3055 "any SPIR-V array type">; 3056def SPV_AnyCooperativeMatrix : DialectType<SPIRV_Dialect, 3057 SPV_IsCooperativeMatrixType, 3058 "any SPIR-V cooperative matrix type">; 3059def SPV_AnyMatrix : DialectType<SPIRV_Dialect, SPV_IsMatrixType, 3060 "any SPIR-V matrix type">; 3061def SPV_AnyRTArray : DialectType<SPIRV_Dialect, SPV_IsRTArrayType, 3062 "any SPIR-V runtime array type">; 3063def SPV_AnyStruct : DialectType<SPIRV_Dialect, SPV_IsStructType, 3064 "any SPIR-V struct type">; 3065 3066def SPV_Numerical : AnyTypeOf<[SPV_Integer, SPV_Float]>; 3067def SPV_Scalar : AnyTypeOf<[SPV_Numerical, SPV_Bool]>; 3068def SPV_Aggregate : AnyTypeOf<[SPV_AnyArray, SPV_AnyRTArray, SPV_AnyStruct]>; 3069def SPV_Composite : 3070 AnyTypeOf<[SPV_Vector, SPV_AnyArray, SPV_AnyRTArray, SPV_AnyStruct, 3071 SPV_AnyCooperativeMatrix, SPV_AnyMatrix]>; 3072def SPV_Type : AnyTypeOf<[ 3073 SPV_Void, SPV_Bool, SPV_Integer, SPV_Float, SPV_Vector, 3074 SPV_AnyPtr, SPV_AnyArray, SPV_AnyRTArray, SPV_AnyStruct, 3075 SPV_AnyCooperativeMatrix, SPV_AnyMatrix 3076 ]>; 3077 3078def SPV_SignlessOrUnsignedInt : SignlessOrUnsignedIntOfWidths<[8, 16, 32, 64]>; 3079 3080class SPV_CoopMatrixOfType<list<Type> allowedTypes> : 3081 ContainerType<AnyTypeOf<allowedTypes>, SPV_IsCooperativeMatrixType, 3082 "$_self.cast<::mlir::spirv::CooperativeMatrixNVType>().getElementType()", 3083 "Cooperative Matrix">; 3084 3085class SPV_ScalarOrVectorOf<Type type> : 3086 AnyTypeOf<[type, VectorOfLengthAndType<[2, 3, 4, 8, 16], [type]>]>; 3087 3088class SPV_ScalarOrVectorOrCoopMatrixOf<Type type> : 3089 AnyTypeOf<[type, VectorOfLengthAndType<[2, 3, 4, 8, 16], [type]>, 3090 SPV_CoopMatrixOfType<[type]>]>; 3091 3092def SPV_ScalarOrVector : AnyTypeOf<[SPV_Scalar, SPV_Vector]>; 3093def SPV_ScalarOrVectorOrPtr : AnyTypeOf<[SPV_ScalarOrVector, SPV_AnyPtr]>; 3094 3095class SPV_Vec4<Type type> : VectorOfLengthAndType<[4], [type]>; 3096def SPV_IntVec4 : SPV_Vec4<SPV_Integer>; 3097def SPV_IOrUIVec4 : SPV_Vec4<SPV_SignlessOrUnsignedInt>; 3098def SPV_Int32Vec4 : SPV_Vec4<AnyI32>; 3099 3100// TODO: From 1.4, this should also include Composite type. 3101def SPV_SelectType : AnyTypeOf<[SPV_Scalar, SPV_Vector, SPV_AnyPtr]>; 3102 3103//===----------------------------------------------------------------------===// 3104// SPIR-V OpTrait definitions 3105//===----------------------------------------------------------------------===// 3106 3107// Check that an op can only be used within the scope of a function-like op. 3108def InFunctionScope : PredOpTrait< 3109 "op must appear in a function-like op's block", 3110 CPred<"isNestedInFunctionLikeOp($_op.getParentOp())">>; 3111 3112// Check that an op can only be used within the scope of a module-like op. 3113def InModuleScope : PredOpTrait< 3114 "op must appear in a module-like op's block", 3115 CPred<"isDirectInModuleLikeOp($_op.getParentOp())">>; 3116 3117//===----------------------------------------------------------------------===// 3118// SPIR-V opcode specification 3119//===----------------------------------------------------------------------===// 3120 3121class SPV_OpCode<string name, int val> { 3122 // Name used as reference to retrieve the opcode 3123 string opname = name; 3124 3125 // Opcode associated with the name 3126 int opcode = val; 3127} 3128 3129// Begin opcode section. Generated from SPIR-V spec; DO NOT MODIFY! 3130 3131def SPV_OC_OpNop : I32EnumAttrCase<"OpNop", 0>; 3132def SPV_OC_OpUndef : I32EnumAttrCase<"OpUndef", 1>; 3133def SPV_OC_OpSourceContinued : I32EnumAttrCase<"OpSourceContinued", 2>; 3134def SPV_OC_OpSource : I32EnumAttrCase<"OpSource", 3>; 3135def SPV_OC_OpSourceExtension : I32EnumAttrCase<"OpSourceExtension", 4>; 3136def SPV_OC_OpName : I32EnumAttrCase<"OpName", 5>; 3137def SPV_OC_OpMemberName : I32EnumAttrCase<"OpMemberName", 6>; 3138def SPV_OC_OpString : I32EnumAttrCase<"OpString", 7>; 3139def SPV_OC_OpLine : I32EnumAttrCase<"OpLine", 8>; 3140def SPV_OC_OpExtension : I32EnumAttrCase<"OpExtension", 10>; 3141def SPV_OC_OpExtInstImport : I32EnumAttrCase<"OpExtInstImport", 11>; 3142def SPV_OC_OpExtInst : I32EnumAttrCase<"OpExtInst", 12>; 3143def SPV_OC_OpMemoryModel : I32EnumAttrCase<"OpMemoryModel", 14>; 3144def SPV_OC_OpEntryPoint : I32EnumAttrCase<"OpEntryPoint", 15>; 3145def SPV_OC_OpExecutionMode : I32EnumAttrCase<"OpExecutionMode", 16>; 3146def SPV_OC_OpCapability : I32EnumAttrCase<"OpCapability", 17>; 3147def SPV_OC_OpTypeVoid : I32EnumAttrCase<"OpTypeVoid", 19>; 3148def SPV_OC_OpTypeBool : I32EnumAttrCase<"OpTypeBool", 20>; 3149def SPV_OC_OpTypeInt : I32EnumAttrCase<"OpTypeInt", 21>; 3150def SPV_OC_OpTypeFloat : I32EnumAttrCase<"OpTypeFloat", 22>; 3151def SPV_OC_OpTypeVector : I32EnumAttrCase<"OpTypeVector", 23>; 3152def SPV_OC_OpTypeMatrix : I32EnumAttrCase<"OpTypeMatrix", 24>; 3153def SPV_OC_OpTypeArray : I32EnumAttrCase<"OpTypeArray", 28>; 3154def SPV_OC_OpTypeRuntimeArray : I32EnumAttrCase<"OpTypeRuntimeArray", 29>; 3155def SPV_OC_OpTypeStruct : I32EnumAttrCase<"OpTypeStruct", 30>; 3156def SPV_OC_OpTypePointer : I32EnumAttrCase<"OpTypePointer", 32>; 3157def SPV_OC_OpTypeFunction : I32EnumAttrCase<"OpTypeFunction", 33>; 3158def SPV_OC_OpTypeForwardPointer : I32EnumAttrCase<"OpTypeForwardPointer", 39>; 3159def SPV_OC_OpConstantTrue : I32EnumAttrCase<"OpConstantTrue", 41>; 3160def SPV_OC_OpConstantFalse : I32EnumAttrCase<"OpConstantFalse", 42>; 3161def SPV_OC_OpConstant : I32EnumAttrCase<"OpConstant", 43>; 3162def SPV_OC_OpConstantComposite : I32EnumAttrCase<"OpConstantComposite", 44>; 3163def SPV_OC_OpConstantNull : I32EnumAttrCase<"OpConstantNull", 46>; 3164def SPV_OC_OpSpecConstantTrue : I32EnumAttrCase<"OpSpecConstantTrue", 48>; 3165def SPV_OC_OpSpecConstantFalse : I32EnumAttrCase<"OpSpecConstantFalse", 49>; 3166def SPV_OC_OpSpecConstant : I32EnumAttrCase<"OpSpecConstant", 50>; 3167def SPV_OC_OpSpecConstantComposite : I32EnumAttrCase<"OpSpecConstantComposite", 51>; 3168def SPV_OC_OpFunction : I32EnumAttrCase<"OpFunction", 54>; 3169def SPV_OC_OpFunctionParameter : I32EnumAttrCase<"OpFunctionParameter", 55>; 3170def SPV_OC_OpFunctionEnd : I32EnumAttrCase<"OpFunctionEnd", 56>; 3171def SPV_OC_OpFunctionCall : I32EnumAttrCase<"OpFunctionCall", 57>; 3172def SPV_OC_OpVariable : I32EnumAttrCase<"OpVariable", 59>; 3173def SPV_OC_OpLoad : I32EnumAttrCase<"OpLoad", 61>; 3174def SPV_OC_OpStore : I32EnumAttrCase<"OpStore", 62>; 3175def SPV_OC_OpCopyMemory : I32EnumAttrCase<"OpCopyMemory", 63>; 3176def SPV_OC_OpAccessChain : I32EnumAttrCase<"OpAccessChain", 65>; 3177def SPV_OC_OpDecorate : I32EnumAttrCase<"OpDecorate", 71>; 3178def SPV_OC_OpMemberDecorate : I32EnumAttrCase<"OpMemberDecorate", 72>; 3179def SPV_OC_OpVectorExtractDynamic : I32EnumAttrCase<"OpVectorExtractDynamic", 77>; 3180def SPV_OC_OpVectorInsertDynamic : I32EnumAttrCase<"OpVectorInsertDynamic", 78>; 3181def SPV_OC_OpCompositeConstruct : I32EnumAttrCase<"OpCompositeConstruct", 80>; 3182def SPV_OC_OpCompositeExtract : I32EnumAttrCase<"OpCompositeExtract", 81>; 3183def SPV_OC_OpCompositeInsert : I32EnumAttrCase<"OpCompositeInsert", 82>; 3184def SPV_OC_OpTranspose : I32EnumAttrCase<"OpTranspose", 84>; 3185def SPV_OC_OpConvertFToU : I32EnumAttrCase<"OpConvertFToU", 109>; 3186def SPV_OC_OpConvertFToS : I32EnumAttrCase<"OpConvertFToS", 110>; 3187def SPV_OC_OpConvertSToF : I32EnumAttrCase<"OpConvertSToF", 111>; 3188def SPV_OC_OpConvertUToF : I32EnumAttrCase<"OpConvertUToF", 112>; 3189def SPV_OC_OpUConvert : I32EnumAttrCase<"OpUConvert", 113>; 3190def SPV_OC_OpSConvert : I32EnumAttrCase<"OpSConvert", 114>; 3191def SPV_OC_OpFConvert : I32EnumAttrCase<"OpFConvert", 115>; 3192def SPV_OC_OpBitcast : I32EnumAttrCase<"OpBitcast", 124>; 3193def SPV_OC_OpSNegate : I32EnumAttrCase<"OpSNegate", 126>; 3194def SPV_OC_OpFNegate : I32EnumAttrCase<"OpFNegate", 127>; 3195def SPV_OC_OpIAdd : I32EnumAttrCase<"OpIAdd", 128>; 3196def SPV_OC_OpFAdd : I32EnumAttrCase<"OpFAdd", 129>; 3197def SPV_OC_OpISub : I32EnumAttrCase<"OpISub", 130>; 3198def SPV_OC_OpFSub : I32EnumAttrCase<"OpFSub", 131>; 3199def SPV_OC_OpIMul : I32EnumAttrCase<"OpIMul", 132>; 3200def SPV_OC_OpFMul : I32EnumAttrCase<"OpFMul", 133>; 3201def SPV_OC_OpUDiv : I32EnumAttrCase<"OpUDiv", 134>; 3202def SPV_OC_OpSDiv : I32EnumAttrCase<"OpSDiv", 135>; 3203def SPV_OC_OpFDiv : I32EnumAttrCase<"OpFDiv", 136>; 3204def SPV_OC_OpUMod : I32EnumAttrCase<"OpUMod", 137>; 3205def SPV_OC_OpSRem : I32EnumAttrCase<"OpSRem", 138>; 3206def SPV_OC_OpSMod : I32EnumAttrCase<"OpSMod", 139>; 3207def SPV_OC_OpFRem : I32EnumAttrCase<"OpFRem", 140>; 3208def SPV_OC_OpFMod : I32EnumAttrCase<"OpFMod", 141>; 3209def SPV_OC_OpMatrixTimesScalar : I32EnumAttrCase<"OpMatrixTimesScalar", 143>; 3210def SPV_OC_OpMatrixTimesMatrix : I32EnumAttrCase<"OpMatrixTimesMatrix", 146>; 3211def SPV_OC_OpLogicalEqual : I32EnumAttrCase<"OpLogicalEqual", 164>; 3212def SPV_OC_OpLogicalNotEqual : I32EnumAttrCase<"OpLogicalNotEqual", 165>; 3213def SPV_OC_OpLogicalOr : I32EnumAttrCase<"OpLogicalOr", 166>; 3214def SPV_OC_OpLogicalAnd : I32EnumAttrCase<"OpLogicalAnd", 167>; 3215def SPV_OC_OpLogicalNot : I32EnumAttrCase<"OpLogicalNot", 168>; 3216def SPV_OC_OpSelect : I32EnumAttrCase<"OpSelect", 169>; 3217def SPV_OC_OpIEqual : I32EnumAttrCase<"OpIEqual", 170>; 3218def SPV_OC_OpINotEqual : I32EnumAttrCase<"OpINotEqual", 171>; 3219def SPV_OC_OpUGreaterThan : I32EnumAttrCase<"OpUGreaterThan", 172>; 3220def SPV_OC_OpSGreaterThan : I32EnumAttrCase<"OpSGreaterThan", 173>; 3221def SPV_OC_OpUGreaterThanEqual : I32EnumAttrCase<"OpUGreaterThanEqual", 174>; 3222def SPV_OC_OpSGreaterThanEqual : I32EnumAttrCase<"OpSGreaterThanEqual", 175>; 3223def SPV_OC_OpULessThan : I32EnumAttrCase<"OpULessThan", 176>; 3224def SPV_OC_OpSLessThan : I32EnumAttrCase<"OpSLessThan", 177>; 3225def SPV_OC_OpULessThanEqual : I32EnumAttrCase<"OpULessThanEqual", 178>; 3226def SPV_OC_OpSLessThanEqual : I32EnumAttrCase<"OpSLessThanEqual", 179>; 3227def SPV_OC_OpFOrdEqual : I32EnumAttrCase<"OpFOrdEqual", 180>; 3228def SPV_OC_OpFUnordEqual : I32EnumAttrCase<"OpFUnordEqual", 181>; 3229def SPV_OC_OpFOrdNotEqual : I32EnumAttrCase<"OpFOrdNotEqual", 182>; 3230def SPV_OC_OpFUnordNotEqual : I32EnumAttrCase<"OpFUnordNotEqual", 183>; 3231def SPV_OC_OpFOrdLessThan : I32EnumAttrCase<"OpFOrdLessThan", 184>; 3232def SPV_OC_OpFUnordLessThan : I32EnumAttrCase<"OpFUnordLessThan", 185>; 3233def SPV_OC_OpFOrdGreaterThan : I32EnumAttrCase<"OpFOrdGreaterThan", 186>; 3234def SPV_OC_OpFUnordGreaterThan : I32EnumAttrCase<"OpFUnordGreaterThan", 187>; 3235def SPV_OC_OpFOrdLessThanEqual : I32EnumAttrCase<"OpFOrdLessThanEqual", 188>; 3236def SPV_OC_OpFUnordLessThanEqual : I32EnumAttrCase<"OpFUnordLessThanEqual", 189>; 3237def SPV_OC_OpFOrdGreaterThanEqual : I32EnumAttrCase<"OpFOrdGreaterThanEqual", 190>; 3238def SPV_OC_OpFUnordGreaterThanEqual : I32EnumAttrCase<"OpFUnordGreaterThanEqual", 191>; 3239def SPV_OC_OpShiftRightLogical : I32EnumAttrCase<"OpShiftRightLogical", 194>; 3240def SPV_OC_OpShiftRightArithmetic : I32EnumAttrCase<"OpShiftRightArithmetic", 195>; 3241def SPV_OC_OpShiftLeftLogical : I32EnumAttrCase<"OpShiftLeftLogical", 196>; 3242def SPV_OC_OpBitwiseOr : I32EnumAttrCase<"OpBitwiseOr", 197>; 3243def SPV_OC_OpBitwiseXor : I32EnumAttrCase<"OpBitwiseXor", 198>; 3244def SPV_OC_OpBitwiseAnd : I32EnumAttrCase<"OpBitwiseAnd", 199>; 3245def SPV_OC_OpNot : I32EnumAttrCase<"OpNot", 200>; 3246def SPV_OC_OpBitFieldInsert : I32EnumAttrCase<"OpBitFieldInsert", 201>; 3247def SPV_OC_OpBitFieldSExtract : I32EnumAttrCase<"OpBitFieldSExtract", 202>; 3248def SPV_OC_OpBitFieldUExtract : I32EnumAttrCase<"OpBitFieldUExtract", 203>; 3249def SPV_OC_OpBitReverse : I32EnumAttrCase<"OpBitReverse", 204>; 3250def SPV_OC_OpBitCount : I32EnumAttrCase<"OpBitCount", 205>; 3251def SPV_OC_OpControlBarrier : I32EnumAttrCase<"OpControlBarrier", 224>; 3252def SPV_OC_OpMemoryBarrier : I32EnumAttrCase<"OpMemoryBarrier", 225>; 3253def SPV_OC_OpAtomicCompareExchangeWeak : I32EnumAttrCase<"OpAtomicCompareExchangeWeak", 231>; 3254def SPV_OC_OpAtomicIIncrement : I32EnumAttrCase<"OpAtomicIIncrement", 232>; 3255def SPV_OC_OpAtomicIDecrement : I32EnumAttrCase<"OpAtomicIDecrement", 233>; 3256def SPV_OC_OpAtomicIAdd : I32EnumAttrCase<"OpAtomicIAdd", 234>; 3257def SPV_OC_OpAtomicISub : I32EnumAttrCase<"OpAtomicISub", 235>; 3258def SPV_OC_OpAtomicSMin : I32EnumAttrCase<"OpAtomicSMin", 236>; 3259def SPV_OC_OpAtomicUMin : I32EnumAttrCase<"OpAtomicUMin", 237>; 3260def SPV_OC_OpAtomicSMax : I32EnumAttrCase<"OpAtomicSMax", 238>; 3261def SPV_OC_OpAtomicUMax : I32EnumAttrCase<"OpAtomicUMax", 239>; 3262def SPV_OC_OpAtomicAnd : I32EnumAttrCase<"OpAtomicAnd", 240>; 3263def SPV_OC_OpAtomicOr : I32EnumAttrCase<"OpAtomicOr", 241>; 3264def SPV_OC_OpAtomicXor : I32EnumAttrCase<"OpAtomicXor", 242>; 3265def SPV_OC_OpPhi : I32EnumAttrCase<"OpPhi", 245>; 3266def SPV_OC_OpLoopMerge : I32EnumAttrCase<"OpLoopMerge", 246>; 3267def SPV_OC_OpSelectionMerge : I32EnumAttrCase<"OpSelectionMerge", 247>; 3268def SPV_OC_OpLabel : I32EnumAttrCase<"OpLabel", 248>; 3269def SPV_OC_OpBranch : I32EnumAttrCase<"OpBranch", 249>; 3270def SPV_OC_OpBranchConditional : I32EnumAttrCase<"OpBranchConditional", 250>; 3271def SPV_OC_OpReturn : I32EnumAttrCase<"OpReturn", 253>; 3272def SPV_OC_OpReturnValue : I32EnumAttrCase<"OpReturnValue", 254>; 3273def SPV_OC_OpUnreachable : I32EnumAttrCase<"OpUnreachable", 255>; 3274def SPV_OC_OpGroupBroadcast : I32EnumAttrCase<"OpGroupBroadcast", 263>; 3275def SPV_OC_OpNoLine : I32EnumAttrCase<"OpNoLine", 317>; 3276def SPV_OC_OpModuleProcessed : I32EnumAttrCase<"OpModuleProcessed", 330>; 3277def SPV_OC_OpGroupNonUniformElect : I32EnumAttrCase<"OpGroupNonUniformElect", 333>; 3278def SPV_OC_OpGroupNonUniformBroadcast : I32EnumAttrCase<"OpGroupNonUniformBroadcast", 337>; 3279def SPV_OC_OpGroupNonUniformBallot : I32EnumAttrCase<"OpGroupNonUniformBallot", 339>; 3280def SPV_OC_OpGroupNonUniformIAdd : I32EnumAttrCase<"OpGroupNonUniformIAdd", 349>; 3281def SPV_OC_OpGroupNonUniformFAdd : I32EnumAttrCase<"OpGroupNonUniformFAdd", 350>; 3282def SPV_OC_OpGroupNonUniformIMul : I32EnumAttrCase<"OpGroupNonUniformIMul", 351>; 3283def SPV_OC_OpGroupNonUniformFMul : I32EnumAttrCase<"OpGroupNonUniformFMul", 352>; 3284def SPV_OC_OpGroupNonUniformSMin : I32EnumAttrCase<"OpGroupNonUniformSMin", 353>; 3285def SPV_OC_OpGroupNonUniformUMin : I32EnumAttrCase<"OpGroupNonUniformUMin", 354>; 3286def SPV_OC_OpGroupNonUniformFMin : I32EnumAttrCase<"OpGroupNonUniformFMin", 355>; 3287def SPV_OC_OpGroupNonUniformSMax : I32EnumAttrCase<"OpGroupNonUniformSMax", 356>; 3288def SPV_OC_OpGroupNonUniformUMax : I32EnumAttrCase<"OpGroupNonUniformUMax", 357>; 3289def SPV_OC_OpGroupNonUniformFMax : I32EnumAttrCase<"OpGroupNonUniformFMax", 358>; 3290def SPV_OC_OpSubgroupBallotKHR : I32EnumAttrCase<"OpSubgroupBallotKHR", 4421>; 3291def SPV_OC_OpTypeCooperativeMatrixNV : I32EnumAttrCase<"OpTypeCooperativeMatrixNV", 5358>; 3292def SPV_OC_OpCooperativeMatrixLoadNV : I32EnumAttrCase<"OpCooperativeMatrixLoadNV", 5359>; 3293def SPV_OC_OpCooperativeMatrixStoreNV : I32EnumAttrCase<"OpCooperativeMatrixStoreNV", 5360>; 3294def SPV_OC_OpCooperativeMatrixMulAddNV : I32EnumAttrCase<"OpCooperativeMatrixMulAddNV", 5361>; 3295def SPV_OC_OpCooperativeMatrixLengthNV : I32EnumAttrCase<"OpCooperativeMatrixLengthNV", 5362>; 3296def SPV_OC_OpSubgroupBlockReadINTEL : I32EnumAttrCase<"OpSubgroupBlockReadINTEL", 5575>; 3297def SPV_OC_OpSubgroupBlockWriteINTEL : I32EnumAttrCase<"OpSubgroupBlockWriteINTEL", 5576>; 3298 3299def SPV_OpcodeAttr : 3300 SPV_I32EnumAttr<"Opcode", "valid SPIR-V instructions", [ 3301 SPV_OC_OpNop, SPV_OC_OpUndef, SPV_OC_OpSourceContinued, SPV_OC_OpSource, 3302 SPV_OC_OpSourceExtension, SPV_OC_OpName, SPV_OC_OpMemberName, SPV_OC_OpString, 3303 SPV_OC_OpLine, SPV_OC_OpExtension, SPV_OC_OpExtInstImport, SPV_OC_OpExtInst, 3304 SPV_OC_OpMemoryModel, SPV_OC_OpEntryPoint, SPV_OC_OpExecutionMode, 3305 SPV_OC_OpCapability, SPV_OC_OpTypeVoid, SPV_OC_OpTypeBool, SPV_OC_OpTypeInt, 3306 SPV_OC_OpTypeFloat, SPV_OC_OpTypeVector, SPV_OC_OpTypeMatrix, 3307 SPV_OC_OpTypeArray, SPV_OC_OpTypeRuntimeArray, SPV_OC_OpTypeStruct, 3308 SPV_OC_OpTypePointer, SPV_OC_OpTypeFunction, SPV_OC_OpTypeForwardPointer, 3309 SPV_OC_OpConstantTrue, SPV_OC_OpConstantFalse, SPV_OC_OpConstant, 3310 SPV_OC_OpConstantComposite, SPV_OC_OpConstantNull, SPV_OC_OpSpecConstantTrue, 3311 SPV_OC_OpSpecConstantFalse, SPV_OC_OpSpecConstant, 3312 SPV_OC_OpSpecConstantComposite, SPV_OC_OpFunction, SPV_OC_OpFunctionParameter, 3313 SPV_OC_OpFunctionEnd, SPV_OC_OpFunctionCall, SPV_OC_OpVariable, SPV_OC_OpLoad, 3314 SPV_OC_OpStore, SPV_OC_OpCopyMemory, SPV_OC_OpAccessChain, SPV_OC_OpDecorate, 3315 SPV_OC_OpMemberDecorate, SPV_OC_OpVectorExtractDynamic, 3316 SPV_OC_OpVectorInsertDynamic, SPV_OC_OpCompositeConstruct, 3317 SPV_OC_OpCompositeExtract, SPV_OC_OpCompositeInsert, SPV_OC_OpTranspose, 3318 SPV_OC_OpConvertFToU, SPV_OC_OpConvertFToS, SPV_OC_OpConvertSToF, 3319 SPV_OC_OpConvertUToF, SPV_OC_OpUConvert, SPV_OC_OpSConvert, SPV_OC_OpFConvert, 3320 SPV_OC_OpBitcast, SPV_OC_OpSNegate, SPV_OC_OpFNegate, SPV_OC_OpIAdd, 3321 SPV_OC_OpFAdd, SPV_OC_OpISub, SPV_OC_OpFSub, SPV_OC_OpIMul, SPV_OC_OpFMul, 3322 SPV_OC_OpUDiv, SPV_OC_OpSDiv, SPV_OC_OpFDiv, SPV_OC_OpUMod, SPV_OC_OpSRem, 3323 SPV_OC_OpSMod, SPV_OC_OpFRem, SPV_OC_OpFMod, SPV_OC_OpMatrixTimesScalar, 3324 SPV_OC_OpMatrixTimesMatrix, SPV_OC_OpLogicalEqual, SPV_OC_OpLogicalNotEqual, 3325 SPV_OC_OpLogicalOr, SPV_OC_OpLogicalAnd, SPV_OC_OpLogicalNot, SPV_OC_OpSelect, 3326 SPV_OC_OpIEqual, SPV_OC_OpINotEqual, SPV_OC_OpUGreaterThan, 3327 SPV_OC_OpSGreaterThan, SPV_OC_OpUGreaterThanEqual, SPV_OC_OpSGreaterThanEqual, 3328 SPV_OC_OpULessThan, SPV_OC_OpSLessThan, SPV_OC_OpULessThanEqual, 3329 SPV_OC_OpSLessThanEqual, SPV_OC_OpFOrdEqual, SPV_OC_OpFUnordEqual, 3330 SPV_OC_OpFOrdNotEqual, SPV_OC_OpFUnordNotEqual, SPV_OC_OpFOrdLessThan, 3331 SPV_OC_OpFUnordLessThan, SPV_OC_OpFOrdGreaterThan, SPV_OC_OpFUnordGreaterThan, 3332 SPV_OC_OpFOrdLessThanEqual, SPV_OC_OpFUnordLessThanEqual, 3333 SPV_OC_OpFOrdGreaterThanEqual, SPV_OC_OpFUnordGreaterThanEqual, 3334 SPV_OC_OpShiftRightLogical, SPV_OC_OpShiftRightArithmetic, 3335 SPV_OC_OpShiftLeftLogical, SPV_OC_OpBitwiseOr, SPV_OC_OpBitwiseXor, 3336 SPV_OC_OpBitwiseAnd, SPV_OC_OpNot, SPV_OC_OpBitFieldInsert, 3337 SPV_OC_OpBitFieldSExtract, SPV_OC_OpBitFieldUExtract, SPV_OC_OpBitReverse, 3338 SPV_OC_OpBitCount, SPV_OC_OpControlBarrier, SPV_OC_OpMemoryBarrier, 3339 SPV_OC_OpAtomicCompareExchangeWeak, SPV_OC_OpAtomicIIncrement, 3340 SPV_OC_OpAtomicIDecrement, SPV_OC_OpAtomicIAdd, SPV_OC_OpAtomicISub, 3341 SPV_OC_OpAtomicSMin, SPV_OC_OpAtomicUMin, SPV_OC_OpAtomicSMax, 3342 SPV_OC_OpAtomicUMax, SPV_OC_OpAtomicAnd, SPV_OC_OpAtomicOr, SPV_OC_OpAtomicXor, 3343 SPV_OC_OpPhi, SPV_OC_OpLoopMerge, SPV_OC_OpSelectionMerge, SPV_OC_OpLabel, 3344 SPV_OC_OpBranch, SPV_OC_OpBranchConditional, SPV_OC_OpReturn, 3345 SPV_OC_OpReturnValue, SPV_OC_OpUnreachable, SPV_OC_OpGroupBroadcast, 3346 SPV_OC_OpNoLine, SPV_OC_OpModuleProcessed, SPV_OC_OpGroupNonUniformElect, 3347 SPV_OC_OpGroupNonUniformBroadcast, SPV_OC_OpGroupNonUniformBallot, 3348 SPV_OC_OpGroupNonUniformIAdd, SPV_OC_OpGroupNonUniformFAdd, 3349 SPV_OC_OpGroupNonUniformIMul, SPV_OC_OpGroupNonUniformFMul, 3350 SPV_OC_OpGroupNonUniformSMin, SPV_OC_OpGroupNonUniformUMin, 3351 SPV_OC_OpGroupNonUniformFMin, SPV_OC_OpGroupNonUniformSMax, 3352 SPV_OC_OpGroupNonUniformUMax, SPV_OC_OpGroupNonUniformFMax, 3353 SPV_OC_OpSubgroupBallotKHR, SPV_OC_OpTypeCooperativeMatrixNV, 3354 SPV_OC_OpCooperativeMatrixLoadNV, SPV_OC_OpCooperativeMatrixStoreNV, 3355 SPV_OC_OpCooperativeMatrixMulAddNV, SPV_OC_OpCooperativeMatrixLengthNV, 3356 SPV_OC_OpSubgroupBlockReadINTEL, SPV_OC_OpSubgroupBlockWriteINTEL 3357 ]>; 3358 3359// End opcode section. Generated from SPIR-V spec; DO NOT MODIFY! 3360 3361//===----------------------------------------------------------------------===// 3362// SPIR-V op definitions 3363//===----------------------------------------------------------------------===// 3364 3365// Base class for all SPIR-V ops. 3366class SPV_Op<string mnemonic, list<OpTrait> traits = []> : 3367 Op<SPIRV_Dialect, mnemonic, !listconcat(traits, [ 3368 // TODO: We don't need all of the following traits for every op; only 3369 // the suitable ones should be added automatically after ODS supports 3370 // dialect-specific contents. 3371 DeclareOpInterfaceMethods<QueryMinVersionInterface>, 3372 DeclareOpInterfaceMethods<QueryMaxVersionInterface>, 3373 DeclareOpInterfaceMethods<QueryExtensionInterface>, 3374 DeclareOpInterfaceMethods<QueryCapabilityInterface> 3375 ])> { 3376 // Availability specification for this op itself. 3377 list<Availability> availability = [ 3378 MinVersion<SPV_V_1_0>, 3379 MaxVersion<SPV_V_1_5>, 3380 Extension<[]>, 3381 Capability<[]> 3382 ]; 3383 3384 // For each SPIR-V op, the following static functions need to be defined 3385 // in SPVOps.cpp: 3386 // 3387 // * static ParseResult parse<op-c++-class-name>(OpAsmParser &parser, 3388 // OperationState &result) 3389 // * static void print(OpAsmPrinter &p, <op-c++-class-name> op) 3390 // * static LogicalResult verify(<op-c++-class-name> op) 3391 let parser = [{ return ::parse$cppClass(parser, result); }]; 3392 let printer = [{ return ::print(*this, p); }]; 3393 let verifier = [{ return ::verify(*this); }]; 3394 3395 // Specifies whether this op has a direct corresponding SPIR-V binary 3396 // instruction opcode. The (de)serializer use this field to determine whether 3397 // to auto-generate an entry in the (de)serialization dispatch table for this 3398 // op. 3399 bit hasOpcode = 1; 3400 3401 // Name of the corresponding SPIR-V op. Only valid to use when hasOpcode is 1. 3402 string spirvOpName = "Op" # mnemonic; 3403 3404 // Controls whether to auto-generate this op's (de)serialization method. 3405 // If set, it results in generation of the following methods: 3406 // 3407 // ```c++ 3408 // template<typename OpTy> Serializer::processOp(OpTy op); 3409 // template<typename OpTy> Deserializer::processOp(ArrayRef<uint32_t>); 3410 // ``` 3411 // 3412 // If this field is not set, then manual implementation of a specialization of 3413 // these methods is required. 3414 // 3415 // Note: 3416 // 1) If hasOpcode is set but autogenSerialization is not set, the 3417 // (de)serializer dispatch method still calls the above method for 3418 // (de)serializing this op. 3419 // 2) If hasOpcode is not set, but autogenSerialization is set, the 3420 // above methods for (de)serialization are generated, but there is no 3421 // entry added in the dispatch tables to invoke these methods. The 3422 // dispatch needs to be handled manually. SPV_ExtInstOps are an 3423 // example of this. 3424 bit autogenSerialization = 1; 3425} 3426 3427class SPV_UnaryOp<string mnemonic, Type resultType, Type operandType, 3428 list<OpTrait> traits = []> : 3429 SPV_Op<mnemonic, traits> { 3430 let arguments = (ins 3431 SPV_ScalarOrVectorOf<operandType>:$operand 3432 ); 3433 3434 let results = (outs 3435 SPV_ScalarOrVectorOf<resultType>:$result 3436 ); 3437 3438 let parser = [{ return ::parseUnaryOp(parser, result); }]; 3439 let printer = [{ return ::printUnaryOp(getOperation(), p); }]; 3440 // No additional verification needed in addition to the ODS-generated ones. 3441 let verifier = [{ return success(); }]; 3442} 3443 3444class SPV_BinaryOp<string mnemonic, Type resultType, Type operandsType, 3445 list<OpTrait> traits = []> : 3446 SPV_Op<mnemonic, traits> { 3447 let arguments = (ins 3448 SPV_ScalarOrVectorOf<operandsType>:$operand1, 3449 SPV_ScalarOrVectorOf<operandsType>:$operand2 3450 ); 3451 3452 let results = (outs 3453 SPV_ScalarOrVectorOf<resultType>:$result 3454 ); 3455 3456 let parser = [{ return impl::parseOneResultSameOperandTypeOp(parser, result); }]; 3457 let printer = [{ return impl::printOneResultOp(getOperation(), p); }]; 3458 // No additional verification needed in addition to the ODS-generated ones. 3459 let verifier = [{ return success(); }]; 3460} 3461 3462class SPV_ExtInstOp<string mnemonic, string setPrefix, string setName, 3463 int opcode, list<OpTrait> traits = []> : 3464 SPV_Op<setPrefix # "." # mnemonic, traits> { 3465 3466 // Extended instruction sets have no direct opcode (they share the 3467 // same `OpExtInst` instruction). So the hasOpcode field is set to 3468 // false. So no entry corresponding to these ops are added in the 3469 // dispatch functions for (de)serialization. The methods for 3470 // (de)serialization are still automatically generated (since 3471 // autogenSerialization remains 1). A separate method is generated 3472 // for dispatching extended instruction set ops. 3473 let hasOpcode = 0; 3474 3475 // Opcode within extended instruction set. 3476 int extendedInstOpcode = opcode; 3477 3478 // Name used to import the extended instruction set. 3479 string extendedInstSetName = setName; 3480} 3481 3482#endif // SPIRV_BASE 3483