2080 lines · plain
1//===- SPIRVSymbolicOperands.td ----------------------------*- 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-exception6//7//===----------------------------------------------------------------------===//8//9// This file defines symbolic/named operands for various SPIR-V instructions.10//11//===----------------------------------------------------------------------===//12 13include "llvm/TableGen/SearchableTable.td"14 15//===----------------------------------------------------------------------===//16// Lookup table containing symbolic operands with the following columns:17// - Category (Extension/Capability/BuiltIn/etc.)18// - Value (32-bit representation for binary emission)19// - Mnemonic (String representation for textual emission)20// - MinVersion21// - MaxVersion22//===----------------------------------------------------------------------===//23 24// Forward-declare classes used in SymbolicOperand25class OperandCategory;26 27class SymbolicOperand<OperandCategory category, bits<32> value, string mnemonic, bits<32> minVersion, bits<32> maxVersion> {28 OperandCategory Category = category;29 bits<32> Value = value;30 string Mnemonic = mnemonic;31 bits<32> MinVersion = minVersion;32 bits<32> MaxVersion = maxVersion;33}34 35def SymbolicOperands : GenericTable {36 let FilterClass = "SymbolicOperand";37 let Fields = ["Category", "Value", "Mnemonic", "MinVersion", "MaxVersion"];38 string TypeOf_Category = "OperandCategory";39 let PrimaryKey = ["Category", "Value"];40 // Function for looking up symbolic operands based on category and value.41 let PrimaryKeyName = "lookupSymbolicOperandByCategoryAndValue";42}43 44// Function for looking up symbolic operands based on just category.45def lookupSymbolicOperandByCategory : SearchIndex {46 let Table = SymbolicOperands;47 let Key = ["Category"];48}49 50// Function for looking up symbolic operands based on category and mnemonic.51def lookupSymbolicOperandByCategoryAndMnemonic : SearchIndex {52 let Table = SymbolicOperands;53 let Key = ["Category", "Mnemonic"];54}55 56//===----------------------------------------------------------------------===//57// Lookup table for matching symbolic operands (category + 32-bit value) to58// a SPIR-V extension.59//===----------------------------------------------------------------------===//60 61// Forward-declare classes used in ExtensionEntry62class Extension;63 64class ExtensionEntry<OperandCategory category, bits<32> value, Extension reqExtension> {65 OperandCategory Category = category;66 bits<32> Value = value;67 Extension ReqExtension = reqExtension;68}69 70def ExtensionEntries : GenericTable {71 let FilterClass = "ExtensionEntry";72 let Fields = ["Category", "Value", "ReqExtension"];73 string TypeOf_Category = "OperandCategory";74 string TypeOf_ReqExtension = "Extension";75 let PrimaryKey = ["Category", "Value"];76 // Function for looking up the extension by category + value.77 let PrimaryKeyName = "lookupExtensionByCategoryAndValue";78}79 80// Function to lookup symbolic operands enabled by a given extension.81def lookupSymbolicOperandsEnabledByExtension : SearchIndex {82 let Table = ExtensionEntries;83 let Key = ["ReqExtension", "Category"];84}85 86//===----------------------------------------------------------------------===//87// Lookup table for matching symbolic operands (category + 32-bit value) to88// SPIR-V capabilities. If an operand requires more than one capability, there89// will be multiple consecutive entries present in the table.90//===----------------------------------------------------------------------===//91 92// Forward-declare classes used in ExtensionEntry93class Capability;94 95class CapabilityEntry<OperandCategory category, bits<32> value, Capability reqCabaility> {96 OperandCategory Category = category;97 bits<32> Value = value;98 Capability ReqCapability = reqCabaility;99}100 101def CapabilityEntries : GenericTable {102 let FilterClass = "CapabilityEntry";103 let Fields = ["Category", "Value", "ReqCapability"];104 string TypeOf_Category = "OperandCategory";105 string TypeOf_ReqCapability = "Capability";106 let PrimaryKey = ["Category", "Value"];107 // Function for looking up a (the first) capability by category + value. Next108 // capabilities should be consecutive.109 let PrimaryKeyName = "lookupCapabilityByCategoryAndValue";110}111 112//===----------------------------------------------------------------------===//113// Lookup table for matching symbolic operands (category + 32-bit value) to114// SPIR-V environments. If an operand is allows in more than one environment,115// there will be multiple consecutive entries present in the table.116//===----------------------------------------------------------------------===//117 118// Forward-declare classes used in ExtensionEntry119class Environment;120 121class EnvironmentEntry<OperandCategory category, bits<32> value,122 Environment allowedEnvironment> {123 OperandCategory Category = category;124 bits<32> Value = value;125 Environment AllowedEnvironment = allowedEnvironment;126}127 128def EnvironmentEntries : GenericTable {129 let FilterClass = "EnvironmentEntry";130 let Fields = ["Category", "Value", "AllowedEnvironment"];131 string TypeOf_Category = "OperandCategory";132 string TypeOf_AllowedEnvironment = "Environment";133 let PrimaryKey = ["Category", "Value"];134 // Function for looking up a (the first) environment by category + value. Next135 // environment should be consecutive.136 let PrimaryKeyName = "lookupEnvironmentByCategoryAndValue";137}138 139//===----------------------------------------------------------------------===//140// Multiclass used to define a SymbolicOperand and at the same time declare141// required extension and capabilities.142//===----------------------------------------------------------------------===//143 144multiclass SymbolicOperandWithRequirements<145 OperandCategory category, bits<32> value, string mnemonic,146 bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions,147 list<Capability> reqCapabilities, list<Environment> allowedEnvironments> {148 assert !ge(!size(mnemonic), 1), "No mnemonic/string representation provided "149 "for symbolic operand with value "#value;150 def : SymbolicOperand<category, value, mnemonic, minVersion, maxVersion>;151 152 assert !le(!size(reqExtensions), 1),153 "Too many required extensions for a symbolic/named operand: "#mnemonic;154 if !eq(!size(reqExtensions), 1) then {155 def : ExtensionEntry<category, value, reqExtensions[0]>;156 }157 158 foreach capability = reqCapabilities in {159 def : CapabilityEntry<category, value, capability>;160 }161 162 foreach environment = allowedEnvironments in {163 def : EnvironmentEntry<category, value, environment>;164 }165}166 167//===----------------------------------------------------------------------===//168// Enum defining different categories of symbolic/named operands.169//===----------------------------------------------------------------------===//170 171def OperandCategory : GenericEnum {172 let FilterClass = "OperandCategory";173}174 175class OperandCategory;176 177def ExtensionOperand : OperandCategory;178def CapabilityOperand : OperandCategory;179def SourceLanguageOperand : OperandCategory;180def AddressingModelOperand : OperandCategory;181def ExecutionModelOperand : OperandCategory;182def MemoryModelOperand : OperandCategory;183def ExecutionModeOperand : OperandCategory;184def StorageClassOperand : OperandCategory;185def DimOperand : OperandCategory;186def SamplerAddressingModeOperand : OperandCategory;187def SamplerFilterModeOperand : OperandCategory;188def ImageFormatOperand : OperandCategory;189def ImageChannelOrderOperand : OperandCategory;190def ImageChannelDataTypeOperand : OperandCategory;191def ImageOperandOperand : OperandCategory;192def FPFastMathModeOperand : OperandCategory;193def FPRoundingModeOperand : OperandCategory;194def LinkageTypeOperand : OperandCategory;195def AccessQualifierOperand : OperandCategory;196def FunctionParameterAttributeOperand : OperandCategory;197def DecorationOperand : OperandCategory;198def BuiltInOperand : OperandCategory;199def SelectionControlOperand : OperandCategory;200def LoopControlOperand : OperandCategory;201def FunctionControlOperand : OperandCategory;202def MemorySemanticsOperand : OperandCategory;203def MemoryOperandOperand : OperandCategory;204def ScopeOperand : OperandCategory;205def GroupOperationOperand : OperandCategory;206def KernelEnqueueFlagsOperand : OperandCategory;207def KernelProfilingInfoOperand : OperandCategory;208def OpcodeOperand : OperandCategory;209def CooperativeMatrixLayoutOperand : OperandCategory;210def CooperativeMatrixOperandsOperand : OperandCategory;211def SpecConstantOpOperandsOperand : OperandCategory;212def MatrixMultiplyAccumulateOperandsOperand : OperandCategory;213def FPEncodingOperand : OperandCategory;214def PackedVectorFormatsOperand : OperandCategory;215 216//===----------------------------------------------------------------------===//217// Definition of the Environments218//===----------------------------------------------------------------------===//219 220def Environment : GenericEnum, Operand<i32> {221 let FilterClass = "Environment";222 let ValueField = "Value";223}224 225class Environment<bits<32> value> { bits<32> Value = value; }226 227def EnvOpenCL : Environment<0>;228def EnvVulkan : Environment<1>;229 230//===----------------------------------------------------------------------===//231// Multiclass used to define Extesions enum values and at the same time232// SymbolicOperand entries.233//===----------------------------------------------------------------------===//234 235def Extension : GenericEnum, Operand<i32> {236 let FilterClass = "Extension";237 let NameField = "Name";238 let ValueField = "Value";239 let PrintMethod = "printExtension";240}241 242class Extension<string name, bits<32> value> {243 string Name = name;244 bits<32> Value = value;245}246 247multiclass ExtensionOperand<bits<32> value,248 list<Environment> allowedEnvironments> {249 def NAME : Extension<NAME, value>;250 defm : SymbolicOperandWithRequirements<ExtensionOperand, value, NAME, 0,251 0, [], [], allowedEnvironments>;252}253 254defm SPV_AMD_shader_explicit_vertex_parameter255 : ExtensionOperand<1, [EnvVulkan]>;256defm SPV_AMD_shader_trinary_minmax_extension : ExtensionOperand<2, [EnvVulkan]>;257defm SPV_AMD_gcn_shader : ExtensionOperand<3, [EnvVulkan]>;258defm SPV_KHR_shader_ballot : ExtensionOperand<4, [EnvVulkan]>;259defm SPV_AMD_shader_ballot : ExtensionOperand<5, [EnvVulkan]>;260defm SPV_AMD_gpu_shader_half_float : ExtensionOperand<6, [EnvVulkan]>;261defm SPV_KHR_shader_draw_parameters : ExtensionOperand<7, [EnvVulkan]>;262defm SPV_KHR_subgroup_vote : ExtensionOperand<8, [EnvVulkan]>;263defm SPV_KHR_16bit_storage : ExtensionOperand<9, [EnvVulkan]>;264defm SPV_KHR_device_group : ExtensionOperand<10, [EnvVulkan]>;265defm SPV_KHR_multiview : ExtensionOperand<11, [EnvVulkan]>;266defm SPV_NVX_multiview_per_view_attributes : ExtensionOperand<12, [EnvVulkan]>;267defm SPV_NV_viewport_array2 : ExtensionOperand<13, [EnvVulkan]>;268defm SPV_NV_stereo_view_rendering : ExtensionOperand<14, [EnvVulkan]>;269defm SPV_NV_sample_mask_override_coverage : ExtensionOperand<15, [EnvVulkan]>;270defm SPV_NV_geometry_shader_passthrough : ExtensionOperand<16, [EnvVulkan]>;271defm SPV_AMD_texture_gather_bias_lod : ExtensionOperand<17, [EnvVulkan]>;272defm SPV_KHR_storage_buffer_storage_class : ExtensionOperand<18, [EnvVulkan]>;273defm SPV_KHR_variable_pointers : ExtensionOperand<19, [EnvVulkan]>;274defm SPV_AMD_gpu_shader_int16 : ExtensionOperand<20, [EnvVulkan]>;275defm SPV_KHR_post_depth_coverage : ExtensionOperand<21, [EnvVulkan]>;276defm SPV_KHR_shader_atomic_counter_ops : ExtensionOperand<22, []>;277defm SPV_EXT_shader_stencil_export : ExtensionOperand<23, [EnvVulkan]>;278defm SPV_EXT_shader_viewport_index_layer : ExtensionOperand<24, [EnvVulkan]>;279defm SPV_AMD_shader_image_load_store_lod : ExtensionOperand<25, [EnvVulkan]>;280defm SPV_AMD_shader_fragment_mask : ExtensionOperand<26, [EnvVulkan]>;281defm SPV_EXT_fragment_fully_covered : ExtensionOperand<27, [EnvVulkan]>;282defm SPV_AMD_gpu_shader_half_float_fetch : ExtensionOperand<28, [EnvVulkan]>;283defm SPV_GOOGLE_decorate_string : ExtensionOperand<29, [EnvVulkan]>;284defm SPV_GOOGLE_hlsl_functionality1 : ExtensionOperand<30, [EnvVulkan]>;285defm SPV_NV_shader_subgroup_partitioned : ExtensionOperand<31, [EnvVulkan]>;286defm SPV_EXT_descriptor_indexing : ExtensionOperand<32, [EnvVulkan]>;287defm SPV_KHR_8bit_storage : ExtensionOperand<33, [EnvVulkan]>;288defm SPV_KHR_vulkan_memory_model : ExtensionOperand<34, [EnvVulkan]>;289defm SPV_NV_ray_tracing : ExtensionOperand<35, [EnvVulkan]>;290defm SPV_NV_compute_shader_derivatives : ExtensionOperand<36, [EnvVulkan]>;291defm SPV_NV_fragment_shader_barycentric : ExtensionOperand<37, [EnvVulkan]>;292defm SPV_NV_mesh_shader : ExtensionOperand<38, [EnvVulkan]>;293defm SPV_NV_shader_image_footprint : ExtensionOperand<39, [EnvVulkan]>;294defm SPV_NV_shading_rate : ExtensionOperand<40, [EnvVulkan]>;295defm SPV_INTEL_subgroups : ExtensionOperand<41, [EnvOpenCL]>;296defm SPV_INTEL_media_block_io : ExtensionOperand<42, [EnvOpenCL]>;297defm SPV_EXT_fragment_invocation_density : ExtensionOperand<44, [EnvVulkan]>;298defm SPV_KHR_no_integer_wrap_decoration : ExtensionOperand<45, [EnvOpenCL]>;299defm SPV_KHR_float_controls : ExtensionOperand<46, [EnvVulkan, EnvOpenCL]>;300defm SPV_EXT_physical_storage_buffer : ExtensionOperand<47, [EnvVulkan]>;301defm SPV_INTEL_fpga_memory_attributes : ExtensionOperand<48, [EnvOpenCL]>;302defm SPV_NV_cooperative_matrix : ExtensionOperand<49, [EnvVulkan]>;303defm SPV_INTEL_shader_integer_functions2304 : ExtensionOperand<50, [EnvVulkan, EnvOpenCL]>;305defm SPV_INTEL_fpga_loop_controls : ExtensionOperand<51, [EnvOpenCL]>;306defm SPV_EXT_fragment_shader_interlock : ExtensionOperand<52, [EnvVulkan]>;307defm SPV_NV_shader_sm_builtins : ExtensionOperand<53, [EnvVulkan]>;308defm SPV_KHR_shader_clock : ExtensionOperand<54, [EnvVulkan, EnvOpenCL]>;309defm SPV_INTEL_unstructured_loop_controls : ExtensionOperand<55, [EnvOpenCL]>;310defm SPV_EXT_demote_to_helper_invocation : ExtensionOperand<56, [EnvVulkan]>;311defm SPV_INTEL_fpga_reg : ExtensionOperand<57, [EnvOpenCL]>;312defm SPV_ALTERA_blocking_pipes : ExtensionOperand<58, [EnvOpenCL]>;313defm SPV_GOOGLE_user_type : ExtensionOperand<59, [EnvVulkan]>;314defm SPV_KHR_physical_storage_buffer : ExtensionOperand<60, [EnvVulkan]>;315defm SPV_INTEL_kernel_attributes : ExtensionOperand<61, [EnvOpenCL]>;316defm SPV_KHR_non_semantic_info : ExtensionOperand<62, [EnvVulkan, EnvOpenCL]>;317defm SPV_INTEL_io_pipes : ExtensionOperand<63, [EnvOpenCL]>;318defm SPV_KHR_ray_tracing : ExtensionOperand<64, [EnvVulkan]>;319defm SPV_KHR_ray_query : ExtensionOperand<65, [EnvVulkan]>;320defm SPV_INTEL_fpga_memory_accesses : ExtensionOperand<66, [EnvOpenCL]>;321defm SPV_ALTERA_arbitrary_precision_integers : ExtensionOperand<67, [EnvOpenCL]>;322defm SPV_EXT_shader_atomic_float_add323 : ExtensionOperand<68, [EnvVulkan, EnvOpenCL]>;324defm SPV_KHR_terminate_invocation : ExtensionOperand<69, [EnvVulkan]>;325defm SPV_KHR_fragment_shading_rate : ExtensionOperand<70, [EnvVulkan]>;326defm SPV_EXT_shader_image_int64 : ExtensionOperand<71, [EnvVulkan]>;327defm SPV_INTEL_fp_fast_math_mode : ExtensionOperand<72, [EnvOpenCL]>;328defm SPV_INTEL_fpga_cluster_attributes : ExtensionOperand<73, [EnvOpenCL]>;329defm SPV_INTEL_loop_fuse : ExtensionOperand<74, [EnvOpenCL]>;330defm SPV_EXT_shader_atomic_float_min_max331 : ExtensionOperand<75, [EnvVulkan, EnvOpenCL]>;332defm SPV_KHR_workgroup_memory_explicit_layout333 : ExtensionOperand<76, [EnvVulkan]>;334defm SPV_KHR_linkonce_odr : ExtensionOperand<77, [EnvOpenCL]>;335defm SPV_KHR_expect_assume : ExtensionOperand<78, [EnvVulkan, EnvOpenCL]>;336defm SPV_INTEL_fpga_dsp_control : ExtensionOperand<79, [EnvOpenCL]>;337defm SPV_NV_bindless_texture : ExtensionOperand<80, [EnvVulkan]>;338defm SPV_INTEL_fpga_invocation_pipelining_attributes339 : ExtensionOperand<81, [EnvOpenCL]>;340defm SPV_KHR_subgroup_uniform_control_flow : ExtensionOperand<82, [EnvVulkan]>;341defm SPV_HUAWEI_subpass_shading : ExtensionOperand<83, [EnvVulkan]>;342defm SPV_KHR_integer_dot_product : ExtensionOperand<84, [EnvVulkan, EnvOpenCL]>;343defm SPV_EXT_shader_atomic_float16_add344 : ExtensionOperand<85, [EnvVulkan, EnvOpenCL]>;345defm SPV_INTEL_runtime_aligned : ExtensionOperand<86, [EnvOpenCL]>;346defm SPV_KHR_bit_instructions : ExtensionOperand<87, [EnvOpenCL]>;347defm SPV_NV_ray_tracing_motion_blur : ExtensionOperand<88, [EnvVulkan]>;348defm SPV_KHR_uniform_group_instructions : ExtensionOperand<89, [EnvOpenCL]>;349defm SPV_KHR_subgroup_rotate : ExtensionOperand<90, [EnvVulkan, EnvOpenCL]>;350defm SPV_INTEL_split_barrier : ExtensionOperand<91, [EnvOpenCL]>;351defm SPV_KHR_ray_cull_mask : ExtensionOperand<92, [EnvVulkan]>;352defm SPV_KHR_fragment_shader_barycentric : ExtensionOperand<93, [EnvVulkan]>;353defm SPV_EXT_relaxed_printf_string_address_space354 : ExtensionOperand<94, [EnvOpenCL]>;355defm SPV_EXT_mesh_shader : ExtensionOperand<96, [EnvVulkan]>;356defm SPV_ARM_core_builtins : ExtensionOperand<97, [EnvVulkan]>;357defm SPV_EXT_opacity_micromap : ExtensionOperand<98, [EnvVulkan]>;358defm SPV_NV_shader_invocation_reorder : ExtensionOperand<99, [EnvVulkan]>;359defm SPV_INTEL_usm_storage_classes : ExtensionOperand<100, [EnvOpenCL]>;360defm SPV_INTEL_fpga_latency_control : ExtensionOperand<101, [EnvOpenCL]>;361defm SPV_INTEL_fpga_argument_interfaces : ExtensionOperand<102, [EnvOpenCL]>;362defm SPV_INTEL_optnone : ExtensionOperand<103, [EnvOpenCL]>;363defm SPV_INTEL_function_pointers : ExtensionOperand<104, [EnvOpenCL]>;364defm SPV_INTEL_variable_length_array : ExtensionOperand<105, [EnvOpenCL]>;365defm SPV_INTEL_bfloat16_conversion : ExtensionOperand<106, [EnvOpenCL]>;366defm SPV_INTEL_inline_assembly : ExtensionOperand<107, [EnvOpenCL]>;367defm SPV_INTEL_cache_controls : ExtensionOperand<108, [EnvOpenCL]>;368defm SPV_INTEL_global_variable_host_access : ExtensionOperand<109, [EnvOpenCL]>;369defm SPV_INTEL_global_variable_fpga_decorations370 : ExtensionOperand<110, [EnvOpenCL]>;371defm SPV_KHR_cooperative_matrix : ExtensionOperand<111, [EnvVulkan, EnvOpenCL]>;372defm SPV_EXT_arithmetic_fence : ExtensionOperand<112, [EnvOpenCL]>;373defm SPV_EXT_optnone : ExtensionOperand<113, [EnvOpenCL]>;374defm SPV_INTEL_joint_matrix : ExtensionOperand<114, [EnvOpenCL]>;375defm SPV_INTEL_float_controls2 : ExtensionOperand<115, [EnvOpenCL]>;376defm SPV_INTEL_bindless_images : ExtensionOperand<116, [EnvOpenCL]>;377defm SPV_INTEL_long_composites : ExtensionOperand<117, [EnvOpenCL]>;378defm SPV_INTEL_memory_access_aliasing : ExtensionOperand<118, [EnvOpenCL]>;379defm SPV_INTEL_fp_max_error : ExtensionOperand<119, [EnvOpenCL]>;380defm SPV_INTEL_ternary_bitwise_function : ExtensionOperand<120, [EnvOpenCL]>;381defm SPV_INTEL_subgroup_matrix_multiply_accumulate382 : ExtensionOperand<121, [EnvOpenCL]>;383defm SPV_INTEL_2d_block_io : ExtensionOperand<122, [EnvOpenCL]>;384defm SPV_INTEL_int4 : ExtensionOperand<123, [EnvOpenCL]>;385defm SPV_KHR_float_controls2 : ExtensionOperand<124, [EnvVulkan, EnvOpenCL]>;386defm SPV_INTEL_tensor_float32_conversion : ExtensionOperand<125, [EnvOpenCL]>;387defm SPV_KHR_bfloat16 : ExtensionOperand<126, [EnvVulkan, EnvOpenCL]>;388defm SPV_INTEL_predicated_io : ExtensionOperand<127, [EnvOpenCL]>;389defm SPV_KHR_maximal_reconvergence : ExtensionOperand<128, [EnvVulkan]>;390defm SPV_INTEL_bfloat16_arithmetic391 : ExtensionOperand<129, [EnvVulkan, EnvOpenCL]>;392defm SPV_INTEL_16bit_atomics : ExtensionOperand<130, [EnvVulkan, EnvOpenCL]>;393defm SPV_ALTERA_arbitrary_precision_fixed_point : ExtensionOperand<131, [EnvOpenCL, EnvVulkan]>;394 395//===----------------------------------------------------------------------===//396// Multiclass used to define Capabilities enum values and at the same time397// SymbolicOperand entries with string mnemonics, versioning, extensions, and398// capabilities.399//===----------------------------------------------------------------------===//400 401def Capability : GenericEnum, Operand<i32> {402 let FilterClass = "Capability";403 let NameField = "Name";404 let ValueField = "Value";405 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");406}407 408class Capability<string name, bits<32> value> {409 string Name = name;410 bits<32> Value = value;411}412 413multiclass CapabilityOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {414 def NAME : Capability<NAME, value>;415 defm : SymbolicOperandWithRequirements<CapabilityOperand, value, NAME,416 minVersion, maxVersion, reqExtensions,417 reqCapabilities, []>;418}419 420defm Matrix : CapabilityOperand<0, 0, 0, [], []>;421defm Shader : CapabilityOperand<1, 0, 0, [], [Matrix]>;422defm Geometry : CapabilityOperand<2, 0, 0, [], [Shader]>;423defm Tessellation : CapabilityOperand<3, 0, 0, [], [Shader]>;424defm Addresses : CapabilityOperand<4, 0, 0, [], []>;425defm Linkage : CapabilityOperand<5, 0, 0, [], []>;426defm Kernel : CapabilityOperand<6, 0, 0, [], []>;427defm Vector16 : CapabilityOperand<7, 0, 0, [], [Kernel]>;428defm Float16Buffer : CapabilityOperand<8, 0, 0, [], [Kernel]>;429defm Float16 : CapabilityOperand<9, 0, 0, [], []>;430defm Float64 : CapabilityOperand<10, 0, 0, [], []>;431defm Int64 : CapabilityOperand<11, 0, 0, [], []>;432defm Int64Atomics : CapabilityOperand<12, 0, 0, [], [Int64]>;433defm ImageBasic : CapabilityOperand<13, 0, 0, [], [Kernel]>;434defm ImageReadWrite : CapabilityOperand<14, 0, 0, [], [ImageBasic]>;435defm ImageMipmap : CapabilityOperand<15, 0, 0, [], [ImageBasic]>;436defm Pipes : CapabilityOperand<17, 0, 0, [], [Kernel]>;437defm Groups : CapabilityOperand<18, 0, 0, [], []>;438defm DeviceEnqueue : CapabilityOperand<19, 0, 0, [], []>;439defm LiteralSampler : CapabilityOperand<20, 0, 0, [], [Kernel]>;440defm AtomicStorage : CapabilityOperand<21, 0, 0, [], [Shader]>;441defm Int16 : CapabilityOperand<22, 0, 0, [], []>;442defm TessellationPointSize : CapabilityOperand<23, 0, 0, [], [Tessellation]>;443defm GeometryPointSize : CapabilityOperand<24, 0, 0, [], [Geometry]>;444defm ImageGatherExtended : CapabilityOperand<25, 0, 0, [], [Shader]>;445defm StorageImageMultisample : CapabilityOperand<27, 0, 0, [], [Shader]>;446defm UniformBufferArrayDynamicIndexing : CapabilityOperand<28, 0, 0, [], [Shader]>;447defm SampledImageArrayDynamicIndexing : CapabilityOperand<29, 0, 0, [], [Shader]>;448defm StorageBufferArrayDynamicIndexing : CapabilityOperand<30, 0, 0, [], [Shader]>;449defm StorageImageArrayDynamicIndexing : CapabilityOperand<31, 0, 0, [], [Shader]>;450defm ClipDistance : CapabilityOperand<32, 0, 0, [], [Shader]>;451defm CullDistance : CapabilityOperand<33, 0, 0, [], [Shader]>;452defm SampleRateShading : CapabilityOperand<35, 0, 0, [], [Shader]>;453defm SampledRect : CapabilityOperand<37, 0, 0, [], [Shader]>;454defm ImageRect : CapabilityOperand<36, 0, 0, [], [SampledRect]>;455defm GenericPointer : CapabilityOperand<38, 0, 0, [], [Addresses]>;456defm Int8 : CapabilityOperand<39, 0, 0, [], []>;457defm InputAttachment : CapabilityOperand<40, 0, 0, [], [Shader]>;458defm SparseResidency : CapabilityOperand<41, 0, 0, [], [Shader]>;459defm MinLod : CapabilityOperand<42, 0, 0, [], [Shader]>;460defm Sampled1D : CapabilityOperand<43, 0, 0, [], []>;461defm Image1D : CapabilityOperand<44, 0, 0, [], [Sampled1D]>;462defm SampledCubeArray : CapabilityOperand<45, 0, 0, [], [Shader]>;463defm ImageCubeArray : CapabilityOperand<34, 0, 0, [], [SampledCubeArray]>;464defm SampledBuffer : CapabilityOperand<46, 0, 0, [], []>;465defm ImageBuffer : CapabilityOperand<47, 0, 0, [], [SampledBuffer]>;466defm ImageMSArray : CapabilityOperand<48, 0, 0, [], [Shader]>;467defm StorageImageExtendedFormats : CapabilityOperand<49, 0, 0, [], [Shader]>;468defm ImageQuery : CapabilityOperand<50, 0, 0, [], [Shader]>;469defm DerivativeControl : CapabilityOperand<51, 0, 0, [], [Shader]>;470defm InterpolationFunction : CapabilityOperand<52, 0, 0, [], [Shader]>;471defm TransformFeedback : CapabilityOperand<53, 0, 0, [], [Shader]>;472defm GeometryStreams : CapabilityOperand<54, 0, 0, [], [Geometry]>;473defm StorageImageReadWithoutFormat : CapabilityOperand<55, 0, 0, [], [Shader]>;474defm StorageImageWriteWithoutFormat : CapabilityOperand<56, 0, 0, [], [Shader]>;475defm MultiViewport : CapabilityOperand<57, 0, 0, [], [Geometry]>;476defm SubgroupDispatch : CapabilityOperand<58, 0x10100, 0, [], [DeviceEnqueue]>;477defm NamedBarrier : CapabilityOperand<59, 0x10100, 0, [], [Kernel]>;478defm PipeStorage : CapabilityOperand<60, 0x10100, 0, [], [Pipes]>;479defm GroupNonUniform : CapabilityOperand<61, 0x10300, 0, [], []>;480defm GroupNonUniformVote : CapabilityOperand<62, 0x10300, 0, [], [GroupNonUniform]>;481defm GroupNonUniformArithmetic : CapabilityOperand<63, 0x10300, 0, [], [GroupNonUniform]>;482defm GroupNonUniformBallot : CapabilityOperand<64, 0x10300, 0, [], [GroupNonUniform]>;483defm GroupNonUniformShuffle : CapabilityOperand<65, 0x10300, 0, [], [GroupNonUniform]>;484defm GroupNonUniformShuffleRelative : CapabilityOperand<66, 0x10300, 0, [], [GroupNonUniform]>;485defm GroupNonUniformClustered : CapabilityOperand<67, 0x10300, 0, [], [GroupNonUniform]>;486defm GroupNonUniformQuad : CapabilityOperand<68, 0x10300, 0, [], [GroupNonUniform]>;487defm SubgroupBallotKHR : CapabilityOperand<4423, 0, 0, [SPV_KHR_shader_ballot], []>;488defm DrawParameters : CapabilityOperand<4427, 0x10300, 0, [SPV_KHR_shader_draw_parameters], [Shader]>;489defm SubgroupVoteKHR : CapabilityOperand<4431, 0, 0, [SPV_KHR_subgroup_vote], []>;490defm StorageBuffer16BitAccess : CapabilityOperand<4433, 0x10300, 0, [SPV_KHR_16bit_storage], []>;491defm StorageUniform16 : CapabilityOperand<4434, 0x10300, 0, [SPV_KHR_16bit_storage], [StorageBuffer16BitAccess]>;492defm StoragePushConstant16 : CapabilityOperand<4435, 0x10300, 0, [SPV_KHR_16bit_storage], []>;493defm StorageInputOutput16 : CapabilityOperand<4436, 0x10300, 0, [SPV_KHR_16bit_storage], []>;494defm DeviceGroup : CapabilityOperand<4437, 0x10300, 0, [SPV_KHR_device_group], []>;495defm MultiView : CapabilityOperand<4439, 0x10300, 0, [SPV_KHR_multiview], [Shader]>;496defm VariablePointersStorageBuffer : CapabilityOperand<4441, 0x10300, 0, [SPV_KHR_variable_pointers], [Shader]>;497defm VariablePointers : CapabilityOperand<4442, 0x10300, 0, [SPV_KHR_variable_pointers], [VariablePointersStorageBuffer]>;498defm AtomicStorageOps : CapabilityOperand<4445, 0, 0, [SPV_KHR_shader_atomic_counter_ops], []>;499defm SampleMaskPostDepthCoverage : CapabilityOperand<4447, 0, 0, [SPV_KHR_post_depth_coverage], []>;500defm StorageBuffer8BitAccess : CapabilityOperand<4448, 0, 0, [SPV_KHR_8bit_storage], []>;501defm UniformAndStorageBuffer8BitAccess : CapabilityOperand<4449, 0, 0, [SPV_KHR_8bit_storage], [StorageBuffer8BitAccess]>;502defm StoragePushConstant8 : CapabilityOperand<4450, 0, 0, [SPV_KHR_8bit_storage], []>;503defm DenormPreserve : CapabilityOperand<4464, 0x10400, 0, [SPV_KHR_float_controls], []>;504defm DenormFlushToZero : CapabilityOperand<4465, 0x10400, 0, [SPV_KHR_float_controls], []>;505defm SignedZeroInfNanPreserve : CapabilityOperand<4466, 0x10400, 0, [SPV_KHR_float_controls], []>;506defm RoundingModeRTE : CapabilityOperand<4467, 0x10400, 0, [SPV_KHR_float_controls], []>;507defm RoundingModeRTZ : CapabilityOperand<4468, 0x10400, 0, [SPV_KHR_float_controls], []>;508defm Float16ImageAMD : CapabilityOperand<5008, 0, 0, [], [Shader]>;509defm ImageGatherBiasLodAMD : CapabilityOperand<5009, 0, 0, [], [Shader]>;510defm FragmentMaskAMD : CapabilityOperand<5010, 0, 0, [], [Shader]>;511defm StencilExportEXT : CapabilityOperand<5013, 0, 0, [], [Shader]>;512defm ImageReadWriteLodAMD : CapabilityOperand<5015, 0, 0, [], [Shader]>;513defm ShaderClockKHR : CapabilityOperand<5055, 0, 0, [SPV_KHR_shader_clock], []>;514defm SampleMaskOverrideCoverageNV : CapabilityOperand<5249, 0, 0, [], [SampleRateShading]>;515defm GeometryShaderPassthroughNV : CapabilityOperand<5251, 0, 0, [], [Geometry]>;516defm ShaderViewportIndexLayerEXT : CapabilityOperand<5254, 0, 0, [], [MultiViewport]>;517defm ShaderViewportMaskNV : CapabilityOperand<5255, 0, 0, [], [ShaderViewportIndexLayerEXT]>;518defm ShaderStereoViewNV : CapabilityOperand<5259, 0, 0, [], [ShaderViewportMaskNV]>;519defm PerViewAttributesNV : CapabilityOperand<5260, 0, 0, [], [MultiView]>;520defm FragmentFullyCoveredEXT : CapabilityOperand<5265, 0, 0, [], [Shader]>;521defm MeshShadingNV : CapabilityOperand<5266, 0, 0, [], [Shader]>;522defm ShaderNonUniformEXT : CapabilityOperand<5301, 0, 0, [], [Shader]>;523defm RuntimeDescriptorArrayEXT : CapabilityOperand<5302, 0, 0, [], [Shader]>;524defm InputAttachmentArrayDynamicIndexingEXT : CapabilityOperand<5303, 0, 0, [], [InputAttachment]>;525defm UniformTexelBufferArrayDynamicIndexingEXT : CapabilityOperand<5304, 0, 0, [], [SampledBuffer]>;526defm StorageTexelBufferArrayDynamicIndexingEXT : CapabilityOperand<5305, 0, 0, [], [ImageBuffer]>;527defm UniformBufferArrayNonUniformIndexingEXT : CapabilityOperand<5306, 0, 0, [], [ShaderNonUniformEXT]>;528defm SampledImageArrayNonUniformIndexingEXT : CapabilityOperand<5307, 0, 0, [], [ShaderNonUniformEXT]>;529defm StorageBufferArrayNonUniformIndexingEXT : CapabilityOperand<5308, 0, 0, [], [ShaderNonUniformEXT]>;530defm StorageImageArrayNonUniformIndexingEXT : CapabilityOperand<5309, 0, 0, [], [ShaderNonUniformEXT]>;531defm InputAttachmentArrayNonUniformIndexingEXT : CapabilityOperand<5310, 0, 0, [], [InputAttachment, ShaderNonUniformEXT]>;532defm UniformTexelBufferArrayNonUniformIndexingEXT : CapabilityOperand<5311, 0, 0, [], [SampledBuffer, ShaderNonUniformEXT]>;533defm StorageTexelBufferArrayNonUniformIndexingEXT : CapabilityOperand<5312, 0, 0, [], [ImageBuffer, ShaderNonUniformEXT]>;534defm RayTracingNV : CapabilityOperand<5340, 0, 0, [], [Shader]>;535defm SubgroupShuffleINTEL : CapabilityOperand<5568, 0, 0, [SPV_INTEL_subgroups], []>;536defm SubgroupBufferBlockIOINTEL : CapabilityOperand<5569, 0, 0, [SPV_INTEL_subgroups], []>;537defm SubgroupImageBlockIOINTEL : CapabilityOperand<5570, 0, 0, [SPV_INTEL_subgroups], []>;538defm SubgroupImageMediaBlockIOINTEL : CapabilityOperand<5579, 0, 0, [SPV_INTEL_media_block_io], []>;539defm SubgroupAvcMotionEstimationINTEL : CapabilityOperand<5696, 0, 0, [], []>;540defm SubgroupAvcMotionEstimationIntraINTEL : CapabilityOperand<5697, 0, 0, [], []>;541defm SubgroupAvcMotionEstimationChromaINTEL : CapabilityOperand<5698, 0, 0, [], []>;542defm GroupNonUniformPartitionedNV : CapabilityOperand<5297, 0, 0, [], []>;543defm VulkanMemoryModelKHR : CapabilityOperand<5345, 0, 0, [], []>;544defm VulkanMemoryModelDeviceScopeKHR : CapabilityOperand<5346, 0, 0, [], []>;545defm ImageFootprintNV : CapabilityOperand<5282, 0, 0, [], []>;546defm FragmentBarycentricNV : CapabilityOperand<5284, 0, 0, [], []>;547defm ComputeDerivativeGroupQuadsNV : CapabilityOperand<5288, 0, 0, [], []>;548defm DemoteToHelperInvocation : CapabilityOperand<5379, 0x10600, 0, [SPV_EXT_demote_to_helper_invocation], []>;549defm ComputeDerivativeGroupLinearNV : CapabilityOperand<5350, 0, 0, [], []>;550defm FragmentDensityEXT : CapabilityOperand<5291, 0, 0, [], [Shader]>;551defm PhysicalStorageBufferAddressesEXT : CapabilityOperand<5347, 0, 0, [], [Shader]>;552defm CooperativeMatrixNV : CapabilityOperand<5357, 0, 0, [], [Shader]>;553defm ArbitraryPrecisionIntegersALTERA : CapabilityOperand<5844, 0, 0, [SPV_ALTERA_arbitrary_precision_integers], [Int8, Int16]>;554defm OptNoneINTEL : CapabilityOperand<6094, 0, 0, [SPV_INTEL_optnone], []>;555defm OptNoneEXT : CapabilityOperand<6094, 0, 0, [SPV_EXT_optnone], []>;556defm BitInstructions : CapabilityOperand<6025, 0, 0, [SPV_KHR_bit_instructions], []>;557defm ExpectAssumeKHR : CapabilityOperand<5629, 0, 0, [SPV_KHR_expect_assume], []>;558defm FunctionPointersINTEL : CapabilityOperand<5603, 0, 0, [SPV_INTEL_function_pointers], []>;559defm IndirectReferencesINTEL : CapabilityOperand<5604, 0, 0, [SPV_INTEL_function_pointers], []>;560defm AsmINTEL : CapabilityOperand<5606, 0, 0, [SPV_INTEL_inline_assembly], []>;561defm DotProductInputAll : CapabilityOperand<6016, 0x10600, 0, [SPV_KHR_integer_dot_product], []>;562defm DotProductInput4x8Bit : CapabilityOperand<6017, 0x10600, 0, [SPV_KHR_integer_dot_product], [Int8]>;563defm DotProductInput4x8BitPacked : CapabilityOperand<6018, 0x10600, 0, [SPV_KHR_integer_dot_product], []>;564defm DotProduct : CapabilityOperand<6019, 0x10600, 0, [SPV_KHR_integer_dot_product], []>;565defm GroupNonUniformRotateKHR : CapabilityOperand<6026, 0, 0, [SPV_KHR_subgroup_rotate], [GroupNonUniform]>;566defm FloatControls2567 : CapabilityOperand<6029, 0x10200, 0, [SPV_KHR_float_controls2], []>;568defm AtomicFloat32AddEXT : CapabilityOperand<6033, 0, 0, [SPV_EXT_shader_atomic_float_add], []>;569defm AtomicFloat64AddEXT : CapabilityOperand<6034, 0, 0, [SPV_EXT_shader_atomic_float_add], []>;570defm AtomicFloat16AddEXT : CapabilityOperand<6095, 0, 0, [SPV_EXT_shader_atomic_float16_add], []>;571defm AtomicBFloat16AddINTEL : CapabilityOperand<6255, 0, 0, [SPV_INTEL_16bit_atomics], []>;572defm AtomicFloat16MinMaxEXT : CapabilityOperand<5616, 0, 0, [SPV_EXT_shader_atomic_float_min_max], []>;573defm AtomicFloat32MinMaxEXT : CapabilityOperand<5612, 0, 0, [SPV_EXT_shader_atomic_float_min_max], []>;574defm AtomicFloat64MinMaxEXT : CapabilityOperand<5613, 0, 0, [SPV_EXT_shader_atomic_float_min_max], []>;575defm AtomicBFloat16MinMaxINTEL : CapabilityOperand<6256, 0, 0, [SPV_INTEL_16bit_atomics], []>;576defm VariableLengthArrayINTEL : CapabilityOperand<5817, 0, 0, [SPV_INTEL_variable_length_array], []>;577defm GroupUniformArithmeticKHR : CapabilityOperand<6400, 0, 0, [SPV_KHR_uniform_group_instructions], []>;578defm USMStorageClassesINTEL : CapabilityOperand<5935, 0, 0, [SPV_INTEL_usm_storage_classes], [Kernel]>;579defm BFloat16ArithmeticINTEL : CapabilityOperand<6226, 0, 0, [SPV_INTEL_bfloat16_arithmetic], []>;580defm BFloat16ConversionINTEL : CapabilityOperand<6115, 0, 0, [SPV_INTEL_bfloat16_conversion], []>;581defm GlobalVariableHostAccessINTEL : CapabilityOperand<6187, 0, 0, [SPV_INTEL_global_variable_host_access], []>;582defm HostAccessINTEL : CapabilityOperand<6188, 0, 0, [SPV_INTEL_global_variable_host_access], []>;583defm GlobalVariableFPGADecorationsINTEL : CapabilityOperand<6189, 0, 0, [SPV_INTEL_global_variable_fpga_decorations], []>;584defm CacheControlsINTEL : CapabilityOperand<6441, 0, 0, [SPV_INTEL_cache_controls], []>;585defm CooperativeMatrixKHR : CapabilityOperand<6022, 0, 0, [SPV_KHR_cooperative_matrix], []>;586defm ArithmeticFenceEXT : CapabilityOperand<6144, 0, 0, [SPV_EXT_arithmetic_fence], []>;587defm SplitBarrierINTEL : CapabilityOperand<6141, 0, 0, [SPV_INTEL_split_barrier], []>;588defm CooperativeMatrixCheckedInstructionsINTEL : CapabilityOperand<6192, 0, 0, [SPV_INTEL_joint_matrix], []>;589defm CooperativeMatrixPrefetchINTEL : CapabilityOperand<6411, 0, 0, [SPV_INTEL_joint_matrix], []>;590defm PackedCooperativeMatrixINTEL : CapabilityOperand<6434, 0, 0, [SPV_INTEL_joint_matrix], []>;591defm CooperativeMatrixInvocationInstructionsINTEL : CapabilityOperand<6435, 0, 0, [SPV_INTEL_joint_matrix], []>;592defm CooperativeMatrixTF32ComponentTypeINTEL : CapabilityOperand<6436, 0, 0, [SPV_INTEL_joint_matrix], []>;593defm CooperativeMatrixBFloat16ComponentTypeINTEL : CapabilityOperand<6437, 0, 0, [SPV_INTEL_joint_matrix], []>;594defm RoundToInfinityINTEL : CapabilityOperand<5582, 0, 0, [SPV_INTEL_float_controls2], []>;595defm FloatingPointModeINTEL : CapabilityOperand<5583, 0, 0, [SPV_INTEL_float_controls2], []>;596defm FunctionFloatControlINTEL : CapabilityOperand<5821, 0, 0, [SPV_INTEL_float_controls2], []>;597defm KernelAttributesINTEL : CapabilityOperand<5892, 0, 0, [SPV_INTEL_kernel_attributes], [Kernel]>;598// TODO-SPIRV: add these once they are used / tested.599// defm FPGAKernelAttributesINTEL : CapabilityOperand<5897, 0, 0, [SPV_INTEL_kernel_attributes], [Kernel]>;600// defm FPGAKernelAttributesv2INTEL : CapabilityOperand<6161, 0, 0, [SPV_INTEL_kernel_attributes], [Kernel]>;601// END TODO-SPIRV602defm LongCompositesINTEL : CapabilityOperand<6089, 0, 0, [SPV_INTEL_long_composites], []>;603defm BindlessImagesINTEL : CapabilityOperand<6528, 0, 0, [SPV_INTEL_bindless_images], []>;604defm MemoryAccessAliasingINTEL : CapabilityOperand<5910, 0, 0, [SPV_INTEL_memory_access_aliasing], []>;605defm FPMaxErrorINTEL : CapabilityOperand<6169, 0, 0, [SPV_INTEL_fp_max_error], []>;606defm TernaryBitwiseFunctionINTEL : CapabilityOperand<6241, 0, 0, [SPV_INTEL_ternary_bitwise_function], []>;607defm SubgroupMatrixMultiplyAccumulateINTEL : CapabilityOperand<6236, 0, 0, [SPV_INTEL_subgroup_matrix_multiply_accumulate], []>;608defm Subgroup2DBlockIOINTEL : CapabilityOperand<6228, 0, 0, [SPV_INTEL_2d_block_io], []>;609defm Subgroup2DBlockTransformINTEL : CapabilityOperand<6229, 0, 0, [SPV_INTEL_2d_block_io], [Subgroup2DBlockIOINTEL]>;610defm Subgroup2DBlockTransposeINTEL : CapabilityOperand<6230, 0, 0, [SPV_INTEL_2d_block_io], [Subgroup2DBlockIOINTEL]>;611defm PredicatedIOINTEL : CapabilityOperand<6257, 0, 0, [SPV_INTEL_predicated_io], []>;612defm Int4TypeINTEL : CapabilityOperand<5112, 0, 0, [SPV_INTEL_int4], []>;613defm Int4CooperativeMatrixINTEL : CapabilityOperand<5114, 0, 0, [SPV_INTEL_int4], [Int4TypeINTEL, CooperativeMatrixKHR]>;614defm TensorFloat32RoundingINTEL : CapabilityOperand<6425, 0, 0, [SPV_INTEL_tensor_float32_conversion], []>;615defm BFloat16TypeKHR : CapabilityOperand<5116, 0, 0, [SPV_KHR_bfloat16], []>;616defm BFloat16DotProductKHR : CapabilityOperand<5117, 0, 0, [SPV_KHR_bfloat16], [BFloat16TypeKHR]>;617defm BFloat16CooperativeMatrixKHR : CapabilityOperand<5118, 0, 0, [SPV_KHR_bfloat16], [BFloat16TypeKHR, CooperativeMatrixKHR]>;618defm BlockingPipesALTERA : CapabilityOperand<5945, 0, 0, [SPV_ALTERA_blocking_pipes], []>;619defm ArbitraryPrecisionFixedPointALTERA : CapabilityOperand<5922, 0, 0, [SPV_ALTERA_arbitrary_precision_fixed_point], []>;620 621//===----------------------------------------------------------------------===//622// Multiclass used to define SourceLanguage enum values and at the same time623// SymbolicOperand entries.624//===----------------------------------------------------------------------===//625 626def SourceLanguage : GenericEnum, Operand<i32> {627 let FilterClass = "SourceLanguage";628 let NameField = "Name";629 let ValueField = "Value";630 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");631}632 633class SourceLanguage<string name, bits<32> value> {634 string Name = name;635 bits<32> Value = value;636}637 638multiclass SourceLanguageOperand<bits<32> value> {639 def : SourceLanguage<NAME, value>;640 defm : SymbolicOperandWithRequirements<SourceLanguageOperand, value, NAME, 0,641 0, [], [], []>;642}643 644defm Unknown : SourceLanguageOperand<0>;645defm ESSL : SourceLanguageOperand<1>;646defm GLSL : SourceLanguageOperand<2>;647defm OpenCL_C : SourceLanguageOperand<3>;648defm OpenCL_CPP : SourceLanguageOperand<4>;649defm HLSL : SourceLanguageOperand<5>;650 651//===----------------------------------------------------------------------===//652// Multiclass used to define AddressingModel enum values and at the same time653// SymbolicOperand entries with string mnemonics, and capabilities.654//===----------------------------------------------------------------------===//655 656def AddressingModel : GenericEnum, Operand<i32> {657 let FilterClass = "AddressingModel";658 let NameField = "Name";659 let ValueField = "Value";660 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");661}662 663class AddressingModel<string name, bits<32> value> {664 string Name = name;665 bits<32> Value = value;666}667 668multiclass AddressingModelOperand<bits<32> value, list<Capability> reqCapabilities> {669 def : AddressingModel<NAME, value>;670 defm : SymbolicOperandWithRequirements<AddressingModelOperand, value, NAME, 0,671 0, [], reqCapabilities, []>;672}673 674defm Logical : AddressingModelOperand<0, []>;675defm Physical32 : AddressingModelOperand<1, [Addresses]>;676defm Physical64 : AddressingModelOperand<2, [Addresses]>;677defm PhysicalStorageBuffer64EXT : AddressingModelOperand<5348, [PhysicalStorageBufferAddressesEXT]>;678 679//===----------------------------------------------------------------------===//680// Multiclass used to define ExecutionModel enum values and at the same time681// SymbolicOperand entries with string mnemonics and capabilities.682//===----------------------------------------------------------------------===//683 684def ExecutionModel : GenericEnum, Operand<i32> {685 let FilterClass = "ExecutionModel";686 let NameField = "Name";687 let ValueField = "Value";688 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");689}690 691class ExecutionModel<string name, bits<32> value> {692 string Name = name;693 bits<32> Value = value;694}695 696multiclass ExecutionModelOperand<bits<32> value, list<Capability> reqCapabilities> {697 def : ExecutionModel<NAME, value>;698 defm : SymbolicOperandWithRequirements<ExecutionModelOperand, value, NAME, 0,699 0, [], reqCapabilities, []>;700}701 702defm Vertex : ExecutionModelOperand<0, [Shader]>;703defm TessellationControl: ExecutionModelOperand<1, [Tessellation]>;704defm TessellationEvaluation: ExecutionModelOperand<2, [Tessellation]>;705defm Geometry: ExecutionModelOperand<3, [Geometry]>;706defm Fragment: ExecutionModelOperand<4, [Shader]>;707defm GLCompute: ExecutionModelOperand<5, [Shader]>;708defm Kernel: ExecutionModelOperand<6, [Kernel]>;709defm TaskNV: ExecutionModelOperand<5267, [MeshShadingNV]>;710defm MeshNV: ExecutionModelOperand<5268, [MeshShadingNV]>;711defm RayGenerationNV: ExecutionModelOperand<5313, [RayTracingNV]>;712defm IntersectionNV: ExecutionModelOperand<5314, [RayTracingNV]>;713defm AnyHitNV: ExecutionModelOperand<5315, [RayTracingNV]>;714defm ClosestHitNV: ExecutionModelOperand<5316, [RayTracingNV]>;715defm MissNV: ExecutionModelOperand<5317, [RayTracingNV]>;716defm CallableNV : ExecutionModelOperand<5318, [RayTracingNV]>;717 718//===----------------------------------------------------------------------===//719// Multiclass used to define MemoryModel enum values and at the same time720// SymbolicOperand entries with string mnemonics and capabilities.721//===----------------------------------------------------------------------===//722 723def MemoryModel : GenericEnum, Operand<i32> {724 let FilterClass = "MemoryModel";725 let NameField = "Name";726 let ValueField = "Value";727 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");728}729 730class MemoryModel<string name, bits<32> value> {731 string Name = name;732 bits<32> Value = value;733}734 735multiclass MemoryModelOperand<bits<32> value, list<Capability> reqCapabilities> {736 def : MemoryModel<NAME, value>;737 defm : SymbolicOperandWithRequirements<MemoryModelOperand, value, NAME, 0,738 0, [], reqCapabilities, []>;739}740 741defm Simple : MemoryModelOperand<0, [Shader]>;742defm GLSL450 : MemoryModelOperand<1, [Shader]>;743defm OpenCL : MemoryModelOperand<2, [Kernel]>;744defm VulkanKHR : MemoryModelOperand<3, [VulkanMemoryModelKHR]>;745 746//===----------------------------------------------------------------------===//747// Multiclass used to define ExecutionMode enum values and at the same time748// SymbolicOperand entries with string mnemonics and capabilities.749//===----------------------------------------------------------------------===//750 751def ExecutionMode : GenericEnum, Operand<i32> {752 let FilterClass = "ExecutionMode";753 let NameField = "Name";754 let ValueField = "Value";755 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");756}757 758class ExecutionMode<string name, bits<32> value> {759 string Name = name;760 bits<32> Value = value;761}762 763multiclass ExecutionModeOperand<bits<32> value, list<Capability> reqCapabilities> {764 def : ExecutionMode<NAME, value>;765 defm : SymbolicOperandWithRequirements<ExecutionModeOperand, value, NAME, 0,766 0, [], reqCapabilities, []>;767}768 769defm Invocations : ExecutionModeOperand<0, [Geometry]>;770defm SpacingEqual : ExecutionModeOperand<1, [Tessellation]>;771defm SpacingFractionalEven : ExecutionModeOperand<2, [Tessellation]>;772defm SpacingFractionalOdd : ExecutionModeOperand<3, [Tessellation]>;773defm VertexOrderCw : ExecutionModeOperand<4, [Tessellation]>;774defm VertexOrderCcw : ExecutionModeOperand<5, [Tessellation]>;775defm PixelCenterInteger : ExecutionModeOperand<6, [Shader]>;776defm OriginUpperLeft : ExecutionModeOperand<7, [Shader]>;777defm OriginLowerLeft : ExecutionModeOperand<8, [Shader]>;778defm EarlyFragmentTests : ExecutionModeOperand<9, [Shader]>;779defm PointMode : ExecutionModeOperand<10, [Tessellation]>;780defm Xfb : ExecutionModeOperand<11, [TransformFeedback]>;781defm DepthReplacing : ExecutionModeOperand<12, [Shader]>;782defm DepthGreater : ExecutionModeOperand<14, [Shader]>;783defm DepthLess : ExecutionModeOperand<15, [Shader]>;784defm DepthUnchanged : ExecutionModeOperand<16, [Shader]>;785defm LocalSize : ExecutionModeOperand<17, []>;786defm LocalSizeHint : ExecutionModeOperand<18, [Kernel]>;787defm InputPoints : ExecutionModeOperand<19, [Geometry]>;788defm InputLines : ExecutionModeOperand<20, [Geometry]>;789defm InputLinesAdjacency : ExecutionModeOperand<21, [Geometry]>;790defm Triangles : ExecutionModeOperand<22, [Geometry]>;791defm InputTrianglesAdjacency : ExecutionModeOperand<23, [Geometry]>;792defm Quads : ExecutionModeOperand<24, [Tessellation]>;793defm Isolines : ExecutionModeOperand<25, [Tessellation]>;794defm OutputVertices : ExecutionModeOperand<26, [Geometry]>;795defm OutputPoints : ExecutionModeOperand<27, [Geometry]>;796defm OutputLineStrip : ExecutionModeOperand<28, [Geometry]>;797defm OutputTriangleStrip : ExecutionModeOperand<29, [Geometry]>;798defm VecTypeHint : ExecutionModeOperand<30, [Kernel]>;799defm ContractionOff : ExecutionModeOperand<31, [Kernel]>;800defm Initializer : ExecutionModeOperand<33, [Kernel]>;801defm Finalizer : ExecutionModeOperand<34, [Kernel]>;802defm SubgroupSize : ExecutionModeOperand<35, [SubgroupDispatch]>;803defm SubgroupsPerWorkgroup : ExecutionModeOperand<36, [SubgroupDispatch]>;804defm SubgroupsPerWorkgroupId : ExecutionModeOperand<37, [SubgroupDispatch]>;805defm LocalSizeId : ExecutionModeOperand<38, []>;806defm LocalSizeHintId : ExecutionModeOperand<39, [Kernel]>;807defm PostDepthCoverage : ExecutionModeOperand<4446, [SampleMaskPostDepthCoverage]>;808defm DenormPreserve : ExecutionModeOperand<4459, [DenormPreserve]>;809defm DenormFlushToZero : ExecutionModeOperand<4460, [DenormFlushToZero]>;810defm SignedZeroInfNanPreserve : ExecutionModeOperand<4461, [SignedZeroInfNanPreserve]>;811defm RoundingModeRTE : ExecutionModeOperand<4462, [RoundingModeRTE]>;812defm RoundingModeRTZ : ExecutionModeOperand<4463, [RoundingModeRTZ]>;813defm StencilRefReplacingEXT : ExecutionModeOperand<5027, [StencilExportEXT]>;814defm OutputLinesNV : ExecutionModeOperand<5269, [MeshShadingNV]>;815defm DerivativeGroupQuadsNV : ExecutionModeOperand<5289, [ComputeDerivativeGroupQuadsNV]>;816defm DerivativeGroupLinearNV : ExecutionModeOperand<5290, [ComputeDerivativeGroupLinearNV]>;817defm OutputTrianglesNV : ExecutionModeOperand<5298, [MeshShadingNV]>;818defm RoundingModeRTPINTEL : ExecutionModeOperand<5620, [RoundToInfinityINTEL]>;819defm RoundingModeRTNINTEL : ExecutionModeOperand<5621, [RoundToInfinityINTEL]>;820defm FloatingPointModeALTINTEL : ExecutionModeOperand<5622, [FloatingPointModeINTEL]>;821defm FloatingPointModeIEEEINTEL : ExecutionModeOperand<5623, [FloatingPointModeINTEL]>;822defm MaxWorkgroupSizeINTEL : ExecutionModeOperand<5893, [KernelAttributesINTEL]>;823// TODO-SPIRV: Add the following once they are used / tested.824// defm MaxWorkDimINTEL : ExecutionModeOperand<5894, [KernelAttributesINTEL]>;825// defm NoGlobalOffsetINTEL : ExecutionModeOperand<5895, [KernelAttributesINTEL]>;826// defm NumSIMDWorkitemsINTEL : ExecutionModeOperand<5896, [FPGAKernelAttributesINTEL]>;827// defm SchedulerTargetFmaxMhzINTEL : ExecutionModeOperand<5903, [FPGAKernelAttributesINTEL]>;828// defm StreamingInterfaceINTEL : ExecutionModeOperand<6154, [FPGAKernelAttributesv2INTEL]>;829// defm RegisterMapInterfaceINTEL : ExecutionModeOperand<6160, [FPGAKernelAttributesv2INTEL]>;830// END TODO-SPIRV831defm FPFastMathDefault : ExecutionModeOperand<6028, [FloatControls2]>;832defm MaximallyReconvergesKHR : ExecutionModeOperand<6023, [Shader]>;833 834//===----------------------------------------------------------------------===//835// Multiclass used to define StorageClass enum values and at the same time836// SymbolicOperand entries with string mnemonics and capabilities.837//===----------------------------------------------------------------------===//838 839def StorageClass : GenericEnum, Operand<i32> {840 let FilterClass = "StorageClass";841 let NameField = "Name";842 let ValueField = "Value";843 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");844}845 846class StorageClass<string name, bits<32> value> {847 string Name = name;848 bits<32> Value = value;849}850 851multiclass StorageClassOperand<bits<32> value, list<Extension> reqExtensions, list<Capability> reqCapabilities> {852 def : StorageClass<NAME, value>;853 defm : SymbolicOperandWithRequirements<StorageClassOperand, value, NAME, 0, 0,854 reqExtensions, reqCapabilities, []>;855}856 857defm UniformConstant : StorageClassOperand<0, [], []>;858defm Input : StorageClassOperand<1, [], []>;859defm Uniform : StorageClassOperand<2, [], [Shader]>;860defm Output : StorageClassOperand<3, [], [Shader]>;861defm Workgroup : StorageClassOperand<4, [], []>;862defm CrossWorkgroup : StorageClassOperand<5, [], []>;863defm Private : StorageClassOperand<6, [], [Shader]>;864defm Function : StorageClassOperand<7, [], []>;865defm Generic : StorageClassOperand<8, [], [GenericPointer]>;866defm PushConstant : StorageClassOperand<9, [], [Shader]>;867defm AtomicCounter : StorageClassOperand<10, [], [AtomicStorage]>;868defm Image : StorageClassOperand<11, [], []>;869defm StorageBuffer : StorageClassOperand<12, [], [Shader]>;870defm CallableDataNV : StorageClassOperand<5328, [], [RayTracingNV]>;871defm IncomingCallableDataNV : StorageClassOperand<5329, [], [RayTracingNV]>;872defm RayPayloadNV : StorageClassOperand<5338, [], [RayTracingNV]>;873defm HitAttributeNV : StorageClassOperand<5339, [], [RayTracingNV]>;874defm IncomingRayPayloadNV : StorageClassOperand<5342, [], [RayTracingNV]>;875defm ShaderRecordBufferNV : StorageClassOperand<5343, [], [RayTracingNV]>;876defm PhysicalStorageBufferEXT : StorageClassOperand<5349, [], [PhysicalStorageBufferAddressesEXT]>;877defm CodeSectionINTEL : StorageClassOperand<5605, [SPV_INTEL_function_pointers], [FunctionPointersINTEL]>;878defm DeviceOnlyINTEL : StorageClassOperand<5936, [SPV_INTEL_usm_storage_classes], [USMStorageClassesINTEL]>;879defm HostOnlyINTEL : StorageClassOperand<5937, [SPV_INTEL_usm_storage_classes], [USMStorageClassesINTEL]>;880 881//===----------------------------------------------------------------------===//882// Multiclass used to define Dim enum values and at the same time883// SymbolicOperand entries with string mnemonics and capabilities.884//===----------------------------------------------------------------------===//885 886def Dim : GenericEnum, Operand<i32> {887 let FilterClass = "Dim";888 let NameField = "Name";889 let ValueField = "Value";890 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");891}892 893class Dim<string name, bits<32> value> {894 string Name = name;895 bits<32> Value = value;896}897 898multiclass DimOperand<bits<32> value, string mnemonic, list<Capability> reqCapabilities> {899 def NAME : Dim<NAME, value>;900 defm : SymbolicOperandWithRequirements<DimOperand, value, mnemonic, 0, 0, [],901 reqCapabilities, []>;902}903 904defm DIM_1D : DimOperand<0, "1D", [Sampled1D, Image1D]>;905defm DIM_2D : DimOperand<1, "2D", [Shader, Kernel, ImageMSArray]>;906defm DIM_3D : DimOperand<2, "3D", []>;907defm DIM_Cube : DimOperand<3, "Cube", [Shader, ImageCubeArray]>;908defm DIM_Rect : DimOperand<4, "Rect", [SampledRect, ImageRect]>;909defm DIM_Buffer : DimOperand<5, "Buffer", [SampledBuffer, ImageBuffer]>;910defm DIM_SubpassData : DimOperand<6, "SubpassData", [InputAttachment]>;911 912//===----------------------------------------------------------------------===//913// Multiclass used to define SamplerAddressingMode enum values and at the same914// time SymbolicOperand entries with string mnemonics and capabilities.915//===----------------------------------------------------------------------===//916 917def SamplerAddressingMode : GenericEnum, Operand<i32> {918 let FilterClass = "SamplerAddressingMode";919 let NameField = "Name";920 let ValueField = "Value";921 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");922}923 924class SamplerAddressingMode<string name, bits<32> value> {925 string Name = name;926 bits<32> Value = value;927}928 929multiclass SamplerAddressingModeOperand<bits<32> value, list<Capability> reqCapabilities> {930 def : SamplerAddressingMode<NAME, value>;931 defm : SymbolicOperandWithRequirements<SamplerAddressingModeOperand, value,932 NAME, 0, 0, [], reqCapabilities, []>;933}934 935defm None : SamplerAddressingModeOperand<0, [Kernel]>;936defm ClampToEdge : SamplerAddressingModeOperand<1, [Kernel]>;937defm Clamp : SamplerAddressingModeOperand<2, [Kernel]>;938defm Repeat : SamplerAddressingModeOperand<3, [Kernel]>;939defm RepeatMirrored : SamplerAddressingModeOperand<4, [Kernel]>;940 941//===----------------------------------------------------------------------===//942// Multiclass used to define SamplerFilterMode enum values and at the same943// time SymbolicOperand entries with string mnemonics and capabilities.944//===----------------------------------------------------------------------===//945 946def SamplerFilterMode : GenericEnum, Operand<i32> {947 let FilterClass = "SamplerFilterMode";948 let NameField = "Name";949 let ValueField = "Value";950 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");951}952 953class SamplerFilterMode<string name, bits<32> value> {954 string Name = name;955 bits<32> Value = value;956}957 958multiclass SamplerFilterModeOperand<bits<32> value, list<Capability> reqCapabilities> {959 def : SamplerFilterMode<NAME, value>;960 defm : SymbolicOperandWithRequirements<SamplerFilterModeOperand, value, NAME,961 0, 0, [], reqCapabilities, []>;962}963 964defm Nearest : SamplerFilterModeOperand<0, [Kernel]>;965defm Linear : SamplerFilterModeOperand<1, [Kernel]>;966 967//===----------------------------------------------------------------------===//968// Multiclass used to define ImageFormat enum values and at the same time969// SymbolicOperand entries with string mnemonics and capabilities.970//===----------------------------------------------------------------------===//971 972def ImageFormat : GenericEnum, Operand<i32> {973 let FilterClass = "ImageFormat";974 let NameField = "Name";975 let ValueField = "Value";976 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");977}978 979class ImageFormat<string name, bits<32> value> {980 string Name = name;981 bits<32> Value = value;982}983 984multiclass ImageFormatOperand<bits<32> value, list<Capability> reqCapabilities> {985 def NAME : ImageFormat<NAME, value>;986 defm : SymbolicOperandWithRequirements<ImageFormatOperand, value, NAME, 0,987 0, [], reqCapabilities, []>;988}989 990defm Unknown : ImageFormatOperand<0, []>;991defm Rgba32f : ImageFormatOperand<1, [Shader]>;992defm Rgba16f : ImageFormatOperand<2, [Shader]>;993defm R32f : ImageFormatOperand<3, [Shader]>;994defm Rgba8 : ImageFormatOperand<4, [Shader]>;995defm Rgba8Snorm : ImageFormatOperand<5, [Shader]>;996defm Rg32f : ImageFormatOperand<6, [StorageImageExtendedFormats]>;997defm Rg16f : ImageFormatOperand<7, [StorageImageExtendedFormats]>;998defm R11fG11fB10f : ImageFormatOperand<8, [StorageImageExtendedFormats]>;999defm R16f : ImageFormatOperand<9, [StorageImageExtendedFormats]>;1000defm Rgba16 : ImageFormatOperand<10, [StorageImageExtendedFormats]>;1001defm Rgb10A2 : ImageFormatOperand<11, [StorageImageExtendedFormats]>;1002defm Rg16 : ImageFormatOperand<12, [StorageImageExtendedFormats]>;1003defm Rg8 : ImageFormatOperand<13, [StorageImageExtendedFormats]>;1004defm R16 : ImageFormatOperand<14, [StorageImageExtendedFormats]>;1005defm R8 : ImageFormatOperand<15, [StorageImageExtendedFormats]>;1006defm Rgba16Snorm : ImageFormatOperand<16, [StorageImageExtendedFormats]>;1007defm Rg16Snorm : ImageFormatOperand<17, [StorageImageExtendedFormats]>;1008defm Rg8Snorm : ImageFormatOperand<18, [StorageImageExtendedFormats]>;1009defm R16Snorm : ImageFormatOperand<19, [StorageImageExtendedFormats]>;1010defm R8Snorm : ImageFormatOperand<20, [StorageImageExtendedFormats]>;1011defm Rgba32i : ImageFormatOperand<21, [Shader]>;1012defm Rgba16i : ImageFormatOperand<22, [Shader]>;1013defm Rgba8i : ImageFormatOperand<23, [Shader]>;1014defm R32i : ImageFormatOperand<24, [Shader]>;1015defm Rg32i : ImageFormatOperand<25, [StorageImageExtendedFormats]>;1016defm Rg16i : ImageFormatOperand<26, [StorageImageExtendedFormats]>;1017defm Rg8i : ImageFormatOperand<27, [StorageImageExtendedFormats]>;1018defm R16i : ImageFormatOperand<28, [StorageImageExtendedFormats]>;1019defm R8i : ImageFormatOperand<29, [StorageImageExtendedFormats]>;1020defm Rgba32ui : ImageFormatOperand<30, [Shader]>;1021defm Rgba16ui : ImageFormatOperand<31, [Shader]>;1022defm Rgba8ui : ImageFormatOperand<32, [Shader]>;1023defm R32ui : ImageFormatOperand<33, [Shader]>;1024defm Rgb10a2ui : ImageFormatOperand<34, [StorageImageExtendedFormats]>;1025defm Rg32ui : ImageFormatOperand<35, [StorageImageExtendedFormats]>;1026defm Rg16ui : ImageFormatOperand<36, [StorageImageExtendedFormats]>;1027defm Rg8ui : ImageFormatOperand<37, [StorageImageExtendedFormats]>;1028defm R16ui : ImageFormatOperand<38, [StorageImageExtendedFormats]>;1029defm R8ui : ImageFormatOperand<39, [StorageImageExtendedFormats]>;1030 1031//===----------------------------------------------------------------------===//1032// Multiclass used to define ImageChannelOrder enum values and at the same time1033// SymbolicOperand entries with string mnemonics and capabilities.1034//===----------------------------------------------------------------------===//1035 1036def ImageChannelOrder : GenericEnum, Operand<i32> {1037 let FilterClass = "ImageChannelOrder";1038 let NameField = "Name";1039 let ValueField = "Value";1040 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1041}1042 1043class ImageChannelOrder<string name, bits<32> value> {1044 string Name = name;1045 bits<32> Value = value;1046}1047 1048multiclass ImageChannelOrderOperand<bits<32> value, list<Capability> reqCapabilities> {1049 def : ImageChannelOrder<NAME, value>;1050 defm : SymbolicOperandWithRequirements<ImageChannelOrderOperand, value, NAME,1051 0, 0, [], reqCapabilities, []>;1052}1053 1054defm R : ImageChannelOrderOperand<0, [Kernel]>;1055defm A : ImageChannelOrderOperand<1, [Kernel]>;1056defm RG : ImageChannelOrderOperand<2, [Kernel]>;1057defm RA : ImageChannelOrderOperand<3, [Kernel]>;1058defm RGB : ImageChannelOrderOperand<4, [Kernel]>;1059defm RGBA : ImageChannelOrderOperand<5, [Kernel]>;1060defm BGRA : ImageChannelOrderOperand<6, [Kernel]>;1061defm ARGB : ImageChannelOrderOperand<7, [Kernel]>;1062defm Intensity : ImageChannelOrderOperand<8, [Kernel]>;1063defm Luminance : ImageChannelOrderOperand<9, [Kernel]>;1064defm Rx : ImageChannelOrderOperand<10, [Kernel]>;1065defm RGx : ImageChannelOrderOperand<11, [Kernel]>;1066defm RGBx : ImageChannelOrderOperand<12, [Kernel]>;1067defm Depth : ImageChannelOrderOperand<13, [Kernel]>;1068defm DepthStencil : ImageChannelOrderOperand<14, [Kernel]>;1069defm sRGB : ImageChannelOrderOperand<15, [Kernel]>;1070defm sRGBx : ImageChannelOrderOperand<16, [Kernel]>;1071defm sRGBA : ImageChannelOrderOperand<17, [Kernel]>;1072defm sBGRA : ImageChannelOrderOperand<18, [Kernel]>;1073defm ABGR : ImageChannelOrderOperand<19, [Kernel]>;1074 1075//===----------------------------------------------------------------------===//1076// Multiclass used to define ImageChannelDataType enum values and at the same1077// time SymbolicOperand entries with string mnemonics and capabilities.1078//===----------------------------------------------------------------------===//1079 1080def ImageChannelDataType : GenericEnum, Operand<i32> {1081 let FilterClass = "ImageChannelDataType";1082 let NameField = "Name";1083 let ValueField = "Value";1084 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1085}1086 1087class ImageChannelDataType<string name, bits<32> value> {1088 string Name = name;1089 bits<32> Value = value;1090}1091 1092multiclass ImageChannelDataTypeOperand<bits<32> value, list<Capability> reqCapabilities> {1093 def : ImageChannelDataType<NAME, value>;1094 defm : SymbolicOperandWithRequirements<ImageChannelDataTypeOperand, value,1095 NAME, 0, 0, [], reqCapabilities, []>;1096}1097 1098defm SnormInt8 : ImageChannelDataTypeOperand<0, []>;1099defm SnormInt16 : ImageChannelDataTypeOperand<1, []>;1100defm UnormInt8 : ImageChannelDataTypeOperand<2, [Kernel]>;1101defm UnormInt16 : ImageChannelDataTypeOperand<3, [Kernel]>;1102defm UnormShort565 : ImageChannelDataTypeOperand<4, [Kernel]>;1103defm UnormShort555 : ImageChannelDataTypeOperand<5, [Kernel]>;1104defm UnormInt101010 : ImageChannelDataTypeOperand<6, [Kernel]>;1105defm SignedInt8 : ImageChannelDataTypeOperand<7, [Kernel]>;1106defm SignedInt16 : ImageChannelDataTypeOperand<8, [Kernel]>;1107defm SignedInt32 : ImageChannelDataTypeOperand<9, [Kernel]>;1108defm UnsignedInt8 : ImageChannelDataTypeOperand<10, [Kernel]>;1109defm UnsignedInt16 : ImageChannelDataTypeOperand<11, [Kernel]>;1110defm UnsigendInt32 : ImageChannelDataTypeOperand<12, [Kernel]>;1111defm HalfFloat : ImageChannelDataTypeOperand<13, [Kernel]>;1112defm Float : ImageChannelDataTypeOperand<14, [Kernel]>;1113defm UnormInt24 : ImageChannelDataTypeOperand<15, [Kernel]>;1114defm UnormInt101010_2 : ImageChannelDataTypeOperand<16, [Kernel]>;1115 1116//===----------------------------------------------------------------------===//1117// Multiclass used to define ImageOperand enum values and at the same time1118// SymbolicOperand entries with string mnemonics and capabilities.1119//===----------------------------------------------------------------------===//1120 1121def ImageOperand : GenericEnum, Operand<i32> {1122 let FilterClass = "ImageOperand";1123 let NameField = "Name";1124 let ValueField = "Value";1125 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1126}1127 1128class ImageOperand<string name, bits<32> value> {1129 string Name = name;1130 bits<32> Value = value;1131}1132 1133multiclass ImageOperandOperand<bits<32> value, list<Capability> reqCapabilities> {1134 def : ImageOperand<NAME, value>;1135 defm : SymbolicOperandWithRequirements<ImageOperandOperand, value, NAME, 0,1136 0, [], reqCapabilities, []>;1137}1138 1139defm None : ImageOperandOperand<0x0, []>;1140defm Bias : ImageOperandOperand<0x1, [Shader]>;1141defm Lod : ImageOperandOperand<0x2, []>;1142defm Grad : ImageOperandOperand<0x4, []>;1143defm ConstOffset : ImageOperandOperand<0x8, []>;1144defm Offset : ImageOperandOperand<0x10, [ImageGatherExtended]>;1145defm ConstOffsets : ImageOperandOperand<0x20, [ImageGatherExtended]>;1146defm Sample : ImageOperandOperand<0x40, []>;1147defm MinLod : ImageOperandOperand<0x80, [MinLod]>;1148defm MakeTexelAvailableKHR : ImageOperandOperand<0x100, [VulkanMemoryModelKHR]>;1149defm MakeTexelVisibleKHR : ImageOperandOperand<0x200, [VulkanMemoryModelKHR]>;1150defm NonPrivateTexelKHR : ImageOperandOperand<0x400, [VulkanMemoryModelKHR]>;1151defm VolatileTexelKHR : ImageOperandOperand<0x800, [VulkanMemoryModelKHR]>;1152defm SignExtend : ImageOperandOperand<0x1000, []>;1153defm ZeroExtend : ImageOperandOperand<0x2000, []>;1154 1155//===----------------------------------------------------------------------===//1156// Multiclass used to define FPFastMathMode enum values and at the same time1157// SymbolicOperand entries with string mnemonics and capabilities.1158//===----------------------------------------------------------------------===//1159 1160def FPFastMathMode : GenericEnum, Operand<i32> {1161 let FilterClass = "FPFastMathMode";1162 let NameField = "Name";1163 let ValueField = "Value";1164 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1165}1166 1167class FPFastMathMode<string name, bits<32> value> {1168 string Name = name;1169 bits<32> Value = value;1170}1171 1172multiclass FPFastMathModeOperand<bits<32> value, list<Capability> reqCapabilities> {1173 def : FPFastMathMode<NAME, value>;1174 defm : SymbolicOperandWithRequirements<FPFastMathModeOperand, value, NAME, 0,1175 0, [], reqCapabilities, []>;1176}1177 1178defm None : FPFastMathModeOperand<0x0, []>;1179defm NotNaN : FPFastMathModeOperand<0x1, [Kernel]>;1180defm NotInf : FPFastMathModeOperand<0x2, [Kernel]>;1181defm NSZ : FPFastMathModeOperand<0x4, [Kernel]>;1182defm AllowRecip : FPFastMathModeOperand<0x8, [Kernel]>;1183defm Fast : FPFastMathModeOperand<0x10, [Kernel]>;1184defm AllowContract : FPFastMathModeOperand<0x10000, [FloatControls2]>;1185defm AllowReassoc : FPFastMathModeOperand<0x20000, [FloatControls2]>;1186defm AllowTransform : FPFastMathModeOperand<0x40000, [FloatControls2]>;1187 1188//===----------------------------------------------------------------------===//1189// Multiclass used to define FPRoundingMode enum values and at the same time1190// SymbolicOperand entries with string mnemonics.1191//===----------------------------------------------------------------------===//1192 1193def FPRoundingMode : GenericEnum, Operand<i32> {1194 let FilterClass = "FPRoundingMode";1195 let NameField = "Name";1196 let ValueField = "Value";1197 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1198}1199 1200class FPRoundingMode<string name, bits<32> value> {1201 string Name = name;1202 bits<32> Value = value;1203}1204 1205multiclass FPRoundingModeOperand<bits<32> value> {1206 def NAME : FPRoundingMode<NAME, value>;1207 defm : SymbolicOperandWithRequirements<FPRoundingModeOperand, value, NAME, 0,1208 0, [], [], []>;1209}1210 1211defm RTE : FPRoundingModeOperand<0>;1212defm RTZ : FPRoundingModeOperand<1>;1213defm RTP : FPRoundingModeOperand<2>;1214defm RTN : FPRoundingModeOperand<3>;1215 1216//===----------------------------------------------------------------------===//1217// Multiclass used to define LinkageType enum values and at the same time1218// SymbolicOperand entries with string mnemonics and capabilities.1219//===----------------------------------------------------------------------===//1220 1221def LinkageType : GenericEnum, Operand<i32> {1222 let FilterClass = "LinkageType";1223 let NameField = "Name";1224 let ValueField = "Value";1225 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1226}1227 1228class LinkageType<string name, bits<32> value> {1229 string Name = name;1230 bits<32> Value = value;1231}1232 1233multiclass LinkageTypeOperand<bits<32> value, list<Capability> reqCapabilities> {1234 def : LinkageType<NAME, value>;1235 defm : SymbolicOperandWithRequirements<LinkageTypeOperand, value, NAME, 0,1236 0, [], reqCapabilities, []>;1237}1238 1239defm Export : LinkageTypeOperand<0, [Linkage]>;1240defm Import : LinkageTypeOperand<1, [Linkage]>;1241defm LinkOnceODR : LinkageTypeOperand<2, [Linkage]>;1242 1243//===----------------------------------------------------------------------===//1244// Multiclass used to define AccessQualifier enum values and at the same time1245// SymbolicOperand entries with string mnemonics and capabilities.1246//===----------------------------------------------------------------------===//1247 1248def AccessQualifier : GenericEnum, Operand<i32> {1249 let FilterClass = "AccessQualifier";1250 let NameField = "Name";1251 let ValueField = "Value";1252 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1253}1254 1255class AccessQualifier<string name, bits<32> value> {1256 string Name = name;1257 bits<32> Value = value;1258}1259 1260multiclass AccessQualifierOperand<bits<32> value, list<Capability> reqCapabilities> {1261 def NAME : AccessQualifier<NAME, value>;1262 defm : SymbolicOperandWithRequirements<AccessQualifierOperand, value, NAME, 0,1263 0, [], reqCapabilities, []>;1264}1265 1266defm ReadOnly : AccessQualifierOperand<0, [Kernel]>;1267defm WriteOnly : AccessQualifierOperand<1, [Kernel]>;1268defm ReadWrite : AccessQualifierOperand<2, [Kernel]>;1269defm None : AccessQualifierOperand<3, []>;1270 1271//===----------------------------------------------------------------------===//1272// Multiclass used to define FunctionParameterAttribute enum values and at the1273// same time SymbolicOperand entries with string mnemonics and capabilities.1274//===----------------------------------------------------------------------===//1275 1276def FunctionParameterAttribute : GenericEnum, Operand<i32> {1277 let FilterClass = "FunctionParameterAttribute";1278 let NameField = "Name";1279 let ValueField = "Value";1280 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1281}1282 1283class FunctionParameterAttribute<string name, bits<32> value> {1284 string Name = name;1285 bits<32> Value = value;1286}1287 1288multiclass FunctionParameterAttributeOperand<bits<32> value, list<Capability> reqCapabilities> {1289 def : FunctionParameterAttribute<NAME, value>;1290 defm : SymbolicOperandWithRequirements<FunctionParameterAttributeOperand,1291 value, NAME, 0, 0, [],1292 reqCapabilities, []>;1293}1294 1295defm Zext : FunctionParameterAttributeOperand<0, [Kernel]>;1296defm Sext : FunctionParameterAttributeOperand<1, [Kernel]>;1297defm ByVal : FunctionParameterAttributeOperand<2, [Kernel]>;1298defm Sret : FunctionParameterAttributeOperand<3, [Kernel]>;1299defm NoAlias : FunctionParameterAttributeOperand<4, [Kernel]>;1300defm NoCapture : FunctionParameterAttributeOperand<5, [Kernel]>;1301defm NoWrite : FunctionParameterAttributeOperand<6, [Kernel]>;1302defm NoReadWrite : FunctionParameterAttributeOperand<7, [Kernel]>;1303 1304//===----------------------------------------------------------------------===//1305// Multiclass used to define Decoration enum values and at the same time1306// SymbolicOperand entries with string mnemonics, versioning, extensions and1307// capabilities.1308//===----------------------------------------------------------------------===//1309 1310def Decoration : GenericEnum, Operand<i32> {1311 let FilterClass = "Decoration";1312 let NameField = "Name";1313 let ValueField = "Value";1314 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1315}1316 1317class Decoration<string name, bits<32> value> {1318 string Name = name;1319 bits<32> Value = value;1320}1321 1322multiclass DecorationOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1323 def : Decoration<NAME, value>;1324 defm : SymbolicOperandWithRequirements<DecorationOperand, value, NAME,1325 minVersion, maxVersion, reqExtensions,1326 reqCapabilities, []>;1327}1328 1329defm RelaxedPrecision : DecorationOperand<0, 0, 0, [], [Shader]>;1330defm SpecId : DecorationOperand<1, 0, 0, [], [Shader, Kernel]>;1331defm Block : DecorationOperand<2, 0, 0, [], [Shader]>;1332defm BufferBlock : DecorationOperand<3, 0, 0, [], [Shader]>;1333defm RowMajor : DecorationOperand<4, 0, 0, [], [Matrix]>;1334defm ColMajor : DecorationOperand<5, 0, 0, [], [Matrix]>;1335defm ArrayStride : DecorationOperand<6, 0, 0, [], [Shader]>;1336defm MatrixStride : DecorationOperand<7, 0, 0, [], [Matrix]>;1337defm GLSLShared : DecorationOperand<8, 0, 0, [], [Shader]>;1338defm GLSLPacked : DecorationOperand<9, 0, 0, [], [Shader]>;1339defm CPacked : DecorationOperand<10, 0, 0, [], [Kernel]>;1340defm BuiltIn : DecorationOperand<11, 0, 0, [], []>;1341defm NoPerspective : DecorationOperand<13, 0, 0, [], [Shader]>;1342defm Flat : DecorationOperand<14, 0, 0, [], [Shader]>;1343defm Patch : DecorationOperand<15, 0, 0, [], [Tessellation]>;1344defm Centroid : DecorationOperand<16, 0, 0, [], [Shader]>;1345defm Sample : DecorationOperand<17, 0, 0, [], [SampleRateShading]>;1346defm Invariant : DecorationOperand<18, 0, 0, [], [Shader]>;1347defm Restrict : DecorationOperand<19, 0, 0, [], []>;1348defm Aliased : DecorationOperand<20, 0, 0, [], []>;1349defm Volatile : DecorationOperand<21, 0, 0, [], []>;1350defm Constant : DecorationOperand<22, 0, 0, [], [Kernel]>;1351defm Coherent : DecorationOperand<23, 0, 0, [], []>;1352defm NonWritable : DecorationOperand<24, 0, 0, [], []>;1353defm NonReadable : DecorationOperand<25, 0, 0, [], []>;1354defm Uniform : DecorationOperand<26, 0, 0, [], [Shader]>;1355defm UniformId : DecorationOperand<27, 0, 0, [], [Shader]>;1356defm SaturatedConversion : DecorationOperand<28, 0, 0, [], [Kernel]>;1357defm Stream : DecorationOperand<29, 0, 0, [], [GeometryStreams]>;1358defm Location : DecorationOperand<30, 0, 0, [], [Shader]>;1359defm Component : DecorationOperand<31, 0, 0, [], [Shader]>;1360defm Index : DecorationOperand<32, 0, 0, [], [Shader]>;1361defm Binding : DecorationOperand<33, 0, 0, [], [Shader]>;1362defm DescriptorSet : DecorationOperand<34, 0, 0, [], [Shader]>;1363defm Offset : DecorationOperand<35, 0, 0, [], [Shader]>;1364defm XfbBuffer : DecorationOperand<36, 0, 0, [], [TransformFeedback]>;1365defm XfbStride : DecorationOperand<37, 0, 0, [], [TransformFeedback]>;1366defm FuncParamAttr : DecorationOperand<38, 0, 0, [], [Kernel]>;1367defm FPRoundingMode : DecorationOperand<39, 0, 0, [], []>;1368defm FPFastMathMode : DecorationOperand<40, 0, 0, [], [Kernel, FloatControls2]>;1369defm LinkageAttributes : DecorationOperand<41, 0, 0, [], [Linkage]>;1370defm NoContraction : DecorationOperand<42, 0, 0, [], [Shader]>;1371defm InputAttachmentIndex : DecorationOperand<43, 0, 0, [], [InputAttachment]>;1372defm Alignment : DecorationOperand<44, 0, 0, [], [Kernel]>;1373defm MaxByteOffset : DecorationOperand<45, 0, 0, [], [Addresses]>;1374defm AlignmentId : DecorationOperand<46, 0, 0, [], [Kernel]>;1375defm MaxByteOffsetId : DecorationOperand<47, 0, 0, [], [Addresses]>;1376defm NoSignedWrap : DecorationOperand<4469, 0x10400, 0, [SPV_KHR_no_integer_wrap_decoration], []>;1377defm NoUnsignedWrap : DecorationOperand<4470, 0x10400, 0, [SPV_KHR_no_integer_wrap_decoration], []>;1378defm ExplicitInterpAMD : DecorationOperand<4999, 0, 0, [], []>;1379defm OverrideCoverageNV : DecorationOperand<5248, 0, 0, [], [SampleMaskOverrideCoverageNV]>;1380defm PassthroughNV : DecorationOperand<5250, 0, 0, [], [GeometryShaderPassthroughNV]>;1381defm ViewportRelativeNV : DecorationOperand<5252, 0, 0, [], [ShaderViewportMaskNV]>;1382defm SecondaryViewportRelativeNV : DecorationOperand<5256, 0, 0, [], [ShaderStereoViewNV]>;1383defm PerPrimitiveNV : DecorationOperand<5271, 0, 0, [], [MeshShadingNV]>;1384defm PerViewNV : DecorationOperand<5272, 0, 0, [], [MeshShadingNV]>;1385defm PerVertexNV : DecorationOperand<5273, 0, 0, [], [FragmentBarycentricNV]>;1386defm NonUniformEXT : DecorationOperand<5300, 0, 0, [], [ShaderNonUniformEXT]>;1387defm CountBuffer : DecorationOperand<5634, 0, 0, [], []>;1388defm UserSemantic : DecorationOperand<5635, 0, 0, [], []>;1389defm RestrictPointerEXT : DecorationOperand<5355, 0, 0, [], [PhysicalStorageBufferAddressesEXT]>;1390defm AliasedPointerEXT : DecorationOperand<5356, 0, 0, [], [PhysicalStorageBufferAddressesEXT]>;1391defm ReferencedIndirectlyINTEL : DecorationOperand<5602, 0, 0, [], [IndirectReferencesINTEL]>;1392defm ClobberINTEL : DecorationOperand<5607, 0, 0, [SPV_INTEL_inline_assembly], [AsmINTEL]>;1393defm SideEffectsINTEL : DecorationOperand<5608, 0, 0, [SPV_INTEL_inline_assembly], [AsmINTEL]>;1394defm ArgumentAttributeINTEL : DecorationOperand<6409, 0, 0, [], [FunctionPointersINTEL]>;1395defm CacheControlLoadINTEL : DecorationOperand<6442, 0, 0, [], [CacheControlsINTEL]>;1396defm CacheControlStoreINTEL : DecorationOperand<6443, 0, 0, [], [CacheControlsINTEL]>;1397defm HostAccessINTEL : DecorationOperand<6188, 0, 0, [], [GlobalVariableHostAccessINTEL]>;1398defm InitModeINTEL : DecorationOperand<6190, 0, 0, [], [GlobalVariableFPGADecorationsINTEL]>;1399defm ImplementInRegisterMapINTEL : DecorationOperand<6191, 0, 0, [], [GlobalVariableFPGADecorationsINTEL]>;1400defm FunctionRoundingModeINTEL : DecorationOperand<5822, 0, 0, [], [FunctionFloatControlINTEL]>;1401defm FunctionDenormModeINTEL : DecorationOperand<5823, 0, 0, [], [FunctionFloatControlINTEL]>;1402defm FunctionFloatingPointModeINTEL : DecorationOperand<6080, 0, 0, [], [FunctionFloatControlINTEL]>;1403defm AliasScopeINTEL : DecorationOperand<5914, 0, 0, [], [MemoryAccessAliasingINTEL]>;1404defm NoAliasINTEL : DecorationOperand<5915, 0, 0, [], [MemoryAccessAliasingINTEL]>;1405defm FPMaxErrorDecorationINTEL : DecorationOperand<6170, 0, 0, [], [FPMaxErrorINTEL]>;1406 1407//===----------------------------------------------------------------------===//1408// Multiclass used to define BuiltIn enum values and at the same time1409// SymbolicOperand entries with string mnemonics, versioning, extensions and1410// capabilities.1411//===----------------------------------------------------------------------===//1412 1413def BuiltIn : GenericEnum, Operand<i32> {1414 let FilterClass = "BuiltIn";1415 let NameField = "Name";1416 let ValueField = "Value";1417 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1418}1419 1420class BuiltIn<string name, bits<32> value> {1421 string Name = name;1422 bits<32> Value = value;1423}1424 1425multiclass BuiltInOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1426 def NAME : BuiltIn<NAME, value>;1427 defm : SymbolicOperandWithRequirements<BuiltInOperand, value, NAME,1428 minVersion, maxVersion, reqExtensions,1429 reqCapabilities, []>;1430}1431 1432defm Position : BuiltInOperand<0, 0, 0, [], [Shader]>;1433defm PointSize : BuiltInOperand<1, 0, 0, [], [Shader]>;1434defm ClipDistanceVariable : BuiltInOperand<3, 0, 0, [], [ClipDistance]>;1435defm CullDistanceVariable : BuiltInOperand<4, 0, 0, [], [CullDistance]>;1436defm VertexId : BuiltInOperand<5, 0, 0, [], [Shader]>;1437defm InstanceId : BuiltInOperand<6, 0, 0, [], [Shader]>;1438defm PrimitiveId : BuiltInOperand<7, 0, 0, [], [Geometry, Tessellation, RayTracingNV]>;1439defm InvocationId : BuiltInOperand<8, 0, 0, [], [Geometry, Tessellation]>;1440defm Layer : BuiltInOperand<9, 0, 0, [], [Geometry]>;1441defm ViewportIndex : BuiltInOperand<10, 0, 0, [], [MultiViewport]>;1442defm TessLevelOuter : BuiltInOperand<11, 0, 0, [], [Tessellation]>;1443defm TessLevelInner : BuiltInOperand<12, 0, 0, [], [Tessellation]>;1444defm TessCoord : BuiltInOperand<13, 0, 0, [], [Tessellation]>;1445defm PatchVertices : BuiltInOperand<14, 0, 0, [], [Tessellation]>;1446defm FragCoord : BuiltInOperand<15, 0, 0, [], [Shader]>;1447defm PointCoord : BuiltInOperand<16, 0, 0, [], [Shader]>;1448defm FrontFacing : BuiltInOperand<17, 0, 0, [], [Shader]>;1449defm SampleId : BuiltInOperand<18, 0, 0, [], [SampleRateShading]>;1450defm SamplePosition : BuiltInOperand<19, 0, 0, [], [SampleRateShading]>;1451defm SampleMask : BuiltInOperand<20, 0, 0, [], [Shader]>;1452defm FragDepth : BuiltInOperand<22, 0, 0, [], [Shader]>;1453defm HelperInvocation : BuiltInOperand<23, 0, 0, [], [Shader]>;1454defm NumWorkgroups : BuiltInOperand<24, 0, 0, [], []>;1455defm WorkgroupSize : BuiltInOperand<25, 0, 0, [], []>;1456defm WorkgroupId : BuiltInOperand<26, 0, 0, [], []>;1457defm LocalInvocationId : BuiltInOperand<27, 0, 0, [], []>;1458defm GlobalInvocationId : BuiltInOperand<28, 0, 0, [], []>;1459defm LocalInvocationIndex : BuiltInOperand<29, 0, 0, [], []>;1460defm WorkDim : BuiltInOperand<30, 0, 0, [], [Kernel]>;1461defm GlobalSize : BuiltInOperand<31, 0, 0, [], [Kernel]>;1462defm EnqueuedWorkgroupSize : BuiltInOperand<32, 0, 0, [], [Kernel]>;1463defm GlobalOffset : BuiltInOperand<33, 0, 0, [], [Kernel]>;1464defm GlobalLinearId : BuiltInOperand<34, 0, 0, [], [Kernel]>;1465defm SubgroupSize : BuiltInOperand<36, 0, 0, [], [Kernel, GroupNonUniform, SubgroupBallotKHR]>;1466defm SubgroupMaxSize : BuiltInOperand<37, 0, 0, [], [Kernel]>;1467defm NumSubgroups : BuiltInOperand<38, 0, 0, [], [Kernel, GroupNonUniform]>;1468defm NumEnqueuedSubgroups : BuiltInOperand<39, 0, 0, [], [Kernel]>;1469defm SubgroupId : BuiltInOperand<40, 0, 0, [], [Kernel, GroupNonUniform]>;1470defm SubgroupLocalInvocationId : BuiltInOperand<41, 0, 0, [], [Kernel, GroupNonUniform, SubgroupBallotKHR]>;1471defm VertexIndex : BuiltInOperand<42, 0, 0, [], [Shader]>;1472defm InstanceIndex : BuiltInOperand<43, 0, 0, [], [Shader]>;1473defm SubgroupEqMask : BuiltInOperand<4416, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;1474defm SubgroupGeMask : BuiltInOperand<4417, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;1475defm SubgroupGtMask : BuiltInOperand<4418, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;1476defm SubgroupLeMask : BuiltInOperand<4419, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;1477defm SubgroupLtMask : BuiltInOperand<4420, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>;1478defm BaseVertex : BuiltInOperand<4424, 0, 0, [], [DrawParameters]>;1479defm BaseInstance : BuiltInOperand<4425, 0, 0, [], [DrawParameters]>;1480defm DrawIndex : BuiltInOperand<4426, 0, 0, [], [DrawParameters, MeshShadingNV]>;1481defm DeviceIndex : BuiltInOperand<4438, 0, 0, [], [DeviceGroup]>;1482defm ViewIndex : BuiltInOperand<4440, 0, 0, [], [MultiView]>;1483defm BaryCoordNoPerspAMD : BuiltInOperand<4492, 0, 0, [], []>;1484defm BaryCoordNoPerspCentroidAMD : BuiltInOperand<4493, 0, 0, [], []>;1485defm BaryCoordNoPerspSampleAMD : BuiltInOperand<4494, 0, 0, [], []>;1486defm BaryCoordSmoothAMD : BuiltInOperand<4495, 0, 0, [], []>;1487defm BaryCoordSmoothCentroid : BuiltInOperand<4496, 0, 0, [], []>;1488defm BaryCoordSmoothSample : BuiltInOperand<4497, 0, 0, [], []>;1489defm BaryCoordPullModel : BuiltInOperand<4498, 0, 0, [], []>;1490defm FragStencilRefEXT : BuiltInOperand<5014, 0, 0, [], [StencilExportEXT]>;1491defm ViewportMaskNV : BuiltInOperand<5253, 0, 0, [], [ShaderViewportMaskNV, MeshShadingNV]>;1492defm SecondaryPositionNV : BuiltInOperand<5257, 0, 0, [], [ShaderStereoViewNV]>;1493defm SecondaryViewportMaskNV : BuiltInOperand<5258, 0, 0, [], [ShaderStereoViewNV]>;1494defm PositionPerViewNV : BuiltInOperand<5261, 0, 0, [], [PerViewAttributesNV, MeshShadingNV]>;1495defm ViewportMaskPerViewNV : BuiltInOperand<5262, 0, 0, [], [PerViewAttributesNV, MeshShadingNV]>;1496defm FullyCoveredEXT : BuiltInOperand<5264, 0, 0, [], [FragmentFullyCoveredEXT]>;1497defm TaskCountNV : BuiltInOperand<5274, 0, 0, [], [MeshShadingNV]>;1498defm PrimitiveCountNV : BuiltInOperand<5275, 0, 0, [], [MeshShadingNV]>;1499defm PrimitiveIndicesNV : BuiltInOperand<5276, 0, 0, [], [MeshShadingNV]>;1500defm ClipDistancePerViewNV : BuiltInOperand<5277, 0, 0, [], [MeshShadingNV]>;1501defm CullDistancePerViewNV : BuiltInOperand<5278, 0, 0, [], [MeshShadingNV]>;1502defm LayerPerViewNV : BuiltInOperand<5279, 0, 0, [], [MeshShadingNV]>;1503defm MeshViewCountNV : BuiltInOperand<5280, 0, 0, [], [MeshShadingNV]>;1504defm MeshViewIndices : BuiltInOperand<5281, 0, 0, [], [MeshShadingNV]>;1505defm BaryCoordNV : BuiltInOperand<5286, 0, 0, [], [FragmentBarycentricNV]>;1506defm BaryCoordNoPerspNV : BuiltInOperand<5287, 0, 0, [], [FragmentBarycentricNV]>;1507defm FragSizeEXT : BuiltInOperand<5292, 0, 0, [], [FragmentDensityEXT]>;1508defm FragInvocationCountEXT : BuiltInOperand<5293, 0, 0, [], [FragmentDensityEXT]>;1509defm LaunchIdNV : BuiltInOperand<5319, 0, 0, [], [RayTracingNV]>;1510defm LaunchSizeNV : BuiltInOperand<5320, 0, 0, [], [RayTracingNV]>;1511defm WorldRayOriginNV : BuiltInOperand<5321, 0, 0, [], [RayTracingNV]>;1512defm WorldRayDirectionNV : BuiltInOperand<5322, 0, 0, [], [RayTracingNV]>;1513defm ObjectRayOriginNV : BuiltInOperand<5323, 0, 0, [], [RayTracingNV]>;1514defm ObjectRayDirectionNV : BuiltInOperand<5324, 0, 0, [], [RayTracingNV]>;1515defm RayTminNV : BuiltInOperand<5325, 0, 0, [], [RayTracingNV]>;1516defm RayTmaxNV : BuiltInOperand<5326, 0, 0, [], [RayTracingNV]>;1517defm InstanceCustomIndexNV : BuiltInOperand<5327, 0, 0, [], [RayTracingNV]>;1518defm ObjectToWorldNV : BuiltInOperand<5330, 0, 0, [], [RayTracingNV]>;1519defm WorldToObjectNV : BuiltInOperand<5331, 0, 0, [], [RayTracingNV]>;1520defm HitTNV : BuiltInOperand<5332, 0, 0, [], [RayTracingNV]>;1521defm HitKindNV : BuiltInOperand<5333, 0, 0, [], [RayTracingNV]>;1522defm IncomingRayFlagsNV : BuiltInOperand<5351, 0, 0, [], [RayTracingNV]>;1523 1524//===----------------------------------------------------------------------===//1525// Multiclass used to define SelectionControl enum values and at the same time1526// SymbolicOperand entries with string mnemonics.1527//===----------------------------------------------------------------------===//1528 1529def SelectionControl : GenericEnum, Operand<i32> {1530 let FilterClass = "SelectionControl";1531 let NameField = "Name";1532 let ValueField = "Value";1533 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1534}1535 1536class SelectionControl<string name, bits<32> value> {1537 string Name = name;1538 bits<32> Value = value;1539}1540 1541multiclass SelectionControlOperand<bits<32> value> {1542 def : SelectionControl<NAME, value>;1543 defm : SymbolicOperandWithRequirements<SelectionControlOperand, value, NAME,1544 0, 0, [], [], []>;1545}1546 1547defm None : SelectionControlOperand<0x0>;1548defm Flatten : SelectionControlOperand<0x1>;1549defm DontFlatten : SelectionControlOperand<0x2>;1550 1551//===----------------------------------------------------------------------===//1552// Multiclass used to define LoopControl enum values and at the same time1553// SymbolicOperand entries with string mnemonics.1554//===----------------------------------------------------------------------===//1555 1556def LoopControl : GenericEnum, Operand<i32> {1557 let FilterClass = "LoopControl";1558 let NameField = "Name";1559 let ValueField = "Value";1560 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1561}1562 1563class LoopControl<string name, bits<32> value> {1564 string Name = name;1565 bits<32> Value = value;1566}1567 1568multiclass LoopControlOperand<bits<32> value> {1569 def : LoopControl<NAME, value>;1570 defm : SymbolicOperandWithRequirements<LoopControlOperand, value, NAME, 0,1571 0, [], [], []>;1572}1573 1574defm None : LoopControlOperand<0x0>;1575defm Unroll : LoopControlOperand<0x1>;1576defm DontUnroll : LoopControlOperand<0x2>;1577defm DependencyInfinite : LoopControlOperand<0x4>;1578defm DependencyLength : LoopControlOperand<0x8>;1579defm MinIterations : LoopControlOperand<0x10>;1580defm MaxIterations : LoopControlOperand<0x20>;1581defm IterationMultiple : LoopControlOperand<0x40>;1582defm PeelCount : LoopControlOperand<0x80>;1583defm PartialCount : LoopControlOperand<0x100>;1584 1585//===----------------------------------------------------------------------===//1586// Multiclass used to define FunctionControl enum values and at the same time1587// SymbolicOperand entries with string mnemonics.1588//===----------------------------------------------------------------------===//1589 1590def FunctionControl : GenericEnum, Operand<i32> {1591 let FilterClass = "FunctionControl";1592 let NameField = "Name";1593 let ValueField = "Value";1594 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1595}1596 1597class FunctionControl<string name, bits<32> value> {1598 string Name = name;1599 bits<32> Value = value;1600}1601 1602multiclass FunctionControlOperand<bits<32> value> {1603 def : FunctionControl<NAME, value>;1604 defm : SymbolicOperandWithRequirements<FunctionControlOperand, value, NAME, 0,1605 0, [], [], []>;1606}1607 1608defm None : FunctionControlOperand<0x0>;1609defm Inline : FunctionControlOperand<0x1>;1610defm DontInline : FunctionControlOperand<0x2>;1611defm Pure : FunctionControlOperand<0x4>;1612defm Const : FunctionControlOperand<0x8>;1613defm OptNoneEXT : FunctionControlOperand<0x10000>;1614 1615//===----------------------------------------------------------------------===//1616// Multiclass used to define MemorySemantics enum values and at the same time1617// SymbolicOperand entries with string mnemonics, versioning, extensions and1618// capabilities.1619//===----------------------------------------------------------------------===//1620 1621def MemorySemantics : GenericEnum, Operand<i32> {1622 let FilterClass = "MemorySemantics";1623 let NameField = "Name";1624 let ValueField = "Value";1625 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1626}1627 1628class MemorySemantics<string name, bits<32> value> {1629 string Name = name;1630 bits<32> Value = value;1631}1632 1633multiclass MemorySemanticsOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1634 def : MemorySemantics<NAME, value>;1635 defm : SymbolicOperandWithRequirements<MemorySemanticsOperand, value, NAME,1636 minVersion, maxVersion, reqExtensions,1637 reqCapabilities, []>;1638}1639 1640defm None : MemorySemanticsOperand<0x0, 0, 0, [], []>;1641defm Acquire : MemorySemanticsOperand<0x2, 0, 0, [], []>;1642defm Release : MemorySemanticsOperand<0x4, 0, 0, [], []>;1643defm AcquireRelease : MemorySemanticsOperand<0x8, 0, 0, [], []>;1644defm SequentiallyConsistent : MemorySemanticsOperand<0x10, 0, 0, [], []>;1645defm UniformMemory : MemorySemanticsOperand<0x40, 0, 0, [], [Shader]>;1646defm SubgroupMemory : MemorySemanticsOperand<0x80, 0, 0, [], []>;1647defm WorkgroupMemory : MemorySemanticsOperand<0x100, 0, 0, [], []>;1648defm CrossWorkgroupMemory : MemorySemanticsOperand<0x200, 0, 0, [], []>;1649defm AtomicCounterMemory : MemorySemanticsOperand<0x400, 0, 0, [], [AtomicStorage]>;1650defm ImageMemory : MemorySemanticsOperand<0x800, 0, 0, [], []>;1651defm OutputMemoryKHR : MemorySemanticsOperand<0x1000, 0, 0, [], [VulkanMemoryModelKHR]>;1652defm MakeAvailableKHR : MemorySemanticsOperand<0x2000, 0, 0, [], [VulkanMemoryModelKHR]>;1653defm MakeVisibleKHR : MemorySemanticsOperand<0x4000, 0, 0, [], [VulkanMemoryModelKHR]>;1654 1655//===----------------------------------------------------------------------===//1656// Multiclass used to define MemoryOperand enum values and at the same time1657// SymbolicOperand entries with string mnemonics, versioning, extensions and1658// capabilities.1659//===----------------------------------------------------------------------===//1660 1661def MemoryOperand : GenericEnum, Operand<i32> {1662 let FilterClass = "MemoryOperand";1663 let NameField = "Name";1664 let ValueField = "Value";1665 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1666}1667 1668class MemoryOperand<string name, bits<32> value> {1669 string Name = name;1670 bits<32> Value = value;1671}1672 1673multiclass MemoryOperandOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1674 def : MemoryOperand<NAME, value>;1675 defm : SymbolicOperandWithRequirements<MemoryOperandOperand, value, NAME,1676 minVersion, maxVersion, reqExtensions,1677 reqCapabilities, []>;1678}1679 1680defm None : MemoryOperandOperand<0x0, 0, 0, [], []>;1681defm Volatile : MemoryOperandOperand<0x1, 0, 0, [], []>;1682defm Aligned : MemoryOperandOperand<0x2, 0, 0, [], []>;1683defm Nontemporal : MemoryOperandOperand<0x4, 0, 0, [], []>;1684defm MakePointerAvailableKHR : MemoryOperandOperand<0x8, 0, 0, [], [VulkanMemoryModelKHR]>;1685defm MakePointerVisibleKHR : MemoryOperandOperand<0x10, 0, 0, [], [VulkanMemoryModelKHR]>;1686defm NonPrivatePointerKHR : MemoryOperandOperand<0x20, 0, 0, [], [VulkanMemoryModelKHR]>;1687defm AliasScopeINTELMask : MemoryOperandOperand<0x10000, 0, 0, [], [MemoryAccessAliasingINTEL]>;1688defm NoAliasINTELMask : MemoryOperandOperand<0x20000, 0, 0, [], [MemoryAccessAliasingINTEL]>;1689 1690//===----------------------------------------------------------------------===//1691// Multiclass used to define Scope enum values and at the same time1692// SymbolicOperand entries with string mnemonics, versioning, extensions and1693// capabilities.1694//===----------------------------------------------------------------------===//1695 1696def Scope : GenericEnum, Operand<i32> {1697 let FilterClass = "Scope";1698 let NameField = "Name";1699 let ValueField = "Value";1700 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1701}1702 1703class Scope<string name, bits<32> value> {1704 string Name = name;1705 bits<32> Value = value;1706}1707 1708multiclass ScopeOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1709 def : Scope<NAME, value>;1710 defm : SymbolicOperandWithRequirements<ScopeOperand, value, NAME, minVersion,1711 maxVersion, reqExtensions,1712 reqCapabilities, []>;1713}1714 1715defm CrossDevice : ScopeOperand<0, 0, 0, [], []>;1716defm Device : ScopeOperand<1, 0, 0, [], []>;1717defm Workgroup : ScopeOperand<2, 0, 0, [], []>;1718defm Subgroup : ScopeOperand<3, 0, 0, [], []>;1719defm Invocation : ScopeOperand<4, 0, 0, [], []>;1720defm QueueFamilyKHR : ScopeOperand<5, 0, 0, [], [VulkanMemoryModelKHR]>;1721 1722//===----------------------------------------------------------------------===//1723// Multiclass used to define GroupOperation enum values and at the same time1724// SymbolicOperand entries with string mnemonics, versioning, extensions and1725// capabilities.1726//===----------------------------------------------------------------------===//1727 1728def GroupOperation : GenericEnum, Operand<i32> {1729 let FilterClass = "GroupOperation";1730 let NameField = "Name";1731 let ValueField = "Value";1732 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1733}1734 1735class GroupOperation<string name, bits<32> value> {1736 string Name = name;1737 bits<32> Value = value;1738}1739 1740multiclass GroupOperationOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1741 def NAME : GroupOperation<NAME, value>;1742 defm : SymbolicOperandWithRequirements<GroupOperationOperand, value, NAME,1743 minVersion, maxVersion, reqExtensions,1744 reqCapabilities, []>;1745}1746 1747defm Reduce : GroupOperationOperand<0, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>;1748defm InclusiveScan : GroupOperationOperand<1, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>;1749defm ExclusiveScan : GroupOperationOperand<2, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>;1750defm ClusteredReduce : GroupOperationOperand<3, 0, 0, [], [GroupNonUniformClustered]>;1751defm PartitionedReduceNV : GroupOperationOperand<6, 0, 0, [], [GroupNonUniformPartitionedNV]>;1752defm PartitionedInclusiveScanNV : GroupOperationOperand<7, 0, 0, [], [GroupNonUniformPartitionedNV]>;1753defm PartitionedExclusiveScanNV : GroupOperationOperand<8, 0, 0, [], [GroupNonUniformPartitionedNV]>;1754 1755//===----------------------------------------------------------------------===//1756// Multiclass used to define KernelEnqueueFlags enum values and at the same time1757// SymbolicOperand entries with string mnemonics, versioning, extensions and1758// capabilities.1759//===----------------------------------------------------------------------===//1760 1761def KernelEnqueueFlags : GenericEnum, Operand<i32> {1762 let FilterClass = "KernelEnqueueFlags";1763 let NameField = "Name";1764 let ValueField = "Value";1765 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1766}1767 1768class KernelEnqueueFlags<string name, bits<32> value> {1769 string Name = name;1770 bits<32> Value = value;1771}1772 1773multiclass KernelEnqueueFlagsOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1774 def : KernelEnqueueFlags<NAME, value>;1775 defm : SymbolicOperandWithRequirements<KernelEnqueueFlagsOperand, value, NAME,1776 minVersion, maxVersion, reqExtensions,1777 reqCapabilities, []>;1778}1779 1780defm NoWait : KernelEnqueueFlagsOperand<0, 0, 0, [], [Kernel]>;1781defm WaitKernel : KernelEnqueueFlagsOperand<1, 0, 0, [], [Kernel]>;1782defm WaitWorkGroup : KernelEnqueueFlagsOperand<2, 0, 0, [], [Kernel]>;1783 1784//===----------------------------------------------------------------------===//1785// Multiclass used to define KernelProfilingInfo enum values and at the same time1786// SymbolicOperand entries with string mnemonics, versioning, extensions and1787// capabilities.1788//===----------------------------------------------------------------------===//1789 1790def KernelProfilingInfo : GenericEnum, Operand<i32> {1791 let FilterClass = "KernelProfilingInfo";1792 let NameField = "Name";1793 let ValueField = "Value";1794 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1795}1796 1797class KernelProfilingInfo<string name, bits<32> value> {1798 string Name = name;1799 bits<32> Value = value;1800}1801 1802multiclass KernelProfilingInfoOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1803 def : KernelProfilingInfo<NAME, value>;1804 defm : SymbolicOperandWithRequirements<KernelProfilingInfoOperand, value,1805 NAME, minVersion, maxVersion,1806 reqExtensions, reqCapabilities, []>;1807}1808 1809defm None : KernelProfilingInfoOperand<0x0, 0, 0, [], []>;1810defm CmdExecTime : KernelProfilingInfoOperand<0x1, 0, 0, [], [Kernel]>;1811 1812//===----------------------------------------------------------------------===//1813// Multiclass used to define Opcode enum values and at the same time1814// SymbolicOperand entries with string mnemonics and capabilities.1815//===----------------------------------------------------------------------===//1816 1817def Opcode : GenericEnum, Operand<i32> {1818 let FilterClass = "Opcode";1819 let NameField = "Name";1820 let ValueField = "Value";1821 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1822}1823 1824class Opcode<string name, bits<32> value> {1825 string Name = name;1826 bits<32> Value = value;1827}1828 1829multiclass OpcodeOperand<bits<32> value> {1830 def : Opcode<NAME, value>;1831 defm : SymbolicOperandWithRequirements<OpcodeOperand, value, NAME, 0,1832 0, [], [], []>;1833}1834// TODO: implement other mnemonics.1835defm InBoundsAccessChain : OpcodeOperand<66>;1836defm InBoundsPtrAccessChain : OpcodeOperand<70>;1837defm PtrCastToGeneric : OpcodeOperand<121>;1838defm GenericCastToPtr : OpcodeOperand<122>;1839defm GenericCastToPtrExplicit : OpcodeOperand<123>;1840defm Bitcast : OpcodeOperand<124>;1841defm ConvertPtrToU : OpcodeOperand<117>;1842defm ConvertUToPtr : OpcodeOperand<120>;1843 1844//===----------------------------------------------------------------------===//1845// Multiclass used to define Cooperative Matrix Layout enum values and at the1846// same time SymbolicOperand entries extensions and capabilities.1847//===----------------------------------------------------------------------===//1848 1849def CooperativeMatrixLayout : GenericEnum, Operand<i32> {1850 let FilterClass = "CooperativeMatrixLayout";1851 let NameField = "Name";1852 let ValueField = "Value";1853}1854 1855class CooperativeMatrixLayout<string name, bits<32> value> {1856 string Name = name;1857 bits<32> Value = value;1858}1859 1860multiclass CooperativeMatrixLayoutOperand<bits<32> value, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1861 def : CooperativeMatrixLayout<NAME, value>;1862 defm : SymbolicOperandWithRequirements<CooperativeMatrixLayoutOperand, value,1863 NAME, 0, 0, reqExtensions,1864 reqCapabilities, []>;1865}1866 1867defm RowMajorKHR : CooperativeMatrixLayoutOperand<0x0, [SPV_KHR_cooperative_matrix], [CooperativeMatrixKHR]>;1868defm ColumnMajorKHR : CooperativeMatrixLayoutOperand<0x1, [SPV_KHR_cooperative_matrix], [CooperativeMatrixKHR]>;1869defm PackedINTEL : CooperativeMatrixLayoutOperand<0x2, [SPV_INTEL_joint_matrix], [PackedCooperativeMatrixINTEL]>;1870 1871//===----------------------------------------------------------------------===//1872// Multiclass used to define Cooperative Matrix Operands enum values and at the1873// same time SymbolicOperand entries with string mnemonics, extensions and1874// capabilities.1875//===----------------------------------------------------------------------===//1876 1877def CooperativeMatrixOperands : GenericEnum, Operand<i32> {1878 let FilterClass = "CooperativeMatrixOperands";1879 let NameField = "Name";1880 let ValueField = "Value";1881 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1882}1883 1884class CooperativeMatrixOperands<string name, bits<32> value> {1885 string Name = name;1886 bits<32> Value = value;1887}1888 1889multiclass CooperativeMatrixOperandsOperand<bits<32> value, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1890 def : CooperativeMatrixOperands<NAME, value>;1891 defm : SymbolicOperandWithRequirements<CooperativeMatrixOperandsOperand,1892 value, NAME, 0, 0, reqExtensions,1893 reqCapabilities, []>;1894}1895 1896defm NoneKHR : CooperativeMatrixOperandsOperand<0x0, [SPV_KHR_cooperative_matrix], [CooperativeMatrixKHR]>;1897defm MatrixASignedComponentsKHR : CooperativeMatrixOperandsOperand<0x1, [SPV_KHR_cooperative_matrix], [CooperativeMatrixKHR]>;1898defm MatrixBSignedComponentsKHR : CooperativeMatrixOperandsOperand<0x2, [SPV_KHR_cooperative_matrix], [CooperativeMatrixKHR]>;1899defm MatrixCSignedComponentsKHR : CooperativeMatrixOperandsOperand<0x4, [SPV_KHR_cooperative_matrix], [CooperativeMatrixKHR]>;1900defm MatrixResultSignedComponentsKHR : CooperativeMatrixOperandsOperand<0x8, [SPV_KHR_cooperative_matrix], [CooperativeMatrixKHR]>;1901defm SaturatingAccumulationKHR : CooperativeMatrixOperandsOperand<0x10, [SPV_KHR_cooperative_matrix], [CooperativeMatrixKHR]>;1902defm MatrixAAndBTF32ComponentsINTEL : CooperativeMatrixOperandsOperand<0x20, [SPV_INTEL_joint_matrix], [CooperativeMatrixTF32ComponentTypeINTEL]>;1903defm MatrixAAndBBFloat16ComponentsINTEL : CooperativeMatrixOperandsOperand<0x40, [SPV_INTEL_joint_matrix], [CooperativeMatrixBFloat16ComponentTypeINTEL]>;1904defm MatrixCBFloat16ComponentsINTEL : CooperativeMatrixOperandsOperand<0x80, [SPV_INTEL_joint_matrix], [CooperativeMatrixBFloat16ComponentTypeINTEL]>;1905defm MatrixResultBFloat16ComponentsINTEL : CooperativeMatrixOperandsOperand<0x100, [SPV_INTEL_joint_matrix], [CooperativeMatrixBFloat16ComponentTypeINTEL]>;1906 1907//===----------------------------------------------------------------------===//1908// Multiclass used to define SpecConstant Operands enum values and at the1909// same time SymbolicOperand.1910//===----------------------------------------------------------------------===//1911 1912def SpecConstantOpOperands : GenericEnum, Operand<i32> {1913 let FilterClass = "SpecConstantOpOperands";1914 let NameField = "Name";1915 let ValueField = "Value";1916 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");1917}1918 1919class SpecConstantOpOperands<string name, bits<32> value> {1920 string Name = name;1921 bits<32> Value = value;1922}1923 1924multiclass SpecConstantOpOperandsOperand<bits<32> value, list<Extension> reqExtensions, list<Capability> reqCapabilities> {1925 def : SpecConstantOpOperands<NAME, value>;1926 defm : SymbolicOperandWithRequirements<SpecConstantOpOperandsOperand, value,1927 NAME, 0, 0, reqExtensions,1928 reqCapabilities, []>;1929}1930 1931// Conversion1932defm SConvert : SpecConstantOpOperandsOperand<114, [], []>;1933defm FConvert : SpecConstantOpOperandsOperand<115, [], []>;1934defm ConvertFToS : SpecConstantOpOperandsOperand<110, [], [Kernel]>;1935defm ConvertSToF : SpecConstantOpOperandsOperand<111, [], [Kernel]>;1936defm ConvertFToU : SpecConstantOpOperandsOperand<109, [], [Kernel]>;1937defm ConvertUToF : SpecConstantOpOperandsOperand<112, [], [Kernel]>;1938defm UConvert : SpecConstantOpOperandsOperand<113, [], [Kernel]>;1939defm ConvertPtrToU : SpecConstantOpOperandsOperand<117, [], [Kernel]>;1940defm ConvertUToPtr : SpecConstantOpOperandsOperand<120, [], [Kernel]>;1941defm GenericCastToPtr : SpecConstantOpOperandsOperand<122, [], [Kernel]>;1942defm PtrCastToGeneric : SpecConstantOpOperandsOperand<121, [], [Kernel]>;1943defm Bitcast : SpecConstantOpOperandsOperand<124, [], []>;1944defm QuantizeToF16 : SpecConstantOpOperandsOperand<116, [], [Shader]>;1945// Arithmetic1946defm SNegate : SpecConstantOpOperandsOperand<126, [], []>;1947defm Not : SpecConstantOpOperandsOperand<200, [], []>;1948defm IAdd : SpecConstantOpOperandsOperand<128, [], []>;1949defm ISub : SpecConstantOpOperandsOperand<130, [], []>;1950defm IMul : SpecConstantOpOperandsOperand<132, [], []>;1951defm UDiv : SpecConstantOpOperandsOperand<134, [], []>;1952defm SDiv : SpecConstantOpOperandsOperand<135, [], []>;1953defm UMod : SpecConstantOpOperandsOperand<137, [], []>;1954defm SRem : SpecConstantOpOperandsOperand<138, [], []>;1955defm SMod : SpecConstantOpOperandsOperand<139, [], []>;1956defm ShiftRightLogical : SpecConstantOpOperandsOperand<194, [], []>;1957defm ShiftRightArithmetic : SpecConstantOpOperandsOperand<195, [], []>;1958defm ShiftLeftLogical : SpecConstantOpOperandsOperand<196, [], []>;1959defm BitwiseOr : SpecConstantOpOperandsOperand<197, [], []>;1960defm BitwiseAnd : SpecConstantOpOperandsOperand<199, [], []>;1961defm BitwiseXor : SpecConstantOpOperandsOperand<198, [], []>;1962defm FNegate : SpecConstantOpOperandsOperand<127, [], [Kernel]>;1963defm FAdd : SpecConstantOpOperandsOperand<129, [], [Kernel]>;1964defm FSub : SpecConstantOpOperandsOperand<131, [], [Kernel]>;1965defm FMul : SpecConstantOpOperandsOperand<133, [], [Kernel]>;1966defm FDiv : SpecConstantOpOperandsOperand<136, [], [Kernel]>;1967defm FRem : SpecConstantOpOperandsOperand<140, [], [Kernel]>;1968defm FMod : SpecConstantOpOperandsOperand<141, [], [Kernel]>;1969// Composite;1970defm VectorShuffle : SpecConstantOpOperandsOperand<79, [], []>;1971defm CompositeExtract : SpecConstantOpOperandsOperand<81, [], []>;1972defm CompositeInsert : SpecConstantOpOperandsOperand<82, [], []>;1973// Logical;1974defm LogicalOr : SpecConstantOpOperandsOperand<166, [], []>;1975defm LogicalAnd : SpecConstantOpOperandsOperand<167, [], []>;1976defm LogicalNot : SpecConstantOpOperandsOperand<168, [], []>;1977defm LogicalEqual : SpecConstantOpOperandsOperand<164, [], []>;1978defm LogicalNotEqual : SpecConstantOpOperandsOperand<165, [], []>;1979defm Select : SpecConstantOpOperandsOperand<169, [], []>;1980// Comparison;1981defm IEqual : SpecConstantOpOperandsOperand<170, [], []>;1982defm INotEqual : SpecConstantOpOperandsOperand<171, [], []>;1983defm ULessThan : SpecConstantOpOperandsOperand<176, [], []>;1984defm SLessThan : SpecConstantOpOperandsOperand<177, [], []>;1985defm UGreaterThan : SpecConstantOpOperandsOperand<172, [], []>;1986defm SGreaterThan : SpecConstantOpOperandsOperand<173, [], []>;1987defm ULessThanEqual : SpecConstantOpOperandsOperand<178, [], []>;1988defm SLessThanEqual : SpecConstantOpOperandsOperand<179, [], []>;1989defm UGreaterThanEqual : SpecConstantOpOperandsOperand<174, [], []>;1990defm SGreaterThanEqual : SpecConstantOpOperandsOperand<175, [], []>;1991// Memory1992defm AccessChain : SpecConstantOpOperandsOperand<65, [], [Kernel]>;1993defm InBoundsAccessChain : SpecConstantOpOperandsOperand<66, [], [Kernel]>;1994defm PtrAccessChain : SpecConstantOpOperandsOperand<67, [], [Kernel]>;1995defm InBoundsPtrAccessChain : SpecConstantOpOperandsOperand<70, [], [Kernel]>;1996defm CooperativeMatrixLengthKHR : SpecConstantOpOperandsOperand<4460, [], []>;1997 1998//===----------------------------------------------------------------------===//1999// Multiclass used to define Matrix Multiply Accumulate Operands enum values and at the same time2000// SymbolicOperand entries with string mnemonics and capabilities.2001//===----------------------------------------------------------------------===//2002def MatrixMultiplyAccumulateOperands : GenericEnum, Operand<i32> {2003 let FilterClass = "MatrixMultiplyAccumulateOperands";2004 let NameField = "Name";2005 let ValueField = "Value";2006 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");2007}2008 2009class MatrixMultiplyAccumulateOperands<string name, bits<32> value> {2010 string Name = name;2011 bits<32> Value = value;2012}2013 2014multiclass MatrixMultiplyAccumulateOperandsOperand<bits<32> value, list<Extension> reqExtensions> {2015 def : MatrixMultiplyAccumulateOperands<NAME, value>;2016 defm : SymbolicOperandWithRequirements<2017 MatrixMultiplyAccumulateOperandsOperand, value, NAME, 0, 0,2018 reqExtensions, [], []>;2019}2020 2021defm None : MatrixMultiplyAccumulateOperandsOperand<0x0, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2022defm MatrixASignedComponentsINTEL : MatrixMultiplyAccumulateOperandsOperand<0x1, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2023defm MatrixBSignedComponentsINTEL : MatrixMultiplyAccumulateOperandsOperand<0x2, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2024defm MatrixCBFloat16INTEL : MatrixMultiplyAccumulateOperandsOperand<0x4, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2025defm MatrixResultBFloat16INTEL : MatrixMultiplyAccumulateOperandsOperand<0x8, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2026defm MatrixAPackedInt8INTEL : MatrixMultiplyAccumulateOperandsOperand<0x10, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2027defm MatrixBPackedInt8INTEL : MatrixMultiplyAccumulateOperandsOperand<0x20, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2028defm MatrixAPackedInt4INTEL : MatrixMultiplyAccumulateOperandsOperand<0x40, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2029defm MatrixBPackedInt4INTEL : MatrixMultiplyAccumulateOperandsOperand<0x80, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2030defm MatrixATF32INTEL : MatrixMultiplyAccumulateOperandsOperand<0x100, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2031defm MatrixBTF32INTEL : MatrixMultiplyAccumulateOperandsOperand<0x200, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2032defm MatrixAPackedFloat16INTEL : MatrixMultiplyAccumulateOperandsOperand<0x400, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2033defm MatrixBPackedFloat16INTEL : MatrixMultiplyAccumulateOperandsOperand<0x800, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2034defm MatrixAPackedBFloat16INTEL : MatrixMultiplyAccumulateOperandsOperand<0x1000, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2035defm MatrixBPackedBFloat16INTEL : MatrixMultiplyAccumulateOperandsOperand<0x2000, [SPV_INTEL_subgroup_matrix_multiply_accumulate]>;2036 2037//===----------------------------------------------------------------------===//2038// Multiclass used to define FPEncoding enum values and at the2039// same time SymbolicOperand entries with extensions.2040//===----------------------------------------------------------------------===//2041def FPEncoding : GenericEnum, Operand<i32> {2042 let FilterClass = "FPEncoding";2043 let NameField = "Name";2044 let ValueField = "Value";2045 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");2046}2047 2048class FPEncoding<string name, bits<32> value> {2049 string Name = name;2050 bits<32> Value = value;2051}2052 2053multiclass FPEncodingOperand<bits<32> value, list<Extension> reqExtensions>{2054 def NAME : FPEncoding<NAME, value>;2055 defm : SymbolicOperandWithRequirements<2056 FPEncodingOperand, value, NAME, 0, 0,2057 reqExtensions, [], []>;2058}2059 2060defm BFloat16KHR : FPEncodingOperand<0, [SPV_KHR_bfloat16]>;2061 2062def PackedVectorFormats : GenericEnum, Operand<i32> {2063 let FilterClass = "PackedVectorFormats";2064 let NameField = "Name";2065 let ValueField = "Value";2066 let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");2067}2068 2069class PackedVectorFormats<string name, bits<32> value> {2070 string Name = name;2071 bits<32> Value = value;2072}2073 2074multiclass PackedVectorFormatsOperand<bits<32> value, list<Extension> reqExtensions> {2075 def NAME : BuiltIn<NAME, value>;2076 defm : SymbolicOperandWithRequirements<PackedVectorFormatsOperand, value, NAME, 0, 0, reqExtensions, [], []>;2077}2078 2079defm PackedVectorFormat4x8Bit : PackedVectorFormatsOperand<0, [SPV_KHR_integer_dot_product]>;2080