1bdd1243dSDimitry Andric//===- SPIRVSymbolicOperands.td ----------------------------*- tablegen -*-===// 2bdd1243dSDimitry Andric// 3bdd1243dSDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4bdd1243dSDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 5bdd1243dSDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6bdd1243dSDimitry Andric// 7bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 8bdd1243dSDimitry Andric// 9bdd1243dSDimitry Andric// This file defines symbolic/named operands for various SPIR-V instructions. 10bdd1243dSDimitry Andric// 11bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 12bdd1243dSDimitry Andric 13bdd1243dSDimitry Andricinclude "llvm/TableGen/SearchableTable.td" 14bdd1243dSDimitry Andric 15bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 16bdd1243dSDimitry Andric// Lookup table containing symbolic operands with the following columns: 17bdd1243dSDimitry Andric// - Category (Extension/Capability/BuiltIn/etc.) 18bdd1243dSDimitry Andric// - Value (32-bit representation for binary emission) 19bdd1243dSDimitry Andric// - Mnemonic (String representation for textual emission) 20bdd1243dSDimitry Andric// - MinVersion 21bdd1243dSDimitry Andric// - MaxVersion 22bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 23bdd1243dSDimitry Andric 24bdd1243dSDimitry Andric// Forward-declare classes used in SymbolicOperand 25bdd1243dSDimitry Andricclass OperandCategory; 26bdd1243dSDimitry Andric 27bdd1243dSDimitry Andricclass SymbolicOperand<OperandCategory category, bits<32> value, string mnemonic, bits<32> minVersion, bits<32> maxVersion> { 28bdd1243dSDimitry Andric OperandCategory Category = category; 29bdd1243dSDimitry Andric bits<32> Value = value; 30bdd1243dSDimitry Andric string Mnemonic = mnemonic; 31bdd1243dSDimitry Andric bits<32> MinVersion = minVersion; 32bdd1243dSDimitry Andric bits<32> MaxVersion = maxVersion; 33bdd1243dSDimitry Andric} 34bdd1243dSDimitry Andric 35bdd1243dSDimitry Andricdef SymbolicOperands : GenericTable { 36bdd1243dSDimitry Andric let FilterClass = "SymbolicOperand"; 37bdd1243dSDimitry Andric let Fields = ["Category", "Value", "Mnemonic", "MinVersion", "MaxVersion"]; 38bdd1243dSDimitry Andric string TypeOf_Category = "OperandCategory"; 39bdd1243dSDimitry Andric let PrimaryKey = ["Category", "Value"]; 40bdd1243dSDimitry Andric // Function for looking up symbolic operands based on category and value. 41bdd1243dSDimitry Andric let PrimaryKeyName = "lookupSymbolicOperandByCategoryAndValue"; 42bdd1243dSDimitry Andric} 43bdd1243dSDimitry Andric 44bdd1243dSDimitry Andric// Function for looking up symbolic operands based on just category. 45bdd1243dSDimitry Andricdef lookupSymbolicOperandByCategory : SearchIndex { 46bdd1243dSDimitry Andric let Table = SymbolicOperands; 47bdd1243dSDimitry Andric let Key = ["Category"]; 48bdd1243dSDimitry Andric} 49bdd1243dSDimitry Andric 50bdd1243dSDimitry Andric// Function for looking up symbolic operands based on category and mnemonic. 51bdd1243dSDimitry Andricdef lookupSymbolicOperandByCategoryAndMnemonic : SearchIndex { 52bdd1243dSDimitry Andric let Table = SymbolicOperands; 53bdd1243dSDimitry Andric let Key = ["Category", "Mnemonic"]; 54bdd1243dSDimitry Andric} 55bdd1243dSDimitry Andric 56bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 57bdd1243dSDimitry Andric// Lookup table for matching symbolic operands (category + 32-bit value) to 58bdd1243dSDimitry Andric// a SPIR-V extension. 59bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 60bdd1243dSDimitry Andric 61bdd1243dSDimitry Andric// Forward-declare classes used in ExtensionEntry 62bdd1243dSDimitry Andricclass Extension; 63bdd1243dSDimitry Andric 64bdd1243dSDimitry Andricclass ExtensionEntry<OperandCategory category, bits<32> value, Extension reqExtension> { 65bdd1243dSDimitry Andric OperandCategory Category = category; 66bdd1243dSDimitry Andric bits<32> Value = value; 67bdd1243dSDimitry Andric Extension ReqExtension = reqExtension; 68bdd1243dSDimitry Andric} 69bdd1243dSDimitry Andric 70bdd1243dSDimitry Andricdef ExtensionEntries : GenericTable { 71bdd1243dSDimitry Andric let FilterClass = "ExtensionEntry"; 72bdd1243dSDimitry Andric let Fields = ["Category", "Value", "ReqExtension"]; 73bdd1243dSDimitry Andric string TypeOf_Category = "OperandCategory"; 74bdd1243dSDimitry Andric string TypeOf_ReqExtension = "Extension"; 75bdd1243dSDimitry Andric let PrimaryKey = ["Category", "Value"]; 76bdd1243dSDimitry Andric // Function for looking up the extension by category + value. 77bdd1243dSDimitry Andric let PrimaryKeyName = "lookupExtensionByCategoryAndValue"; 78bdd1243dSDimitry Andric} 79bdd1243dSDimitry Andric 80*5f757f3fSDimitry Andric// Function to lookup symbolic operands enabled by a given extension. 81*5f757f3fSDimitry Andricdef lookupSymbolicOperandsEnabledByExtension : SearchIndex { 82*5f757f3fSDimitry Andric let Table = ExtensionEntries; 83*5f757f3fSDimitry Andric let Key = ["ReqExtension", "Category"]; 84*5f757f3fSDimitry Andric} 85*5f757f3fSDimitry Andric 86bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 87bdd1243dSDimitry Andric// Lookup table for matching symbolic operands (category + 32-bit value) to 88bdd1243dSDimitry Andric// SPIR-V capabilities. If an operand requires more than one capability, there 89bdd1243dSDimitry Andric// will be multiple consecutive entries present in the table. 90bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 91bdd1243dSDimitry Andric 92bdd1243dSDimitry Andric// Forward-declare classes used in ExtensionEntry 93bdd1243dSDimitry Andricclass Capability; 94bdd1243dSDimitry Andric 95bdd1243dSDimitry Andricclass CapabilityEntry<OperandCategory category, bits<32> value, Capability reqCabaility> { 96bdd1243dSDimitry Andric OperandCategory Category = category; 97bdd1243dSDimitry Andric bits<32> Value = value; 98bdd1243dSDimitry Andric Capability ReqCapability = reqCabaility; 99bdd1243dSDimitry Andric} 100bdd1243dSDimitry Andric 101bdd1243dSDimitry Andricdef CapabilityEntries : GenericTable { 102bdd1243dSDimitry Andric let FilterClass = "CapabilityEntry"; 103bdd1243dSDimitry Andric let Fields = ["Category", "Value", "ReqCapability"]; 104bdd1243dSDimitry Andric string TypeOf_Category = "OperandCategory"; 105bdd1243dSDimitry Andric string TypeOf_ReqCapability = "Capability"; 106bdd1243dSDimitry Andric let PrimaryKey = ["Category", "Value"]; 107bdd1243dSDimitry Andric // Function for looking up a (the first) capability by category + value. Next 108bdd1243dSDimitry Andric // capabilities should be consecutive. 109bdd1243dSDimitry Andric let PrimaryKeyName = "lookupCapabilityByCategoryAndValue"; 110bdd1243dSDimitry Andric} 111bdd1243dSDimitry Andric 112bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 113bdd1243dSDimitry Andric// Multiclass used to define a SymbolicOperand and at the same time declare 114bdd1243dSDimitry Andric// required extension and capabilities. 115bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 116bdd1243dSDimitry Andric 117bdd1243dSDimitry Andricmulticlass SymbolicOperandWithRequirements<OperandCategory category, bits<32> value, string mnemonic, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 118bdd1243dSDimitry Andric assert !ge(!size(mnemonic), 1), "No mnemonic/string representation provided for symbolic operand with value " # value; 119bdd1243dSDimitry Andric def : SymbolicOperand<category, value, mnemonic, minVersion, maxVersion>; 120bdd1243dSDimitry Andric 121bdd1243dSDimitry Andric assert !le(!size(reqExtensions), 1), "Too many required extensions for a symbolic/named operand: " # mnemonic; 122bdd1243dSDimitry Andric if !eq(!size(reqExtensions), 1) then { 123bdd1243dSDimitry Andric def : ExtensionEntry<category, value, reqExtensions[0]>; 124bdd1243dSDimitry Andric } 125bdd1243dSDimitry Andric 126bdd1243dSDimitry Andric foreach capability = reqCapabilities in { 127bdd1243dSDimitry Andric def : CapabilityEntry<category, value, capability>; 128bdd1243dSDimitry Andric } 129bdd1243dSDimitry Andric} 130bdd1243dSDimitry Andric 131bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 132bdd1243dSDimitry Andric// Enum defining different categories of symbolic/named operands. 133bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 134bdd1243dSDimitry Andric 135bdd1243dSDimitry Andricdef OperandCategory : GenericEnum { 136bdd1243dSDimitry Andric let FilterClass = "OperandCategory"; 137bdd1243dSDimitry Andric} 138bdd1243dSDimitry Andric 139bdd1243dSDimitry Andricclass OperandCategory; 140bdd1243dSDimitry Andric 141bdd1243dSDimitry Andricdef ExtensionOperand : OperandCategory; 142bdd1243dSDimitry Andricdef CapabilityOperand : OperandCategory; 143bdd1243dSDimitry Andricdef SourceLanguageOperand : OperandCategory; 144bdd1243dSDimitry Andricdef AddressingModelOperand : OperandCategory; 145bdd1243dSDimitry Andricdef ExecutionModelOperand : OperandCategory; 146bdd1243dSDimitry Andricdef MemoryModelOperand : OperandCategory; 147bdd1243dSDimitry Andricdef ExecutionModeOperand : OperandCategory; 148bdd1243dSDimitry Andricdef StorageClassOperand : OperandCategory; 149bdd1243dSDimitry Andricdef DimOperand : OperandCategory; 150bdd1243dSDimitry Andricdef SamplerAddressingModeOperand : OperandCategory; 151bdd1243dSDimitry Andricdef SamplerFilterModeOperand : OperandCategory; 152bdd1243dSDimitry Andricdef ImageFormatOperand : OperandCategory; 153bdd1243dSDimitry Andricdef ImageChannelOrderOperand : OperandCategory; 154bdd1243dSDimitry Andricdef ImageChannelDataTypeOperand : OperandCategory; 155bdd1243dSDimitry Andricdef ImageOperandOperand : OperandCategory; 156bdd1243dSDimitry Andricdef FPFastMathModeOperand : OperandCategory; 157bdd1243dSDimitry Andricdef FPRoundingModeOperand : OperandCategory; 158bdd1243dSDimitry Andricdef LinkageTypeOperand : OperandCategory; 159bdd1243dSDimitry Andricdef AccessQualifierOperand : OperandCategory; 160bdd1243dSDimitry Andricdef FunctionParameterAttributeOperand : OperandCategory; 161bdd1243dSDimitry Andricdef DecorationOperand : OperandCategory; 162bdd1243dSDimitry Andricdef BuiltInOperand : OperandCategory; 163bdd1243dSDimitry Andricdef SelectionControlOperand : OperandCategory; 164bdd1243dSDimitry Andricdef LoopControlOperand : OperandCategory; 165bdd1243dSDimitry Andricdef FunctionControlOperand : OperandCategory; 166bdd1243dSDimitry Andricdef MemorySemanticsOperand : OperandCategory; 167bdd1243dSDimitry Andricdef MemoryOperandOperand : OperandCategory; 168bdd1243dSDimitry Andricdef ScopeOperand : OperandCategory; 169bdd1243dSDimitry Andricdef GroupOperationOperand : OperandCategory; 170bdd1243dSDimitry Andricdef KernelEnqueueFlagsOperand : OperandCategory; 171bdd1243dSDimitry Andricdef KernelProfilingInfoOperand : OperandCategory; 172bdd1243dSDimitry Andricdef OpcodeOperand : OperandCategory; 173bdd1243dSDimitry Andric 174bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 175bdd1243dSDimitry Andric// Multiclass used to define Extesions enum values and at the same time 176bdd1243dSDimitry Andric// SymbolicOperand entries. 177bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 178bdd1243dSDimitry Andric 179bdd1243dSDimitry Andricdef Extension : GenericEnum, Operand<i32> { 180bdd1243dSDimitry Andric let FilterClass = "Extension"; 181bdd1243dSDimitry Andric let NameField = "Name"; 182bdd1243dSDimitry Andric let ValueField = "Value"; 183bdd1243dSDimitry Andric let PrintMethod = "printExtension"; 184bdd1243dSDimitry Andric} 185bdd1243dSDimitry Andric 186bdd1243dSDimitry Andricclass Extension<string name, bits<32> value> { 187bdd1243dSDimitry Andric string Name = name; 188bdd1243dSDimitry Andric bits<32> Value = value; 189bdd1243dSDimitry Andric} 190bdd1243dSDimitry Andric 191bdd1243dSDimitry Andricmulticlass ExtensionOperand<bits<32> value> { 192bdd1243dSDimitry Andric def NAME : Extension<NAME, value>; 193bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<ExtensionOperand, value, NAME, 0, 0, [], []>; 194bdd1243dSDimitry Andric} 195bdd1243dSDimitry Andric 196bdd1243dSDimitry Andricdefm SPV_AMD_shader_explicit_vertex_parameter : ExtensionOperand<1>; 197bdd1243dSDimitry Andricdefm SPV_AMD_shader_trinary_minmax_extension : ExtensionOperand<2>; 198bdd1243dSDimitry Andricdefm SPV_AMD_gcn_shader : ExtensionOperand<3>; 199bdd1243dSDimitry Andricdefm SPV_KHR_shader_ballot : ExtensionOperand<4>; 200bdd1243dSDimitry Andricdefm SPV_AMD_shader_ballot : ExtensionOperand<5>; 201bdd1243dSDimitry Andricdefm SPV_AMD_gpu_shader_half_float : ExtensionOperand<6>; 202bdd1243dSDimitry Andricdefm SPV_KHR_shader_draw_parameters : ExtensionOperand<7>; 203bdd1243dSDimitry Andricdefm SPV_KHR_subgroup_vote : ExtensionOperand<8>; 204*5f757f3fSDimitry Andricdefm SPV_KHR_16bit_storage : ExtensionOperand<9>; 205bdd1243dSDimitry Andricdefm SPV_KHR_device_group : ExtensionOperand<10>; 206bdd1243dSDimitry Andricdefm SPV_KHR_multiview : ExtensionOperand<11>; 207bdd1243dSDimitry Andricdefm SPV_NVX_multiview_per_view_attributes : ExtensionOperand<12>; 208bdd1243dSDimitry Andricdefm SPV_NV_viewport_array2 : ExtensionOperand<13>; 209bdd1243dSDimitry Andricdefm SPV_NV_stereo_view_rendering : ExtensionOperand<14>; 210bdd1243dSDimitry Andricdefm SPV_NV_sample_mask_override_coverage : ExtensionOperand<15>; 211bdd1243dSDimitry Andricdefm SPV_NV_geometry_shader_passthrough : ExtensionOperand<16>; 212bdd1243dSDimitry Andricdefm SPV_AMD_texture_gather_bias_lod : ExtensionOperand<17>; 213bdd1243dSDimitry Andricdefm SPV_KHR_storage_buffer_storage_class : ExtensionOperand<18>; 214bdd1243dSDimitry Andricdefm SPV_KHR_variable_pointers : ExtensionOperand<19>; 215bdd1243dSDimitry Andricdefm SPV_AMD_gpu_shader_int16 : ExtensionOperand<20>; 216bdd1243dSDimitry Andricdefm SPV_KHR_post_depth_coverage : ExtensionOperand<21>; 217bdd1243dSDimitry Andricdefm SPV_KHR_shader_atomic_counter_ops : ExtensionOperand<22>; 218bdd1243dSDimitry Andricdefm SPV_EXT_shader_stencil_export : ExtensionOperand<23>; 219bdd1243dSDimitry Andricdefm SPV_EXT_shader_viewport_index_layer : ExtensionOperand<24>; 220bdd1243dSDimitry Andricdefm SPV_AMD_shader_image_load_store_lod : ExtensionOperand<25>; 221bdd1243dSDimitry Andricdefm SPV_AMD_shader_fragment_mask : ExtensionOperand<26>; 222bdd1243dSDimitry Andricdefm SPV_EXT_fragment_fully_covered : ExtensionOperand<27>; 223bdd1243dSDimitry Andricdefm SPV_AMD_gpu_shader_half_float_fetch : ExtensionOperand<28>; 224bdd1243dSDimitry Andricdefm SPV_GOOGLE_decorate_string : ExtensionOperand<29>; 225bdd1243dSDimitry Andricdefm SPV_GOOGLE_hlsl_functionality1 : ExtensionOperand<30>; 226bdd1243dSDimitry Andricdefm SPV_NV_shader_subgroup_partitioned : ExtensionOperand<31>; 227bdd1243dSDimitry Andricdefm SPV_EXT_descriptor_indexing : ExtensionOperand<32>; 228bdd1243dSDimitry Andricdefm SPV_KHR_8bit_storage : ExtensionOperand<33>; 229bdd1243dSDimitry Andricdefm SPV_KHR_vulkan_memory_model : ExtensionOperand<34>; 230bdd1243dSDimitry Andricdefm SPV_NV_ray_tracing : ExtensionOperand<35>; 231bdd1243dSDimitry Andricdefm SPV_NV_compute_shader_derivatives : ExtensionOperand<36>; 232bdd1243dSDimitry Andricdefm SPV_NV_fragment_shader_barycentric : ExtensionOperand<37>; 233bdd1243dSDimitry Andricdefm SPV_NV_mesh_shader : ExtensionOperand<38>; 234bdd1243dSDimitry Andricdefm SPV_NV_shader_image_footprint : ExtensionOperand<39>; 235bdd1243dSDimitry Andricdefm SPV_NV_shading_rate : ExtensionOperand<40>; 236bdd1243dSDimitry Andricdefm SPV_INTEL_subgroups : ExtensionOperand<41>; 237bdd1243dSDimitry Andricdefm SPV_INTEL_media_block_io : ExtensionOperand<42>; 238bdd1243dSDimitry Andricdefm SPV_EXT_fragment_invocation_density : ExtensionOperand<44>; 239bdd1243dSDimitry Andricdefm SPV_KHR_no_integer_wrap_decoration : ExtensionOperand<45>; 240bdd1243dSDimitry Andricdefm SPV_KHR_float_controls : ExtensionOperand<46>; 241bdd1243dSDimitry Andricdefm SPV_EXT_physical_storage_buffer : ExtensionOperand<47>; 242bdd1243dSDimitry Andricdefm SPV_INTEL_fpga_memory_attributes : ExtensionOperand<48>; 243bdd1243dSDimitry Andricdefm SPV_NV_cooperative_matrix : ExtensionOperand<49>; 244bdd1243dSDimitry Andricdefm SPV_INTEL_shader_integer_functions2 : ExtensionOperand<50>; 245bdd1243dSDimitry Andricdefm SPV_INTEL_fpga_loop_controls : ExtensionOperand<51>; 246bdd1243dSDimitry Andricdefm SPV_EXT_fragment_shader_interlock : ExtensionOperand<52>; 247bdd1243dSDimitry Andricdefm SPV_NV_shader_sm_builtins : ExtensionOperand<53>; 248bdd1243dSDimitry Andricdefm SPV_KHR_shader_clock : ExtensionOperand<54>; 249bdd1243dSDimitry Andricdefm SPV_INTEL_unstructured_loop_controls : ExtensionOperand<55>; 250bdd1243dSDimitry Andricdefm SPV_EXT_demote_to_helper_invocation : ExtensionOperand<56>; 251bdd1243dSDimitry Andricdefm SPV_INTEL_fpga_reg : ExtensionOperand<57>; 252*5f757f3fSDimitry Andricdefm SPV_INTEL_blocking_pipes : ExtensionOperand<58>; 253*5f757f3fSDimitry Andricdefm SPV_GOOGLE_user_type : ExtensionOperand<59>; 254*5f757f3fSDimitry Andricdefm SPV_KHR_physical_storage_buffer : ExtensionOperand<60>; 255*5f757f3fSDimitry Andricdefm SPV_INTEL_kernel_attributes : ExtensionOperand<61>; 256*5f757f3fSDimitry Andricdefm SPV_KHR_non_semantic_info : ExtensionOperand<62>; 257*5f757f3fSDimitry Andricdefm SPV_INTEL_io_pipes : ExtensionOperand<63>; 258*5f757f3fSDimitry Andricdefm SPV_KHR_ray_tracing : ExtensionOperand<64>; 259*5f757f3fSDimitry Andricdefm SPV_KHR_ray_query : ExtensionOperand<65>; 260*5f757f3fSDimitry Andricdefm SPV_INTEL_fpga_memory_accesses : ExtensionOperand<66>; 261*5f757f3fSDimitry Andricdefm SPV_INTEL_arbitrary_precision_integers : ExtensionOperand<67>; 262*5f757f3fSDimitry Andricdefm SPV_EXT_shader_atomic_float_add : ExtensionOperand<68>; 263*5f757f3fSDimitry Andricdefm SPV_KHR_terminate_invocation : ExtensionOperand<69>; 264*5f757f3fSDimitry Andricdefm SPV_KHR_fragment_shading_rate : ExtensionOperand<70>; 265*5f757f3fSDimitry Andricdefm SPV_EXT_shader_image_int64 : ExtensionOperand<71>; 266*5f757f3fSDimitry Andricdefm SPV_INTEL_fp_fast_math_mode : ExtensionOperand<72>; 267*5f757f3fSDimitry Andricdefm SPV_INTEL_fpga_cluster_attributes : ExtensionOperand<73>; 268*5f757f3fSDimitry Andricdefm SPV_INTEL_loop_fuse : ExtensionOperand<74>; 269*5f757f3fSDimitry Andricdefm SPV_EXT_shader_atomic_float_min_max : ExtensionOperand<75>; 270*5f757f3fSDimitry Andricdefm SPV_KHR_workgroup_memory_explicit_layout : ExtensionOperand<76>; 271*5f757f3fSDimitry Andricdefm SPV_KHR_linkonce_odr : ExtensionOperand<77>; 272*5f757f3fSDimitry Andricdefm SPV_KHR_expect_assume : ExtensionOperand<78>; 273*5f757f3fSDimitry Andricdefm SPV_INTEL_fpga_dsp_control : ExtensionOperand<79>; 274*5f757f3fSDimitry Andricdefm SPV_NV_bindless_texture : ExtensionOperand<80>; 275*5f757f3fSDimitry Andricdefm SPV_INTEL_fpga_invocation_pipelining_attributes : ExtensionOperand<81>; 276*5f757f3fSDimitry Andricdefm SPV_KHR_subgroup_uniform_control_flow : ExtensionOperand<82>; 277*5f757f3fSDimitry Andricdefm SPV_HUAWEI_subpass_shading : ExtensionOperand<83>; 278*5f757f3fSDimitry Andricdefm SPV_KHR_integer_dot_product : ExtensionOperand<84>; 279*5f757f3fSDimitry Andricdefm SPV_EXT_shader_atomic_float16_add : ExtensionOperand<85>; 280*5f757f3fSDimitry Andricdefm SPV_INTEL_runtime_aligned : ExtensionOperand<86>; 281*5f757f3fSDimitry Andricdefm SPV_KHR_bit_instructions : ExtensionOperand<87>; 282*5f757f3fSDimitry Andricdefm SPV_NV_ray_tracing_motion_blur : ExtensionOperand<88>; 283*5f757f3fSDimitry Andricdefm SPV_KHR_uniform_group_instructions : ExtensionOperand<89>; 284*5f757f3fSDimitry Andricdefm SPV_KHR_subgroup_rotate : ExtensionOperand<90>; 285*5f757f3fSDimitry Andricdefm SPV_INTEL_split_barrier : ExtensionOperand<91>; 286*5f757f3fSDimitry Andricdefm SPV_KHR_ray_cull_mask : ExtensionOperand<92>; 287*5f757f3fSDimitry Andricdefm SPV_KHR_fragment_shader_barycentric : ExtensionOperand<93>; 288*5f757f3fSDimitry Andricdefm SPV_EXT_relaxed_printf_string_address_space : ExtensionOperand<94>; 289*5f757f3fSDimitry Andricdefm SPV_EXT_ycbcr_attachments : ExtensionOperand<95>; 290*5f757f3fSDimitry Andricdefm SPV_EXT_mesh_shader : ExtensionOperand<96>; 291*5f757f3fSDimitry Andricdefm SPV_ARM_core_builtins : ExtensionOperand<97>; 292*5f757f3fSDimitry Andricdefm SPV_EXT_opacity_micromap : ExtensionOperand<98>; 293*5f757f3fSDimitry Andricdefm SPV_NV_shader_invocation_reorder : ExtensionOperand<99>; 294*5f757f3fSDimitry Andricdefm SPV_INTEL_usm_storage_classes : ExtensionOperand<100>; 295*5f757f3fSDimitry Andricdefm SPV_INTEL_fpga_latency_control : ExtensionOperand<101>; 296*5f757f3fSDimitry Andricdefm SPV_INTEL_fpga_argument_interfaces : ExtensionOperand<102>; 297*5f757f3fSDimitry Andricdefm SPV_INTEL_optnone : ExtensionOperand<103>; 298bdd1243dSDimitry Andric 299bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 300bdd1243dSDimitry Andric// Multiclass used to define Capabilities enum values and at the same time 301bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions, and 302bdd1243dSDimitry Andric// capabilities. 303bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 304bdd1243dSDimitry Andric 305bdd1243dSDimitry Andricdef Capability : GenericEnum, Operand<i32> { 306bdd1243dSDimitry Andric let FilterClass = "Capability"; 307bdd1243dSDimitry Andric let NameField = "Name"; 308bdd1243dSDimitry Andric let ValueField = "Value"; 309bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 310bdd1243dSDimitry Andric} 311bdd1243dSDimitry Andric 312bdd1243dSDimitry Andricclass Capability<string name, bits<32> value> { 313bdd1243dSDimitry Andric string Name = name; 314bdd1243dSDimitry Andric bits<32> Value = value; 315bdd1243dSDimitry Andric} 316bdd1243dSDimitry Andric 317bdd1243dSDimitry Andricmulticlass CapabilityOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 318bdd1243dSDimitry Andric def NAME : Capability<NAME, value>; 319bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<CapabilityOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 320bdd1243dSDimitry Andric} 321bdd1243dSDimitry Andric 322bdd1243dSDimitry Andricdefm Matrix : CapabilityOperand<0, 0, 0, [], []>; 323bdd1243dSDimitry Andricdefm Shader : CapabilityOperand<1, 0, 0, [], [Matrix]>; 324bdd1243dSDimitry Andricdefm Geometry : CapabilityOperand<2, 0, 0, [], [Shader]>; 325bdd1243dSDimitry Andricdefm Tessellation : CapabilityOperand<3, 0, 0, [], [Shader]>; 326bdd1243dSDimitry Andricdefm Addresses : CapabilityOperand<4, 0, 0, [], []>; 327bdd1243dSDimitry Andricdefm Linkage : CapabilityOperand<5, 0, 0, [], []>; 328bdd1243dSDimitry Andricdefm Kernel : CapabilityOperand<6, 0, 0, [], []>; 329bdd1243dSDimitry Andricdefm Vector16 : CapabilityOperand<7, 0, 0, [], [Kernel]>; 330bdd1243dSDimitry Andricdefm Float16Buffer : CapabilityOperand<8, 0, 0, [], [Kernel]>; 331bdd1243dSDimitry Andricdefm Float16 : CapabilityOperand<9, 0, 0, [], []>; 332bdd1243dSDimitry Andricdefm Float64 : CapabilityOperand<10, 0, 0, [], []>; 333bdd1243dSDimitry Andricdefm Int64 : CapabilityOperand<11, 0, 0, [], []>; 334bdd1243dSDimitry Andricdefm Int64Atomics : CapabilityOperand<12, 0, 0, [], [Int64]>; 335bdd1243dSDimitry Andricdefm ImageBasic : CapabilityOperand<13, 0, 0, [], [Kernel]>; 336bdd1243dSDimitry Andricdefm ImageReadWrite : CapabilityOperand<14, 0, 0, [], [ImageBasic]>; 337bdd1243dSDimitry Andricdefm ImageMipmap : CapabilityOperand<15, 0, 0, [], [ImageBasic]>; 338bdd1243dSDimitry Andricdefm Pipes : CapabilityOperand<17, 0, 0, [], [Kernel]>; 339bdd1243dSDimitry Andricdefm Groups : CapabilityOperand<18, 0, 0, [], []>; 340bdd1243dSDimitry Andricdefm DeviceEnqueue : CapabilityOperand<19, 0, 0, [], []>; 341bdd1243dSDimitry Andricdefm LiteralSampler : CapabilityOperand<20, 0, 0, [], [Kernel]>; 342bdd1243dSDimitry Andricdefm AtomicStorage : CapabilityOperand<21, 0, 0, [], [Shader]>; 343bdd1243dSDimitry Andricdefm Int16 : CapabilityOperand<22, 0, 0, [], []>; 344bdd1243dSDimitry Andricdefm TessellationPointSize : CapabilityOperand<23, 0, 0, [], [Tessellation]>; 345bdd1243dSDimitry Andricdefm GeometryPointSize : CapabilityOperand<24, 0, 0, [], [Geometry]>; 346bdd1243dSDimitry Andricdefm ImageGatherExtended : CapabilityOperand<25, 0, 0, [], [Shader]>; 347bdd1243dSDimitry Andricdefm StorageImageMultisample : CapabilityOperand<27, 0, 0, [], [Shader]>; 348bdd1243dSDimitry Andricdefm UniformBufferArrayDynamicIndexing : CapabilityOperand<28, 0, 0, [], [Shader]>; 349bdd1243dSDimitry Andricdefm SampledImageArrayDymnamicIndexing : CapabilityOperand<29, 0, 0, [], [Shader]>; 350bdd1243dSDimitry Andricdefm ClipDistance : CapabilityOperand<32, 0, 0, [], [Shader]>; 351bdd1243dSDimitry Andricdefm CullDistance : CapabilityOperand<33, 0, 0, [], [Shader]>; 352bdd1243dSDimitry Andricdefm SampleRateShading : CapabilityOperand<35, 0, 0, [], [Shader]>; 353bdd1243dSDimitry Andricdefm SampledRect : CapabilityOperand<37, 0, 0, [], [Shader]>; 354bdd1243dSDimitry Andricdefm ImageRect : CapabilityOperand<36, 0, 0, [], [SampledRect]>; 355bdd1243dSDimitry Andricdefm GenericPointer : CapabilityOperand<38, 0, 0, [], [Addresses]>; 356bdd1243dSDimitry Andricdefm Int8 : CapabilityOperand<39, 0, 0, [], []>; 357bdd1243dSDimitry Andricdefm InputAttachment : CapabilityOperand<40, 0, 0, [], [Shader]>; 358bdd1243dSDimitry Andricdefm SparseResidency : CapabilityOperand<41, 0, 0, [], [Shader]>; 359bdd1243dSDimitry Andricdefm MinLod : CapabilityOperand<42, 0, 0, [], [Shader]>; 360bdd1243dSDimitry Andricdefm Sampled1D : CapabilityOperand<43, 0, 0, [], []>; 361bdd1243dSDimitry Andricdefm Image1D : CapabilityOperand<44, 0, 0, [], [Sampled1D]>; 362bdd1243dSDimitry Andricdefm SampledCubeArray : CapabilityOperand<45, 0, 0, [], [Shader]>; 363bdd1243dSDimitry Andricdefm ImageCubeArray : CapabilityOperand<34, 0, 0, [], [SampledCubeArray]>; 364bdd1243dSDimitry Andricdefm SampledBuffer : CapabilityOperand<46, 0, 0, [], []>; 365bdd1243dSDimitry Andricdefm ImageBuffer : CapabilityOperand<47, 0, 0, [], [SampledBuffer]>; 366bdd1243dSDimitry Andricdefm ImageMSArray : CapabilityOperand<48, 0, 0, [], [Shader]>; 367bdd1243dSDimitry Andricdefm StorageImageExtendedFormats : CapabilityOperand<49, 0, 0, [], [Shader]>; 368bdd1243dSDimitry Andricdefm ImageQuery : CapabilityOperand<50, 0, 0, [], [Shader]>; 369bdd1243dSDimitry Andricdefm DerivativeControl : CapabilityOperand<51, 0, 0, [], [Shader]>; 370bdd1243dSDimitry Andricdefm InterpolationFunction : CapabilityOperand<52, 0, 0, [], [Shader]>; 371bdd1243dSDimitry Andricdefm TransformFeedback : CapabilityOperand<53, 0, 0, [], [Shader]>; 372bdd1243dSDimitry Andricdefm GeometryStreams : CapabilityOperand<54, 0, 0, [], [Geometry]>; 373bdd1243dSDimitry Andricdefm StorageImageReadWithoutFormat : CapabilityOperand<55, 0, 0, [], [Shader]>; 374bdd1243dSDimitry Andricdefm StorageImageWriteWithoutFormat : CapabilityOperand<56, 0, 0, [], [Shader]>; 375bdd1243dSDimitry Andricdefm MultiViewport : CapabilityOperand<57, 0, 0, [], [Geometry]>; 376bdd1243dSDimitry Andricdefm SubgroupDispatch : CapabilityOperand<58, 0x10100, 0, [], [DeviceEnqueue]>; 377bdd1243dSDimitry Andricdefm NamedBarrier : CapabilityOperand<59, 0x10100, 0, [], [Kernel]>; 378bdd1243dSDimitry Andricdefm PipeStorage : CapabilityOperand<60, 0x10100, 0, [], [Pipes]>; 379bdd1243dSDimitry Andricdefm GroupNonUniform : CapabilityOperand<61, 0x10300, 0, [], []>; 380bdd1243dSDimitry Andricdefm GroupNonUniformVote : CapabilityOperand<62, 0x10300, 0, [], [GroupNonUniform]>; 381bdd1243dSDimitry Andricdefm GroupNonUniformArithmetic : CapabilityOperand<63, 0x10300, 0, [], [GroupNonUniform]>; 382bdd1243dSDimitry Andricdefm GroupNonUniformBallot : CapabilityOperand<64, 0x10300, 0, [], [GroupNonUniform]>; 383bdd1243dSDimitry Andricdefm GroupNonUniformShuffle : CapabilityOperand<65, 0x10300, 0, [], [GroupNonUniform]>; 384bdd1243dSDimitry Andricdefm GroupNonUniformShuffleRelative : CapabilityOperand<66, 0x10300, 0, [], [GroupNonUniform]>; 385bdd1243dSDimitry Andricdefm GroupNonUniformClustered : CapabilityOperand<67, 0x10300, 0, [], [GroupNonUniform]>; 386bdd1243dSDimitry Andricdefm GroupNonUniformQuad : CapabilityOperand<68, 0x10300, 0, [], [GroupNonUniform]>; 387bdd1243dSDimitry Andricdefm SubgroupBallotKHR : CapabilityOperand<4423, 0, 0, [SPV_KHR_shader_ballot], []>; 388bdd1243dSDimitry Andricdefm DrawParameters : CapabilityOperand<4427, 0x10300, 0, [SPV_KHR_shader_draw_parameters], [Shader]>; 389bdd1243dSDimitry Andricdefm SubgroupVoteKHR : CapabilityOperand<4431, 0, 0, [SPV_KHR_subgroup_vote], []>; 390*5f757f3fSDimitry Andricdefm StorageBuffer16BitAccess : CapabilityOperand<4433, 0x10300, 0, [SPV_KHR_16bit_storage], []>; 391*5f757f3fSDimitry Andricdefm StorageUniform16 : CapabilityOperand<4434, 0x10300, 0, [SPV_KHR_16bit_storage], [StorageBuffer16BitAccess]>; 392*5f757f3fSDimitry Andricdefm StoragePushConstant16 : CapabilityOperand<4435, 0x10300, 0, [SPV_KHR_16bit_storage], []>; 393*5f757f3fSDimitry Andricdefm StorageInputOutput16 : CapabilityOperand<4436, 0x10300, 0, [SPV_KHR_16bit_storage], []>; 394bdd1243dSDimitry Andricdefm DeviceGroup : CapabilityOperand<4437, 0x10300, 0, [SPV_KHR_device_group], []>; 395bdd1243dSDimitry Andricdefm MultiView : CapabilityOperand<4439, 0x10300, 0, [SPV_KHR_multiview], [Shader]>; 396bdd1243dSDimitry Andricdefm VariablePointersStorageBuffer : CapabilityOperand<4441, 0x10300, 0, [SPV_KHR_variable_pointers], [Shader]>; 397bdd1243dSDimitry Andricdefm VariablePointers : CapabilityOperand<4442, 0x10300, 0, [SPV_KHR_variable_pointers], [VariablePointersStorageBuffer]>; 398bdd1243dSDimitry Andricdefm AtomicStorageOps : CapabilityOperand<4445, 0, 0, [SPV_KHR_shader_atomic_counter_ops], []>; 399bdd1243dSDimitry Andricdefm SampleMaskPostDepthCoverage : CapabilityOperand<4447, 0, 0, [SPV_KHR_post_depth_coverage], []>; 400bdd1243dSDimitry Andricdefm StorageBuffer8BitAccess : CapabilityOperand<4448, 0, 0, [SPV_KHR_8bit_storage], []>; 401bdd1243dSDimitry Andricdefm UniformAndStorageBuffer8BitAccess : CapabilityOperand<4449, 0, 0, [SPV_KHR_8bit_storage], [StorageBuffer8BitAccess]>; 402bdd1243dSDimitry Andricdefm StoragePushConstant8 : CapabilityOperand<4450, 0, 0, [SPV_KHR_8bit_storage], []>; 403bdd1243dSDimitry Andricdefm DenormPreserve : CapabilityOperand<4464, 0x10400, 0, [SPV_KHR_float_controls], []>; 404bdd1243dSDimitry Andricdefm DenormFlushToZero : CapabilityOperand<4465, 0x10400, 0, [SPV_KHR_float_controls], []>; 405bdd1243dSDimitry Andricdefm SignedZeroInfNanPreserve : CapabilityOperand<4466, 0x10400, 0, [SPV_KHR_float_controls], []>; 406bdd1243dSDimitry Andricdefm RoundingModeRTE : CapabilityOperand<4467, 0x10400, 0, [SPV_KHR_float_controls], []>; 407bdd1243dSDimitry Andricdefm RoundingModeRTZ : CapabilityOperand<4468, 0x10400, 0, [SPV_KHR_float_controls], []>; 408bdd1243dSDimitry Andricdefm Float16ImageAMD : CapabilityOperand<5008, 0, 0, [], [Shader]>; 409bdd1243dSDimitry Andricdefm ImageGatherBiasLodAMD : CapabilityOperand<5009, 0, 0, [], [Shader]>; 410bdd1243dSDimitry Andricdefm FragmentMaskAMD : CapabilityOperand<5010, 0, 0, [], [Shader]>; 411bdd1243dSDimitry Andricdefm StencilExportEXT : CapabilityOperand<5013, 0, 0, [], [Shader]>; 412bdd1243dSDimitry Andricdefm ImageReadWriteLodAMD : CapabilityOperand<5015, 0, 0, [], [Shader]>; 413bdd1243dSDimitry Andricdefm SampleMaskOverrideCoverageNV : CapabilityOperand<5249, 0, 0, [], [SampleRateShading]>; 414bdd1243dSDimitry Andricdefm GeometryShaderPassthroughNV : CapabilityOperand<5251, 0, 0, [], [Geometry]>; 415bdd1243dSDimitry Andricdefm ShaderViewportIndexLayerEXT : CapabilityOperand<5254, 0, 0, [], [MultiViewport]>; 416bdd1243dSDimitry Andricdefm ShaderViewportMaskNV : CapabilityOperand<5255, 0, 0, [], [ShaderViewportIndexLayerEXT]>; 417bdd1243dSDimitry Andricdefm ShaderStereoViewNV : CapabilityOperand<5259, 0, 0, [], [ShaderViewportMaskNV]>; 418bdd1243dSDimitry Andricdefm PerViewAttributesNV : CapabilityOperand<5260, 0, 0, [], [MultiView]>; 419bdd1243dSDimitry Andricdefm FragmentFullyCoveredEXT : CapabilityOperand<5265, 0, 0, [], [Shader]>; 420bdd1243dSDimitry Andricdefm MeshShadingNV : CapabilityOperand<5266, 0, 0, [], [Shader]>; 421bdd1243dSDimitry Andricdefm ShaderNonUniformEXT : CapabilityOperand<5301, 0, 0, [], [Shader]>; 422bdd1243dSDimitry Andricdefm RuntimeDescriptorArrayEXT : CapabilityOperand<5302, 0, 0, [], [Shader]>; 423bdd1243dSDimitry Andricdefm InputAttachmentArrayDynamicIndexingEXT : CapabilityOperand<5303, 0, 0, [], [InputAttachment]>; 424bdd1243dSDimitry Andricdefm UniformTexelBufferArrayDynamicIndexingEXT : CapabilityOperand<5304, 0, 0, [], [SampledBuffer]>; 425bdd1243dSDimitry Andricdefm StorageTexelBufferArrayDynamicIndexingEXT : CapabilityOperand<5305, 0, 0, [], [ImageBuffer]>; 426bdd1243dSDimitry Andricdefm UniformBufferArrayNonUniformIndexingEXT : CapabilityOperand<5306, 0, 0, [], [ShaderNonUniformEXT]>; 427bdd1243dSDimitry Andricdefm SampledImageArrayNonUniformIndexingEXT : CapabilityOperand<5307, 0, 0, [], [ShaderNonUniformEXT]>; 428bdd1243dSDimitry Andricdefm StorageBufferArrayNonUniformIndexingEXT : CapabilityOperand<5308, 0, 0, [], [ShaderNonUniformEXT]>; 429bdd1243dSDimitry Andricdefm StorageImageArrayNonUniformIndexingEXT : CapabilityOperand<5309, 0, 0, [], [ShaderNonUniformEXT]>; 430bdd1243dSDimitry Andricdefm InputAttachmentArrayNonUniformIndexingEXT : CapabilityOperand<5310, 0, 0, [], [InputAttachment, ShaderNonUniformEXT]>; 431bdd1243dSDimitry Andricdefm UniformTexelBufferArrayNonUniformIndexingEXT : CapabilityOperand<5311, 0, 0, [], [SampledBuffer, ShaderNonUniformEXT]>; 432bdd1243dSDimitry Andricdefm StorageTexelBufferArrayNonUniformIndexingEXT : CapabilityOperand<5312, 0, 0, [], [ImageBuffer, ShaderNonUniformEXT]>; 433bdd1243dSDimitry Andricdefm RayTracingNV : CapabilityOperand<5340, 0, 0, [], [Shader]>; 434bdd1243dSDimitry Andricdefm SubgroupShuffleINTEL : CapabilityOperand<5568, 0, 0, [], []>; 435bdd1243dSDimitry Andricdefm SubgroupBufferBlockIOINTEL : CapabilityOperand<5569, 0, 0, [], []>; 436bdd1243dSDimitry Andricdefm SubgroupImageBlockIOINTEL : CapabilityOperand<5570, 0, 0, [], []>; 437bdd1243dSDimitry Andricdefm SubgroupImageMediaBlockIOINTEL : CapabilityOperand<5579, 0, 0, [], []>; 438bdd1243dSDimitry Andricdefm SubgroupAvcMotionEstimationINTEL : CapabilityOperand<5696, 0, 0, [], []>; 439bdd1243dSDimitry Andricdefm SubgroupAvcMotionEstimationIntraINTEL : CapabilityOperand<5697, 0, 0, [], []>; 440bdd1243dSDimitry Andricdefm SubgroupAvcMotionEstimationChromaINTEL : CapabilityOperand<5698, 0, 0, [], []>; 441bdd1243dSDimitry Andricdefm GroupNonUniformPartitionedNV : CapabilityOperand<5297, 0, 0, [], []>; 442bdd1243dSDimitry Andricdefm VulkanMemoryModelKHR : CapabilityOperand<5345, 0, 0, [], []>; 443bdd1243dSDimitry Andricdefm VulkanMemoryModelDeviceScopeKHR : CapabilityOperand<5346, 0, 0, [], []>; 444bdd1243dSDimitry Andricdefm ImageFootprintNV : CapabilityOperand<5282, 0, 0, [], []>; 445bdd1243dSDimitry Andricdefm FragmentBarycentricNV : CapabilityOperand<5284, 0, 0, [], []>; 446bdd1243dSDimitry Andricdefm ComputeDerivativeGroupQuadsNV : CapabilityOperand<5288, 0, 0, [], []>; 447bdd1243dSDimitry Andricdefm ComputeDerivativeGroupLinearNV : CapabilityOperand<5350, 0, 0, [], []>; 448bdd1243dSDimitry Andricdefm FragmentDensityEXT : CapabilityOperand<5291, 0, 0, [], [Shader]>; 449bdd1243dSDimitry Andricdefm PhysicalStorageBufferAddressesEXT : CapabilityOperand<5347, 0, 0, [], [Shader]>; 450bdd1243dSDimitry Andricdefm CooperativeMatrixNV : CapabilityOperand<5357, 0, 0, [], [Shader]>; 451*5f757f3fSDimitry Andricdefm ArbitraryPrecisionIntegersINTEL : CapabilityOperand<5844, 0, 0, [SPV_INTEL_arbitrary_precision_integers], [Int8, Int16]>; 452*5f757f3fSDimitry Andricdefm OptNoneINTEL : CapabilityOperand<6094, 0, 0, [SPV_INTEL_optnone], []>; 453*5f757f3fSDimitry Andricdefm BitInstructions : CapabilityOperand<6025, 0, 0, [SPV_KHR_bit_instructions], []>; 454*5f757f3fSDimitry Andricdefm ExpectAssumeKHR : CapabilityOperand<5629, 0, 0, [SPV_KHR_expect_assume], []>; 455bdd1243dSDimitry Andric 456bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 457bdd1243dSDimitry Andric// Multiclass used to define SourceLanguage enum values and at the same time 458bdd1243dSDimitry Andric// SymbolicOperand entries. 459bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 460bdd1243dSDimitry Andric 461bdd1243dSDimitry Andricdef SourceLanguage : GenericEnum, Operand<i32> { 462bdd1243dSDimitry Andric let FilterClass = "SourceLanguage"; 463bdd1243dSDimitry Andric let NameField = "Name"; 464bdd1243dSDimitry Andric let ValueField = "Value"; 465bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 466bdd1243dSDimitry Andric} 467bdd1243dSDimitry Andric 468bdd1243dSDimitry Andricclass SourceLanguage<string name, bits<32> value> { 469bdd1243dSDimitry Andric string Name = name; 470bdd1243dSDimitry Andric bits<32> Value = value; 471bdd1243dSDimitry Andric} 472bdd1243dSDimitry Andric 473bdd1243dSDimitry Andricmulticlass SourceLanguageOperand<bits<32> value> { 474bdd1243dSDimitry Andric def : SourceLanguage<NAME, value>; 475bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<SourceLanguageOperand, value, NAME, 0, 0, [], []>; 476bdd1243dSDimitry Andric} 477bdd1243dSDimitry Andric 478bdd1243dSDimitry Andricdefm Unknown : SourceLanguageOperand<0>; 479bdd1243dSDimitry Andricdefm ESSL : SourceLanguageOperand<1>; 480bdd1243dSDimitry Andricdefm GLSL : SourceLanguageOperand<2>; 481bdd1243dSDimitry Andricdefm OpenCL_C : SourceLanguageOperand<3>; 482bdd1243dSDimitry Andricdefm OpenCL_CPP : SourceLanguageOperand<4>; 483bdd1243dSDimitry Andricdefm HLSL : SourceLanguageOperand<5>; 484bdd1243dSDimitry Andric 485bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 486bdd1243dSDimitry Andric// Multiclass used to define AddressingModel enum values and at the same time 487bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, and capabilities. 488bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 489bdd1243dSDimitry Andric 490bdd1243dSDimitry Andricdef AddressingModel : GenericEnum, Operand<i32> { 491bdd1243dSDimitry Andric let FilterClass = "AddressingModel"; 492bdd1243dSDimitry Andric let NameField = "Name"; 493bdd1243dSDimitry Andric let ValueField = "Value"; 494bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 495bdd1243dSDimitry Andric} 496bdd1243dSDimitry Andric 497bdd1243dSDimitry Andricclass AddressingModel<string name, bits<32> value> { 498bdd1243dSDimitry Andric string Name = name; 499bdd1243dSDimitry Andric bits<32> Value = value; 500bdd1243dSDimitry Andric} 501bdd1243dSDimitry Andric 502bdd1243dSDimitry Andricmulticlass AddressingModelOperand<bits<32> value, list<Capability> reqCapabilities> { 503bdd1243dSDimitry Andric def : AddressingModel<NAME, value>; 504bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<AddressingModelOperand, value, NAME, 0, 0, [], reqCapabilities>; 505bdd1243dSDimitry Andric} 506bdd1243dSDimitry Andric 507bdd1243dSDimitry Andricdefm Logical : AddressingModelOperand<0, []>; 508bdd1243dSDimitry Andricdefm Physical32 : AddressingModelOperand<1, [Addresses]>; 509bdd1243dSDimitry Andricdefm Physical64 : AddressingModelOperand<2, [Addresses]>; 510bdd1243dSDimitry Andricdefm PhysicalStorageBuffer64EXT : AddressingModelOperand<5348, [PhysicalStorageBufferAddressesEXT]>; 511bdd1243dSDimitry Andric 512bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 513bdd1243dSDimitry Andric// Multiclass used to define ExecutionModel enum values and at the same time 514bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 515bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 516bdd1243dSDimitry Andric 517bdd1243dSDimitry Andricdef ExecutionModel : GenericEnum, Operand<i32> { 518bdd1243dSDimitry Andric let FilterClass = "ExecutionModel"; 519bdd1243dSDimitry Andric let NameField = "Name"; 520bdd1243dSDimitry Andric let ValueField = "Value"; 521bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 522bdd1243dSDimitry Andric} 523bdd1243dSDimitry Andric 524bdd1243dSDimitry Andricclass ExecutionModel<string name, bits<32> value> { 525bdd1243dSDimitry Andric string Name = name; 526bdd1243dSDimitry Andric bits<32> Value = value; 527bdd1243dSDimitry Andric} 528bdd1243dSDimitry Andric 529bdd1243dSDimitry Andricmulticlass ExecutionModelOperand<bits<32> value, list<Capability> reqCapabilities> { 530bdd1243dSDimitry Andric def : ExecutionModel<NAME, value>; 531bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<ExecutionModelOperand, value, NAME, 0, 0, [], reqCapabilities>; 532bdd1243dSDimitry Andric} 533bdd1243dSDimitry Andric 534bdd1243dSDimitry Andricdefm Vertex : ExecutionModelOperand<0, [Shader]>; 535bdd1243dSDimitry Andricdefm TessellationControl: ExecutionModelOperand<1, [Tessellation]>; 536bdd1243dSDimitry Andricdefm TessellationEvaluation: ExecutionModelOperand<2, [Tessellation]>; 537bdd1243dSDimitry Andricdefm Geometry: ExecutionModelOperand<3, [Geometry]>; 538bdd1243dSDimitry Andricdefm Fragment: ExecutionModelOperand<4, [Shader]>; 539bdd1243dSDimitry Andricdefm GLCompute: ExecutionModelOperand<5, [Shader]>; 540bdd1243dSDimitry Andricdefm Kernel: ExecutionModelOperand<6, [Kernel]>; 541bdd1243dSDimitry Andricdefm TaskNV: ExecutionModelOperand<5267, [MeshShadingNV]>; 542bdd1243dSDimitry Andricdefm MeshNV: ExecutionModelOperand<5268, [MeshShadingNV]>; 543bdd1243dSDimitry Andricdefm RayGenerationNV: ExecutionModelOperand<5313, [RayTracingNV]>; 544bdd1243dSDimitry Andricdefm IntersectionNV: ExecutionModelOperand<5314, [RayTracingNV]>; 545bdd1243dSDimitry Andricdefm AnyHitNV: ExecutionModelOperand<5315, [RayTracingNV]>; 546bdd1243dSDimitry Andricdefm ClosestHitNV: ExecutionModelOperand<5316, [RayTracingNV]>; 547bdd1243dSDimitry Andricdefm MissNV: ExecutionModelOperand<5317, [RayTracingNV]>; 548bdd1243dSDimitry Andricdefm CallableNV: ExecutionModelOperand<5318, [RayTracingNV]>; 549bdd1243dSDimitry Andric 550bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 551bdd1243dSDimitry Andric// Multiclass used to define MemoryModel enum values and at the same time 552bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 553bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 554bdd1243dSDimitry Andric 555bdd1243dSDimitry Andricdef MemoryModel : GenericEnum, Operand<i32> { 556bdd1243dSDimitry Andric let FilterClass = "MemoryModel"; 557bdd1243dSDimitry Andric let NameField = "Name"; 558bdd1243dSDimitry Andric let ValueField = "Value"; 559bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 560bdd1243dSDimitry Andric} 561bdd1243dSDimitry Andric 562bdd1243dSDimitry Andricclass MemoryModel<string name, bits<32> value> { 563bdd1243dSDimitry Andric string Name = name; 564bdd1243dSDimitry Andric bits<32> Value = value; 565bdd1243dSDimitry Andric} 566bdd1243dSDimitry Andric 567bdd1243dSDimitry Andricmulticlass MemoryModelOperand<bits<32> value, list<Capability> reqCapabilities> { 568bdd1243dSDimitry Andric def : MemoryModel<NAME, value>; 569bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<MemoryModelOperand, value, NAME, 0, 0, [], reqCapabilities>; 570bdd1243dSDimitry Andric} 571bdd1243dSDimitry Andric 572bdd1243dSDimitry Andricdefm Simple : MemoryModelOperand<0, [Shader]>; 573bdd1243dSDimitry Andricdefm GLSL450 : MemoryModelOperand<1, [Shader]>; 574bdd1243dSDimitry Andricdefm OpenCL : MemoryModelOperand<2, [Kernel]>; 575bdd1243dSDimitry Andricdefm VulkanKHR : MemoryModelOperand<3, [VulkanMemoryModelKHR]>; 576bdd1243dSDimitry Andric 577bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 578bdd1243dSDimitry Andric// Multiclass used to define ExecutionMode enum values and at the same time 579bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 580bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 581bdd1243dSDimitry Andric 582bdd1243dSDimitry Andricdef ExecutionMode : GenericEnum, Operand<i32> { 583bdd1243dSDimitry Andric let FilterClass = "ExecutionMode"; 584bdd1243dSDimitry Andric let NameField = "Name"; 585bdd1243dSDimitry Andric let ValueField = "Value"; 586bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 587bdd1243dSDimitry Andric} 588bdd1243dSDimitry Andric 589bdd1243dSDimitry Andricclass ExecutionMode<string name, bits<32> value> { 590bdd1243dSDimitry Andric string Name = name; 591bdd1243dSDimitry Andric bits<32> Value = value; 592bdd1243dSDimitry Andric} 593bdd1243dSDimitry Andric 594bdd1243dSDimitry Andricmulticlass ExecutionModeOperand<bits<32> value, list<Capability> reqCapabilities> { 595bdd1243dSDimitry Andric def : ExecutionMode<NAME, value>; 596bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<ExecutionModeOperand, value, NAME, 0, 0, [], reqCapabilities>; 597bdd1243dSDimitry Andric} 598bdd1243dSDimitry Andric 599bdd1243dSDimitry Andricdefm Invocations : ExecutionModeOperand<0, [Geometry]>; 600bdd1243dSDimitry Andricdefm SpacingEqual : ExecutionModeOperand<1, [Tessellation]>; 601bdd1243dSDimitry Andricdefm SpacingFractionalEven : ExecutionModeOperand<2, [Tessellation]>; 602bdd1243dSDimitry Andricdefm SpacingFractionalOdd : ExecutionModeOperand<3, [Tessellation]>; 603bdd1243dSDimitry Andricdefm VertexOrderCw : ExecutionModeOperand<4, [Tessellation]>; 604bdd1243dSDimitry Andricdefm VertexOrderCcw : ExecutionModeOperand<5, [Tessellation]>; 605bdd1243dSDimitry Andricdefm PixelCenterInteger : ExecutionModeOperand<6, [Shader]>; 606bdd1243dSDimitry Andricdefm OriginUpperLeft : ExecutionModeOperand<7, [Shader]>; 607bdd1243dSDimitry Andricdefm OriginLowerLeft : ExecutionModeOperand<8, [Shader]>; 608bdd1243dSDimitry Andricdefm EarlyFragmentTests : ExecutionModeOperand<9, [Shader]>; 609bdd1243dSDimitry Andricdefm PointMode : ExecutionModeOperand<10, [Tessellation]>; 610bdd1243dSDimitry Andricdefm Xfb : ExecutionModeOperand<11, [TransformFeedback]>; 611bdd1243dSDimitry Andricdefm DepthReplacing : ExecutionModeOperand<12, [Shader]>; 612bdd1243dSDimitry Andricdefm DepthGreater : ExecutionModeOperand<14, [Shader]>; 613bdd1243dSDimitry Andricdefm DepthLess : ExecutionModeOperand<15, [Shader]>; 614bdd1243dSDimitry Andricdefm DepthUnchanged : ExecutionModeOperand<16, [Shader]>; 615bdd1243dSDimitry Andricdefm LocalSize : ExecutionModeOperand<17, []>; 616bdd1243dSDimitry Andricdefm LocalSizeHint : ExecutionModeOperand<18, [Kernel]>; 617bdd1243dSDimitry Andricdefm InputPoints : ExecutionModeOperand<19, [Geometry]>; 618bdd1243dSDimitry Andricdefm InputLines : ExecutionModeOperand<20, [Geometry]>; 619bdd1243dSDimitry Andricdefm InputLinesAdjacency : ExecutionModeOperand<21, [Geometry]>; 620bdd1243dSDimitry Andricdefm Triangles : ExecutionModeOperand<22, [Geometry]>; 621bdd1243dSDimitry Andricdefm InputTrianglesAdjacency : ExecutionModeOperand<23, [Geometry]>; 622bdd1243dSDimitry Andricdefm Quads : ExecutionModeOperand<24, [Tessellation]>; 623bdd1243dSDimitry Andricdefm Isolines : ExecutionModeOperand<25, [Tessellation]>; 624bdd1243dSDimitry Andricdefm OutputVertices : ExecutionModeOperand<26, [Geometry]>; 625bdd1243dSDimitry Andricdefm OutputPoints : ExecutionModeOperand<27, [Geometry]>; 626bdd1243dSDimitry Andricdefm OutputLineStrip : ExecutionModeOperand<28, [Geometry]>; 627bdd1243dSDimitry Andricdefm OutputTriangleStrip : ExecutionModeOperand<29, [Geometry]>; 628bdd1243dSDimitry Andricdefm VecTypeHint : ExecutionModeOperand<30, [Kernel]>; 629bdd1243dSDimitry Andricdefm ContractionOff : ExecutionModeOperand<31, [Kernel]>; 630bdd1243dSDimitry Andricdefm Initializer : ExecutionModeOperand<33, [Kernel]>; 631bdd1243dSDimitry Andricdefm Finalizer : ExecutionModeOperand<34, [Kernel]>; 632bdd1243dSDimitry Andricdefm SubgroupSize : ExecutionModeOperand<35, [SubgroupDispatch]>; 633bdd1243dSDimitry Andricdefm SubgroupsPerWorkgroup : ExecutionModeOperand<36, [SubgroupDispatch]>; 634bdd1243dSDimitry Andricdefm SubgroupsPerWorkgroupId : ExecutionModeOperand<37, [SubgroupDispatch]>; 635bdd1243dSDimitry Andricdefm LocalSizeId : ExecutionModeOperand<38, []>; 636bdd1243dSDimitry Andricdefm LocalSizeHintId : ExecutionModeOperand<39, [Kernel]>; 637bdd1243dSDimitry Andricdefm PostDepthCoverage : ExecutionModeOperand<4446, [SampleMaskPostDepthCoverage]>; 638bdd1243dSDimitry Andricdefm DenormPreserve : ExecutionModeOperand<4459, [DenormPreserve]>; 639bdd1243dSDimitry Andricdefm DenormFlushToZero : ExecutionModeOperand<4460, [DenormFlushToZero]>; 640bdd1243dSDimitry Andricdefm SignedZeroInfNanPreserve : ExecutionModeOperand<4461, [SignedZeroInfNanPreserve]>; 641bdd1243dSDimitry Andricdefm RoundingModeRTE : ExecutionModeOperand<4462, [RoundingModeRTE]>; 642bdd1243dSDimitry Andricdefm RoundingModeRTZ : ExecutionModeOperand<4463, [RoundingModeRTZ]>; 643bdd1243dSDimitry Andricdefm StencilRefReplacingEXT : ExecutionModeOperand<5027, [StencilExportEXT]>; 644bdd1243dSDimitry Andricdefm OutputLinesNV : ExecutionModeOperand<5269, [MeshShadingNV]>; 645bdd1243dSDimitry Andricdefm DerivativeGroupQuadsNV : ExecutionModeOperand<5289, [ComputeDerivativeGroupQuadsNV]>; 646bdd1243dSDimitry Andricdefm DerivativeGroupLinearNV : ExecutionModeOperand<5290, [ComputeDerivativeGroupLinearNV]>; 647bdd1243dSDimitry Andricdefm OutputTrianglesNV : ExecutionModeOperand<5298, [MeshShadingNV]>; 648bdd1243dSDimitry Andric 649bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 650bdd1243dSDimitry Andric// Multiclass used to define StorageClass enum values and at the same time 651bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 652bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 653bdd1243dSDimitry Andric 654bdd1243dSDimitry Andricdef StorageClass : GenericEnum, Operand<i32> { 655bdd1243dSDimitry Andric let FilterClass = "StorageClass"; 656bdd1243dSDimitry Andric let NameField = "Name"; 657bdd1243dSDimitry Andric let ValueField = "Value"; 658bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 659bdd1243dSDimitry Andric} 660bdd1243dSDimitry Andric 661bdd1243dSDimitry Andricclass StorageClass<string name, bits<32> value> { 662bdd1243dSDimitry Andric string Name = name; 663bdd1243dSDimitry Andric bits<32> Value = value; 664bdd1243dSDimitry Andric} 665bdd1243dSDimitry Andric 666bdd1243dSDimitry Andricmulticlass StorageClassOperand<bits<32> value, list<Capability> reqCapabilities> { 667bdd1243dSDimitry Andric def : StorageClass<NAME, value>; 668bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<StorageClassOperand, value, NAME, 0, 0, [], reqCapabilities>; 669bdd1243dSDimitry Andric} 670bdd1243dSDimitry Andric 671bdd1243dSDimitry Andricdefm UniformConstant : StorageClassOperand<0, []>; 672bdd1243dSDimitry Andricdefm Input : StorageClassOperand<1, []>; 673bdd1243dSDimitry Andricdefm Uniform : StorageClassOperand<2, [Shader]>; 674bdd1243dSDimitry Andricdefm Output : StorageClassOperand<3, [Shader]>; 675bdd1243dSDimitry Andricdefm Workgroup : StorageClassOperand<4, []>; 676bdd1243dSDimitry Andricdefm CrossWorkgroup : StorageClassOperand<5, []>; 677bdd1243dSDimitry Andricdefm Private : StorageClassOperand<6, [Shader]>; 678bdd1243dSDimitry Andricdefm Function : StorageClassOperand<7, []>; 679bdd1243dSDimitry Andricdefm Generic : StorageClassOperand<8, [GenericPointer]>; 680bdd1243dSDimitry Andricdefm PushConstant : StorageClassOperand<9, [Shader]>; 681bdd1243dSDimitry Andricdefm AtomicCounter : StorageClassOperand<10, [AtomicStorage]>; 682bdd1243dSDimitry Andricdefm Image : StorageClassOperand<11, []>; 683bdd1243dSDimitry Andricdefm StorageBuffer : StorageClassOperand<12, [Shader]>; 684bdd1243dSDimitry Andricdefm CallableDataNV : StorageClassOperand<5328, [RayTracingNV]>; 685bdd1243dSDimitry Andricdefm IncomingCallableDataNV : StorageClassOperand<5329, [RayTracingNV]>; 686bdd1243dSDimitry Andricdefm RayPayloadNV : StorageClassOperand<5338, [RayTracingNV]>; 687bdd1243dSDimitry Andricdefm HitAttributeNV : StorageClassOperand<5339, [RayTracingNV]>; 688bdd1243dSDimitry Andricdefm IncomingRayPayloadNV : StorageClassOperand<5342, [RayTracingNV]>; 689bdd1243dSDimitry Andricdefm ShaderRecordBufferNV : StorageClassOperand<5343, [RayTracingNV]>; 690bdd1243dSDimitry Andricdefm PhysicalStorageBufferEXT : StorageClassOperand<5349, [PhysicalStorageBufferAddressesEXT]>; 691bdd1243dSDimitry Andric 692bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 693bdd1243dSDimitry Andric// Multiclass used to define Dim enum values and at the same time 694bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 695bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 696bdd1243dSDimitry Andric 697bdd1243dSDimitry Andricdef Dim : GenericEnum, Operand<i32> { 698bdd1243dSDimitry Andric let FilterClass = "Dim"; 699bdd1243dSDimitry Andric let NameField = "Name"; 700bdd1243dSDimitry Andric let ValueField = "Value"; 701bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 702bdd1243dSDimitry Andric} 703bdd1243dSDimitry Andric 704bdd1243dSDimitry Andricclass Dim<string name, bits<32> value> { 705bdd1243dSDimitry Andric string Name = name; 706bdd1243dSDimitry Andric bits<32> Value = value; 707bdd1243dSDimitry Andric} 708bdd1243dSDimitry Andric 709bdd1243dSDimitry Andricmulticlass DimOperand<bits<32> value, string mnemonic, list<Capability> reqCapabilities> { 710bdd1243dSDimitry Andric def NAME : Dim<NAME, value>; 711bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<DimOperand, value, mnemonic, 0, 0, [], reqCapabilities>; 712bdd1243dSDimitry Andric} 713bdd1243dSDimitry Andric 714bdd1243dSDimitry Andricdefm DIM_1D : DimOperand<0, "1D", [Sampled1D, Image1D]>; 715bdd1243dSDimitry Andricdefm DIM_2D : DimOperand<1, "2D", [Shader, Kernel, ImageMSArray]>; 716bdd1243dSDimitry Andricdefm DIM_3D : DimOperand<2, "3D", []>; 717bdd1243dSDimitry Andricdefm DIM_Cube : DimOperand<3, "Cube", [Shader, ImageCubeArray]>; 718bdd1243dSDimitry Andricdefm DIM_Rect : DimOperand<4, "Rect", [SampledRect, ImageRect]>; 719bdd1243dSDimitry Andricdefm DIM_Buffer : DimOperand<5, "Buffer", [SampledBuffer, ImageBuffer]>; 720bdd1243dSDimitry Andricdefm DIM_SubpassData : DimOperand<6, "SubpassData", [InputAttachment]>; 721bdd1243dSDimitry Andric 722bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 723bdd1243dSDimitry Andric// Multiclass used to define SamplerAddressingMode enum values and at the same 724bdd1243dSDimitry Andric// time SymbolicOperand entries with string mnemonics and capabilities. 725bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 726bdd1243dSDimitry Andric 727bdd1243dSDimitry Andricdef SamplerAddressingMode : GenericEnum, Operand<i32> { 728bdd1243dSDimitry Andric let FilterClass = "SamplerAddressingMode"; 729bdd1243dSDimitry Andric let NameField = "Name"; 730bdd1243dSDimitry Andric let ValueField = "Value"; 731bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 732bdd1243dSDimitry Andric} 733bdd1243dSDimitry Andric 734bdd1243dSDimitry Andricclass SamplerAddressingMode<string name, bits<32> value> { 735bdd1243dSDimitry Andric string Name = name; 736bdd1243dSDimitry Andric bits<32> Value = value; 737bdd1243dSDimitry Andric} 738bdd1243dSDimitry Andric 739bdd1243dSDimitry Andricmulticlass SamplerAddressingModeOperand<bits<32> value, list<Capability> reqCapabilities> { 740bdd1243dSDimitry Andric def : SamplerAddressingMode<NAME, value>; 741bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<SamplerAddressingModeOperand, value, NAME, 0, 0, [], reqCapabilities>; 742bdd1243dSDimitry Andric} 743bdd1243dSDimitry Andric 744bdd1243dSDimitry Andricdefm None : SamplerAddressingModeOperand<0, [Kernel]>; 745bdd1243dSDimitry Andricdefm ClampToEdge : SamplerAddressingModeOperand<1, [Kernel]>; 746bdd1243dSDimitry Andricdefm Clamp : SamplerAddressingModeOperand<2, [Kernel]>; 747bdd1243dSDimitry Andricdefm Repeat : SamplerAddressingModeOperand<3, [Kernel]>; 748bdd1243dSDimitry Andricdefm RepeatMirrored : SamplerAddressingModeOperand<4, [Kernel]>; 749bdd1243dSDimitry Andric 750bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 751bdd1243dSDimitry Andric// Multiclass used to define SamplerFilterMode enum values and at the same 752bdd1243dSDimitry Andric// time SymbolicOperand entries with string mnemonics and capabilities. 753bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 754bdd1243dSDimitry Andric 755bdd1243dSDimitry Andricdef SamplerFilterMode : GenericEnum, Operand<i32> { 756bdd1243dSDimitry Andric let FilterClass = "SamplerFilterMode"; 757bdd1243dSDimitry Andric let NameField = "Name"; 758bdd1243dSDimitry Andric let ValueField = "Value"; 759bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 760bdd1243dSDimitry Andric} 761bdd1243dSDimitry Andric 762bdd1243dSDimitry Andricclass SamplerFilterMode<string name, bits<32> value> { 763bdd1243dSDimitry Andric string Name = name; 764bdd1243dSDimitry Andric bits<32> Value = value; 765bdd1243dSDimitry Andric} 766bdd1243dSDimitry Andric 767bdd1243dSDimitry Andricmulticlass SamplerFilterModeOperand<bits<32> value, list<Capability> reqCapabilities> { 768bdd1243dSDimitry Andric def : SamplerFilterMode<NAME, value>; 769bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<SamplerFilterModeOperand, value, NAME, 0, 0, [], reqCapabilities>; 770bdd1243dSDimitry Andric} 771bdd1243dSDimitry Andric 772bdd1243dSDimitry Andricdefm Nearest : SamplerFilterModeOperand<0, [Kernel]>; 773bdd1243dSDimitry Andricdefm Linear : SamplerFilterModeOperand<1, [Kernel]>; 774bdd1243dSDimitry Andric 775bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 776bdd1243dSDimitry Andric// Multiclass used to define ImageFormat enum values and at the same time 777bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 778bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 779bdd1243dSDimitry Andric 780bdd1243dSDimitry Andricdef ImageFormat : GenericEnum, Operand<i32> { 781bdd1243dSDimitry Andric let FilterClass = "ImageFormat"; 782bdd1243dSDimitry Andric let NameField = "Name"; 783bdd1243dSDimitry Andric let ValueField = "Value"; 784bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 785bdd1243dSDimitry Andric} 786bdd1243dSDimitry Andric 787bdd1243dSDimitry Andricclass ImageFormat<string name, bits<32> value> { 788bdd1243dSDimitry Andric string Name = name; 789bdd1243dSDimitry Andric bits<32> Value = value; 790bdd1243dSDimitry Andric} 791bdd1243dSDimitry Andric 792bdd1243dSDimitry Andricmulticlass ImageFormatOperand<bits<32> value, list<Capability> reqCapabilities> { 793bdd1243dSDimitry Andric def NAME : ImageFormat<NAME, value>; 794bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<ImageFormatOperand, value, NAME, 0, 0, [], reqCapabilities>; 795bdd1243dSDimitry Andric} 796bdd1243dSDimitry Andric 797bdd1243dSDimitry Andricdefm Unknown : ImageFormatOperand<0, []>; 798bdd1243dSDimitry Andricdefm Rgba32f : ImageFormatOperand<1, [Shader]>; 799bdd1243dSDimitry Andricdefm Rgba16f : ImageFormatOperand<2, [Shader]>; 800bdd1243dSDimitry Andricdefm R32f : ImageFormatOperand<3, [Shader]>; 801bdd1243dSDimitry Andricdefm Rgba8 : ImageFormatOperand<4, [Shader]>; 802bdd1243dSDimitry Andricdefm Rgba8Snorm : ImageFormatOperand<5, [Shader]>; 803bdd1243dSDimitry Andricdefm Rg32f : ImageFormatOperand<6, [StorageImageExtendedFormats]>; 804bdd1243dSDimitry Andricdefm Rg16f : ImageFormatOperand<7, [StorageImageExtendedFormats]>; 805bdd1243dSDimitry Andricdefm R11fG11fB10f : ImageFormatOperand<8, [StorageImageExtendedFormats]>; 806bdd1243dSDimitry Andricdefm R16f : ImageFormatOperand<9, [StorageImageExtendedFormats]>; 807bdd1243dSDimitry Andricdefm Rgba16 : ImageFormatOperand<10, [StorageImageExtendedFormats]>; 808bdd1243dSDimitry Andricdefm Rgb10A2 : ImageFormatOperand<11, [StorageImageExtendedFormats]>; 809bdd1243dSDimitry Andricdefm Rg16 : ImageFormatOperand<12, [StorageImageExtendedFormats]>; 810bdd1243dSDimitry Andricdefm Rg8 : ImageFormatOperand<13, [StorageImageExtendedFormats]>; 811bdd1243dSDimitry Andricdefm R16 : ImageFormatOperand<14, [StorageImageExtendedFormats]>; 812bdd1243dSDimitry Andricdefm R8 : ImageFormatOperand<15, [StorageImageExtendedFormats]>; 813bdd1243dSDimitry Andricdefm Rgba16Snorm : ImageFormatOperand<16, [StorageImageExtendedFormats]>; 814bdd1243dSDimitry Andricdefm Rg16Snorm : ImageFormatOperand<17, [StorageImageExtendedFormats]>; 815bdd1243dSDimitry Andricdefm Rg8Snorm : ImageFormatOperand<18, [StorageImageExtendedFormats]>; 816bdd1243dSDimitry Andricdefm R16Snorm : ImageFormatOperand<19, [StorageImageExtendedFormats]>; 817bdd1243dSDimitry Andricdefm R8Snorm : ImageFormatOperand<20, [StorageImageExtendedFormats]>; 818bdd1243dSDimitry Andricdefm Rgba32i : ImageFormatOperand<21, [Shader]>; 819bdd1243dSDimitry Andricdefm Rgba16i : ImageFormatOperand<22, [Shader]>; 820bdd1243dSDimitry Andricdefm Rgba8i : ImageFormatOperand<23, [Shader]>; 821bdd1243dSDimitry Andricdefm R32i : ImageFormatOperand<24, [Shader]>; 822bdd1243dSDimitry Andricdefm Rg32i : ImageFormatOperand<25, [StorageImageExtendedFormats]>; 823bdd1243dSDimitry Andricdefm Rg16i : ImageFormatOperand<26, [StorageImageExtendedFormats]>; 824bdd1243dSDimitry Andricdefm Rg8i : ImageFormatOperand<27, [StorageImageExtendedFormats]>; 825bdd1243dSDimitry Andricdefm R16i : ImageFormatOperand<28, [StorageImageExtendedFormats]>; 826bdd1243dSDimitry Andricdefm R8i : ImageFormatOperand<29, [StorageImageExtendedFormats]>; 827bdd1243dSDimitry Andricdefm Rgba32ui : ImageFormatOperand<30, [Shader]>; 828bdd1243dSDimitry Andricdefm Rgba16ui : ImageFormatOperand<31, [Shader]>; 829bdd1243dSDimitry Andricdefm Rgba8ui : ImageFormatOperand<32, [Shader]>; 830bdd1243dSDimitry Andricdefm R32ui : ImageFormatOperand<33, [Shader]>; 831bdd1243dSDimitry Andricdefm Rgb10a2ui : ImageFormatOperand<34, [StorageImageExtendedFormats]>; 832bdd1243dSDimitry Andricdefm Rg32ui : ImageFormatOperand<35, [StorageImageExtendedFormats]>; 833bdd1243dSDimitry Andricdefm Rg16ui : ImageFormatOperand<36, [StorageImageExtendedFormats]>; 834bdd1243dSDimitry Andricdefm Rg8ui : ImageFormatOperand<37, [StorageImageExtendedFormats]>; 835bdd1243dSDimitry Andricdefm R16ui : ImageFormatOperand<38, [StorageImageExtendedFormats]>; 836bdd1243dSDimitry Andricdefm R8ui : ImageFormatOperand<39, [StorageImageExtendedFormats]>; 837bdd1243dSDimitry Andric 838bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 839bdd1243dSDimitry Andric// Multiclass used to define ImageChannelOrder enum values and at the same time 840bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 841bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 842bdd1243dSDimitry Andric 843bdd1243dSDimitry Andricdef ImageChannelOrder : GenericEnum, Operand<i32> { 844bdd1243dSDimitry Andric let FilterClass = "ImageChannelOrder"; 845bdd1243dSDimitry Andric let NameField = "Name"; 846bdd1243dSDimitry Andric let ValueField = "Value"; 847bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 848bdd1243dSDimitry Andric} 849bdd1243dSDimitry Andric 850bdd1243dSDimitry Andricclass ImageChannelOrder<string name, bits<32> value> { 851bdd1243dSDimitry Andric string Name = name; 852bdd1243dSDimitry Andric bits<32> Value = value; 853bdd1243dSDimitry Andric} 854bdd1243dSDimitry Andric 855bdd1243dSDimitry Andricmulticlass ImageChannelOrderOperand<bits<32> value, list<Capability> reqCapabilities> { 856bdd1243dSDimitry Andric def : ImageChannelOrder<NAME, value>; 857bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<ImageChannelOrderOperand, value, NAME, 0, 0, [], reqCapabilities>; 858bdd1243dSDimitry Andric} 859bdd1243dSDimitry Andric 860bdd1243dSDimitry Andricdefm R : ImageChannelOrderOperand<0, [Kernel]>; 861bdd1243dSDimitry Andricdefm A : ImageChannelOrderOperand<1, [Kernel]>; 862bdd1243dSDimitry Andricdefm RG : ImageChannelOrderOperand<2, [Kernel]>; 863bdd1243dSDimitry Andricdefm RA : ImageChannelOrderOperand<3, [Kernel]>; 864bdd1243dSDimitry Andricdefm RGB : ImageChannelOrderOperand<4, [Kernel]>; 865bdd1243dSDimitry Andricdefm RGBA : ImageChannelOrderOperand<5, [Kernel]>; 866bdd1243dSDimitry Andricdefm BGRA : ImageChannelOrderOperand<6, [Kernel]>; 867bdd1243dSDimitry Andricdefm ARGB : ImageChannelOrderOperand<7, [Kernel]>; 868bdd1243dSDimitry Andricdefm Intensity : ImageChannelOrderOperand<8, [Kernel]>; 869bdd1243dSDimitry Andricdefm Luminance : ImageChannelOrderOperand<9, [Kernel]>; 870bdd1243dSDimitry Andricdefm Rx : ImageChannelOrderOperand<10, [Kernel]>; 871bdd1243dSDimitry Andricdefm RGx : ImageChannelOrderOperand<11, [Kernel]>; 872bdd1243dSDimitry Andricdefm RGBx : ImageChannelOrderOperand<12, [Kernel]>; 873bdd1243dSDimitry Andricdefm Depth : ImageChannelOrderOperand<13, [Kernel]>; 874bdd1243dSDimitry Andricdefm DepthStencil : ImageChannelOrderOperand<14, [Kernel]>; 875bdd1243dSDimitry Andricdefm sRGB : ImageChannelOrderOperand<15, [Kernel]>; 876bdd1243dSDimitry Andricdefm sRGBx : ImageChannelOrderOperand<16, [Kernel]>; 877bdd1243dSDimitry Andricdefm sRGBA : ImageChannelOrderOperand<17, [Kernel]>; 878bdd1243dSDimitry Andricdefm sBGRA : ImageChannelOrderOperand<18, [Kernel]>; 879bdd1243dSDimitry Andricdefm ABGR : ImageChannelOrderOperand<19, [Kernel]>; 880bdd1243dSDimitry Andric 881bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 882bdd1243dSDimitry Andric// Multiclass used to define ImageChannelDataType enum values and at the same 883bdd1243dSDimitry Andric// time SymbolicOperand entries with string mnemonics and capabilities. 884bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 885bdd1243dSDimitry Andric 886bdd1243dSDimitry Andricdef ImageChannelDataType : GenericEnum, Operand<i32> { 887bdd1243dSDimitry Andric let FilterClass = "ImageChannelDataType"; 888bdd1243dSDimitry Andric let NameField = "Name"; 889bdd1243dSDimitry Andric let ValueField = "Value"; 890bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 891bdd1243dSDimitry Andric} 892bdd1243dSDimitry Andric 893bdd1243dSDimitry Andricclass ImageChannelDataType<string name, bits<32> value> { 894bdd1243dSDimitry Andric string Name = name; 895bdd1243dSDimitry Andric bits<32> Value = value; 896bdd1243dSDimitry Andric} 897bdd1243dSDimitry Andric 898bdd1243dSDimitry Andricmulticlass ImageChannelDataTypeOperand<bits<32> value, list<Capability> reqCapabilities> { 899bdd1243dSDimitry Andric def : ImageChannelDataType<NAME, value>; 900bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<ImageChannelDataTypeOperand, value, NAME, 0, 0, [], reqCapabilities>; 901bdd1243dSDimitry Andric} 902bdd1243dSDimitry Andric 903bdd1243dSDimitry Andricdefm SnormInt8 : ImageChannelDataTypeOperand<0, []>; 904bdd1243dSDimitry Andricdefm SnormInt16 : ImageChannelDataTypeOperand<1, []>; 905bdd1243dSDimitry Andricdefm UnormInt8 : ImageChannelDataTypeOperand<2, [Kernel]>; 906bdd1243dSDimitry Andricdefm UnormInt16 : ImageChannelDataTypeOperand<3, [Kernel]>; 907bdd1243dSDimitry Andricdefm UnormShort565 : ImageChannelDataTypeOperand<4, [Kernel]>; 908bdd1243dSDimitry Andricdefm UnormShort555 : ImageChannelDataTypeOperand<5, [Kernel]>; 909bdd1243dSDimitry Andricdefm UnormInt101010 : ImageChannelDataTypeOperand<6, [Kernel]>; 910bdd1243dSDimitry Andricdefm SignedInt8 : ImageChannelDataTypeOperand<7, [Kernel]>; 911bdd1243dSDimitry Andricdefm SignedInt16 : ImageChannelDataTypeOperand<8, [Kernel]>; 912bdd1243dSDimitry Andricdefm SignedInt32 : ImageChannelDataTypeOperand<9, [Kernel]>; 913bdd1243dSDimitry Andricdefm UnsignedInt8 : ImageChannelDataTypeOperand<10, [Kernel]>; 914bdd1243dSDimitry Andricdefm UnsignedInt16 : ImageChannelDataTypeOperand<11, [Kernel]>; 915bdd1243dSDimitry Andricdefm UnsigendInt32 : ImageChannelDataTypeOperand<12, [Kernel]>; 916bdd1243dSDimitry Andricdefm HalfFloat : ImageChannelDataTypeOperand<13, [Kernel]>; 917bdd1243dSDimitry Andricdefm Float : ImageChannelDataTypeOperand<14, [Kernel]>; 918bdd1243dSDimitry Andricdefm UnormInt24 : ImageChannelDataTypeOperand<15, [Kernel]>; 919bdd1243dSDimitry Andricdefm UnormInt101010_2 : ImageChannelDataTypeOperand<16, [Kernel]>; 920bdd1243dSDimitry Andric 921bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 922bdd1243dSDimitry Andric// Multiclass used to define ImageOperand enum values and at the same time 923bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 924bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 925bdd1243dSDimitry Andric 926bdd1243dSDimitry Andricdef ImageOperand : GenericEnum, Operand<i32> { 927bdd1243dSDimitry Andric let FilterClass = "ImageOperand"; 928bdd1243dSDimitry Andric let NameField = "Name"; 929bdd1243dSDimitry Andric let ValueField = "Value"; 930bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 931bdd1243dSDimitry Andric} 932bdd1243dSDimitry Andric 933bdd1243dSDimitry Andricclass ImageOperand<string name, bits<32> value> { 934bdd1243dSDimitry Andric string Name = name; 935bdd1243dSDimitry Andric bits<32> Value = value; 936bdd1243dSDimitry Andric} 937bdd1243dSDimitry Andric 938bdd1243dSDimitry Andricmulticlass ImageOperandOperand<bits<32> value, list<Capability> reqCapabilities> { 939bdd1243dSDimitry Andric def : ImageOperand<NAME, value>; 940bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<ImageOperandOperand, value, NAME, 0, 0, [], reqCapabilities>; 941bdd1243dSDimitry Andric} 942bdd1243dSDimitry Andric 943bdd1243dSDimitry Andricdefm None : ImageOperandOperand<0x0, []>; 944bdd1243dSDimitry Andricdefm Bias : ImageOperandOperand<0x1, [Shader]>; 945bdd1243dSDimitry Andricdefm Lod : ImageOperandOperand<0x2, []>; 946bdd1243dSDimitry Andricdefm Grad : ImageOperandOperand<0x4, []>; 947bdd1243dSDimitry Andricdefm ConstOffset : ImageOperandOperand<0x8, []>; 948bdd1243dSDimitry Andricdefm Offset : ImageOperandOperand<0x10, [ImageGatherExtended]>; 949bdd1243dSDimitry Andricdefm ConstOffsets : ImageOperandOperand<0x20, [ImageGatherExtended]>; 950bdd1243dSDimitry Andricdefm Sample : ImageOperandOperand<0x40, []>; 951bdd1243dSDimitry Andricdefm MinLod : ImageOperandOperand<0x80, [MinLod]>; 952bdd1243dSDimitry Andricdefm MakeTexelAvailableKHR : ImageOperandOperand<0x100, [VulkanMemoryModelKHR]>; 953bdd1243dSDimitry Andricdefm MakeTexelVisibleKHR : ImageOperandOperand<0x200, [VulkanMemoryModelKHR]>; 954bdd1243dSDimitry Andricdefm NonPrivateTexelKHR : ImageOperandOperand<0x400, [VulkanMemoryModelKHR]>; 955bdd1243dSDimitry Andricdefm VolatileTexelKHR : ImageOperandOperand<0x800, [VulkanMemoryModelKHR]>; 956bdd1243dSDimitry Andricdefm SignExtend : ImageOperandOperand<0x1000, []>; 957bdd1243dSDimitry Andricdefm ZeroExtend : ImageOperandOperand<0x2000, []>; 958bdd1243dSDimitry Andric 959bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 960bdd1243dSDimitry Andric// Multiclass used to define FPFastMathMode enum values and at the same time 961bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 962bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 963bdd1243dSDimitry Andric 964bdd1243dSDimitry Andricdef FPFastMathMode : GenericEnum, Operand<i32> { 965bdd1243dSDimitry Andric let FilterClass = "FPFastMathMode"; 966bdd1243dSDimitry Andric let NameField = "Name"; 967bdd1243dSDimitry Andric let ValueField = "Value"; 968bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 969bdd1243dSDimitry Andric} 970bdd1243dSDimitry Andric 971bdd1243dSDimitry Andricclass FPFastMathMode<string name, bits<32> value> { 972bdd1243dSDimitry Andric string Name = name; 973bdd1243dSDimitry Andric bits<32> Value = value; 974bdd1243dSDimitry Andric} 975bdd1243dSDimitry Andric 976bdd1243dSDimitry Andricmulticlass FPFastMathModeOperand<bits<32> value, list<Capability> reqCapabilities> { 977bdd1243dSDimitry Andric def : FPFastMathMode<NAME, value>; 978bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<FPFastMathModeOperand, value, NAME, 0, 0, [], reqCapabilities>; 979bdd1243dSDimitry Andric} 980bdd1243dSDimitry Andric 981bdd1243dSDimitry Andricdefm None : FPFastMathModeOperand<0x0, []>; 982bdd1243dSDimitry Andricdefm NotNaN : FPFastMathModeOperand<0x1, [Kernel]>; 983bdd1243dSDimitry Andricdefm NotInf : FPFastMathModeOperand<0x2, [Kernel]>; 984bdd1243dSDimitry Andricdefm NSZ : FPFastMathModeOperand<0x4, [Kernel]>; 985bdd1243dSDimitry Andricdefm AllowRecip : FPFastMathModeOperand<0x8, [Kernel]>; 986bdd1243dSDimitry Andricdefm Fast : FPFastMathModeOperand<0x10, [Kernel]>; 987bdd1243dSDimitry Andric 988bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 989bdd1243dSDimitry Andric// Multiclass used to define FPRoundingMode enum values and at the same time 990bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics. 991bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 992bdd1243dSDimitry Andric 993bdd1243dSDimitry Andricdef FPRoundingMode : GenericEnum, Operand<i32> { 994bdd1243dSDimitry Andric let FilterClass = "FPRoundingMode"; 995bdd1243dSDimitry Andric let NameField = "Name"; 996bdd1243dSDimitry Andric let ValueField = "Value"; 997bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 998bdd1243dSDimitry Andric} 999bdd1243dSDimitry Andric 1000bdd1243dSDimitry Andricclass FPRoundingMode<string name, bits<32> value> { 1001bdd1243dSDimitry Andric string Name = name; 1002bdd1243dSDimitry Andric bits<32> Value = value; 1003bdd1243dSDimitry Andric} 1004bdd1243dSDimitry Andric 1005bdd1243dSDimitry Andricmulticlass FPRoundingModeOperand<bits<32> value> { 1006bdd1243dSDimitry Andric def NAME : FPRoundingMode<NAME, value>; 1007bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<FPRoundingModeOperand, value, NAME, 0, 0, [], []>; 1008bdd1243dSDimitry Andric} 1009bdd1243dSDimitry Andric 1010bdd1243dSDimitry Andricdefm RTE : FPRoundingModeOperand<0>; 1011bdd1243dSDimitry Andricdefm RTZ : FPRoundingModeOperand<1>; 1012bdd1243dSDimitry Andricdefm RTP : FPRoundingModeOperand<2>; 1013bdd1243dSDimitry Andricdefm RTN : FPRoundingModeOperand<3>; 1014bdd1243dSDimitry Andric 1015bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1016bdd1243dSDimitry Andric// Multiclass used to define LinkageType enum values and at the same time 1017bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 1018bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1019bdd1243dSDimitry Andric 1020bdd1243dSDimitry Andricdef LinkageType : GenericEnum, Operand<i32> { 1021bdd1243dSDimitry Andric let FilterClass = "LinkageType"; 1022bdd1243dSDimitry Andric let NameField = "Name"; 1023bdd1243dSDimitry Andric let ValueField = "Value"; 1024bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1025bdd1243dSDimitry Andric} 1026bdd1243dSDimitry Andric 1027bdd1243dSDimitry Andricclass LinkageType<string name, bits<32> value> { 1028bdd1243dSDimitry Andric string Name = name; 1029bdd1243dSDimitry Andric bits<32> Value = value; 1030bdd1243dSDimitry Andric} 1031bdd1243dSDimitry Andric 1032bdd1243dSDimitry Andricmulticlass LinkageTypeOperand<bits<32> value, list<Capability> reqCapabilities> { 1033bdd1243dSDimitry Andric def : LinkageType<NAME, value>; 1034bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<LinkageTypeOperand, value, NAME, 0, 0, [], reqCapabilities>; 1035bdd1243dSDimitry Andric} 1036bdd1243dSDimitry Andric 1037bdd1243dSDimitry Andricdefm Export : LinkageTypeOperand<0, [Linkage]>; 1038bdd1243dSDimitry Andricdefm Import : LinkageTypeOperand<1, [Linkage]>; 1039bdd1243dSDimitry Andric 1040bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1041bdd1243dSDimitry Andric// Multiclass used to define AccessQualifier enum values and at the same time 1042bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 1043bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1044bdd1243dSDimitry Andric 1045bdd1243dSDimitry Andricdef AccessQualifier : GenericEnum, Operand<i32> { 1046bdd1243dSDimitry Andric let FilterClass = "AccessQualifier"; 1047bdd1243dSDimitry Andric let NameField = "Name"; 1048bdd1243dSDimitry Andric let ValueField = "Value"; 1049bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1050bdd1243dSDimitry Andric} 1051bdd1243dSDimitry Andric 1052bdd1243dSDimitry Andricclass AccessQualifier<string name, bits<32> value> { 1053bdd1243dSDimitry Andric string Name = name; 1054bdd1243dSDimitry Andric bits<32> Value = value; 1055bdd1243dSDimitry Andric} 1056bdd1243dSDimitry Andric 1057bdd1243dSDimitry Andricmulticlass AccessQualifierOperand<bits<32> value, list<Capability> reqCapabilities> { 1058bdd1243dSDimitry Andric def NAME : AccessQualifier<NAME, value>; 1059bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<AccessQualifierOperand, value, NAME, 0, 0, [], reqCapabilities>; 1060bdd1243dSDimitry Andric} 1061bdd1243dSDimitry Andric 1062bdd1243dSDimitry Andricdefm ReadOnly : AccessQualifierOperand<0, [Kernel]>; 1063bdd1243dSDimitry Andricdefm WriteOnly : AccessQualifierOperand<1, [Kernel]>; 1064bdd1243dSDimitry Andricdefm ReadWrite : AccessQualifierOperand<2, [Kernel]>; 1065bdd1243dSDimitry Andric 1066bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1067bdd1243dSDimitry Andric// Multiclass used to define FunctionParameterAttribute enum values and at the 1068bdd1243dSDimitry Andric// same time SymbolicOperand entries with string mnemonics and capabilities. 1069bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1070bdd1243dSDimitry Andric 1071bdd1243dSDimitry Andricdef FunctionParameterAttribute : GenericEnum, Operand<i32> { 1072bdd1243dSDimitry Andric let FilterClass = "FunctionParameterAttribute"; 1073bdd1243dSDimitry Andric let NameField = "Name"; 1074bdd1243dSDimitry Andric let ValueField = "Value"; 1075bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1076bdd1243dSDimitry Andric} 1077bdd1243dSDimitry Andric 1078bdd1243dSDimitry Andricclass FunctionParameterAttribute<string name, bits<32> value> { 1079bdd1243dSDimitry Andric string Name = name; 1080bdd1243dSDimitry Andric bits<32> Value = value; 1081bdd1243dSDimitry Andric} 1082bdd1243dSDimitry Andric 1083bdd1243dSDimitry Andricmulticlass FunctionParameterAttributeOperand<bits<32> value, list<Capability> reqCapabilities> { 1084bdd1243dSDimitry Andric def : FunctionParameterAttribute<NAME, value>; 1085bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<FunctionParameterAttributeOperand, value, NAME, 0, 0, [], reqCapabilities>; 1086bdd1243dSDimitry Andric} 1087bdd1243dSDimitry Andric 1088bdd1243dSDimitry Andricdefm Zext : FunctionParameterAttributeOperand<0, [Kernel]>; 1089bdd1243dSDimitry Andricdefm Sext : FunctionParameterAttributeOperand<1, [Kernel]>; 1090bdd1243dSDimitry Andricdefm ByVal : FunctionParameterAttributeOperand<2, [Kernel]>; 1091bdd1243dSDimitry Andricdefm Sret : FunctionParameterAttributeOperand<3, [Kernel]>; 1092bdd1243dSDimitry Andricdefm NoAlias : FunctionParameterAttributeOperand<4, [Kernel]>; 1093bdd1243dSDimitry Andricdefm NoCapture : FunctionParameterAttributeOperand<5, [Kernel]>; 1094bdd1243dSDimitry Andricdefm NoWrite : FunctionParameterAttributeOperand<6, [Kernel]>; 1095bdd1243dSDimitry Andricdefm NoReadWrite : FunctionParameterAttributeOperand<7, [Kernel]>; 1096bdd1243dSDimitry Andric 1097bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1098bdd1243dSDimitry Andric// Multiclass used to define Decoration enum values and at the same time 1099bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions and 1100bdd1243dSDimitry Andric// capabilities. 1101bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1102bdd1243dSDimitry Andric 1103bdd1243dSDimitry Andricdef Decoration : GenericEnum, Operand<i32> { 1104bdd1243dSDimitry Andric let FilterClass = "Decoration"; 1105bdd1243dSDimitry Andric let NameField = "Name"; 1106bdd1243dSDimitry Andric let ValueField = "Value"; 1107bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1108bdd1243dSDimitry Andric} 1109bdd1243dSDimitry Andric 1110bdd1243dSDimitry Andricclass Decoration<string name, bits<32> value> { 1111bdd1243dSDimitry Andric string Name = name; 1112bdd1243dSDimitry Andric bits<32> Value = value; 1113bdd1243dSDimitry Andric} 1114bdd1243dSDimitry Andric 1115bdd1243dSDimitry Andricmulticlass DecorationOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 1116bdd1243dSDimitry Andric def : Decoration<NAME, value>; 1117bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<DecorationOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 1118bdd1243dSDimitry Andric} 1119bdd1243dSDimitry Andric 1120bdd1243dSDimitry Andricdefm RelaxedPrecision : DecorationOperand<0, 0, 0, [], [Shader]>; 1121bdd1243dSDimitry Andricdefm SpecId : DecorationOperand<1, 0, 0, [], [Shader, Kernel]>; 1122bdd1243dSDimitry Andricdefm Block : DecorationOperand<2, 0, 0, [], [Shader]>; 1123bdd1243dSDimitry Andricdefm BufferBlock : DecorationOperand<3, 0, 0, [], [Shader]>; 1124bdd1243dSDimitry Andricdefm RowMajor : DecorationOperand<4, 0, 0, [], [Matrix]>; 1125bdd1243dSDimitry Andricdefm ColMajor : DecorationOperand<5, 0, 0, [], [Matrix]>; 1126bdd1243dSDimitry Andricdefm ArrayStride : DecorationOperand<6, 0, 0, [], [Shader]>; 1127bdd1243dSDimitry Andricdefm MatrixStride : DecorationOperand<7, 0, 0, [], [Matrix]>; 1128bdd1243dSDimitry Andricdefm GLSLShared : DecorationOperand<8, 0, 0, [], [Shader]>; 1129bdd1243dSDimitry Andricdefm GLSLPacked : DecorationOperand<9, 0, 0, [], [Shader]>; 1130bdd1243dSDimitry Andricdefm CPacked : DecorationOperand<10, 0, 0, [], [Kernel]>; 1131bdd1243dSDimitry Andricdefm BuiltIn : DecorationOperand<11, 0, 0, [], []>; 1132bdd1243dSDimitry Andricdefm NoPerspective : DecorationOperand<13, 0, 0, [], [Shader]>; 1133bdd1243dSDimitry Andricdefm Flat : DecorationOperand<14, 0, 0, [], [Shader]>; 1134bdd1243dSDimitry Andricdefm Patch : DecorationOperand<15, 0, 0, [], [Tessellation]>; 1135bdd1243dSDimitry Andricdefm Centroid : DecorationOperand<16, 0, 0, [], [Shader]>; 1136bdd1243dSDimitry Andricdefm Sample : DecorationOperand<17, 0, 0, [], [SampleRateShading]>; 1137bdd1243dSDimitry Andricdefm Invariant : DecorationOperand<18, 0, 0, [], [Shader]>; 1138bdd1243dSDimitry Andricdefm Restrict : DecorationOperand<19, 0, 0, [], []>; 1139bdd1243dSDimitry Andricdefm Aliased : DecorationOperand<20, 0, 0, [], []>; 1140bdd1243dSDimitry Andricdefm Volatile : DecorationOperand<21, 0, 0, [], []>; 1141bdd1243dSDimitry Andricdefm Constant : DecorationOperand<22, 0, 0, [], [Kernel]>; 1142bdd1243dSDimitry Andricdefm Coherent : DecorationOperand<23, 0, 0, [], []>; 1143bdd1243dSDimitry Andricdefm NonWritable : DecorationOperand<24, 0, 0, [], []>; 1144bdd1243dSDimitry Andricdefm NonReadable : DecorationOperand<25, 0, 0, [], []>; 1145bdd1243dSDimitry Andricdefm Uniform : DecorationOperand<26, 0, 0, [], [Shader]>; 1146bdd1243dSDimitry Andricdefm UniformId : DecorationOperand<27, 0, 0, [], [Shader]>; 1147bdd1243dSDimitry Andricdefm SaturatedConversion : DecorationOperand<28, 0, 0, [], [Kernel]>; 1148bdd1243dSDimitry Andricdefm Stream : DecorationOperand<29, 0, 0, [], [GeometryStreams]>; 1149bdd1243dSDimitry Andricdefm Location : DecorationOperand<30, 0, 0, [], [Shader]>; 1150bdd1243dSDimitry Andricdefm Component : DecorationOperand<31, 0, 0, [], [Shader]>; 1151bdd1243dSDimitry Andricdefm Index : DecorationOperand<32, 0, 0, [], [Shader]>; 1152bdd1243dSDimitry Andricdefm Binding : DecorationOperand<33, 0, 0, [], [Shader]>; 1153bdd1243dSDimitry Andricdefm DescriptorSet : DecorationOperand<34, 0, 0, [], [Shader]>; 1154bdd1243dSDimitry Andricdefm Offset : DecorationOperand<35, 0, 0, [], [Shader]>; 1155bdd1243dSDimitry Andricdefm XfbBuffer : DecorationOperand<36, 0, 0, [], [TransformFeedback]>; 1156bdd1243dSDimitry Andricdefm XfbStride : DecorationOperand<37, 0, 0, [], [TransformFeedback]>; 1157bdd1243dSDimitry Andricdefm FuncParamAttr : DecorationOperand<38, 0, 0, [], [Kernel]>; 1158bdd1243dSDimitry Andricdefm FPRoundingMode : DecorationOperand<39, 0, 0, [], []>; 1159bdd1243dSDimitry Andricdefm FPFastMathMode : DecorationOperand<40, 0, 0, [], [Kernel]>; 1160bdd1243dSDimitry Andricdefm LinkageAttributes : DecorationOperand<41, 0, 0, [], [Linkage]>; 1161bdd1243dSDimitry Andricdefm NoContraction : DecorationOperand<42, 0, 0, [], [Shader]>; 1162bdd1243dSDimitry Andricdefm InputAttachmentIndex : DecorationOperand<43, 0, 0, [], [InputAttachment]>; 1163bdd1243dSDimitry Andricdefm Alignment : DecorationOperand<44, 0, 0, [], [Kernel]>; 1164bdd1243dSDimitry Andricdefm MaxByteOffset : DecorationOperand<45, 0, 0, [], [Addresses]>; 1165bdd1243dSDimitry Andricdefm AlignmentId : DecorationOperand<46, 0, 0, [], [Kernel]>; 1166bdd1243dSDimitry Andricdefm MaxByteOffsetId : DecorationOperand<47, 0, 0, [], [Addresses]>; 1167bdd1243dSDimitry Andricdefm NoSignedWrap : DecorationOperand<4469, 0x10400, 0, [SPV_KHR_no_integer_wrap_decoration], []>; 1168bdd1243dSDimitry Andricdefm NoUnsignedWrap : DecorationOperand<4470, 0x10400, 0, [SPV_KHR_no_integer_wrap_decoration], []>; 1169bdd1243dSDimitry Andricdefm ExplicitInterpAMD : DecorationOperand<4999, 0, 0, [], []>; 1170bdd1243dSDimitry Andricdefm OverrideCoverageNV : DecorationOperand<5248, 0, 0, [], [SampleMaskOverrideCoverageNV]>; 1171bdd1243dSDimitry Andricdefm PassthroughNV : DecorationOperand<5250, 0, 0, [], [GeometryShaderPassthroughNV]>; 1172bdd1243dSDimitry Andricdefm ViewportRelativeNV : DecorationOperand<5252, 0, 0, [], [ShaderViewportMaskNV]>; 1173bdd1243dSDimitry Andricdefm SecondaryViewportRelativeNV : DecorationOperand<5256, 0, 0, [], [ShaderStereoViewNV]>; 1174bdd1243dSDimitry Andricdefm PerPrimitiveNV : DecorationOperand<5271, 0, 0, [], [MeshShadingNV]>; 1175bdd1243dSDimitry Andricdefm PerViewNV : DecorationOperand<5272, 0, 0, [], [MeshShadingNV]>; 1176bdd1243dSDimitry Andricdefm PerVertexNV : DecorationOperand<5273, 0, 0, [], [FragmentBarycentricNV]>; 1177bdd1243dSDimitry Andricdefm NonUniformEXT : DecorationOperand<5300, 0, 0, [], [ShaderNonUniformEXT]>; 1178bdd1243dSDimitry Andricdefm CountBuffer : DecorationOperand<5634, 0, 0, [], []>; 1179bdd1243dSDimitry Andricdefm UserSemantic : DecorationOperand<5635, 0, 0, [], []>; 1180bdd1243dSDimitry Andricdefm RestrictPointerEXT : DecorationOperand<5355, 0, 0, [], [PhysicalStorageBufferAddressesEXT]>; 1181bdd1243dSDimitry Andricdefm AliasedPointerEXT : DecorationOperand<5356, 0, 0, [], [PhysicalStorageBufferAddressesEXT]>; 1182bdd1243dSDimitry Andric 1183bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1184bdd1243dSDimitry Andric// Multiclass used to define BuiltIn enum values and at the same time 1185bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions and 1186bdd1243dSDimitry Andric// capabilities. 1187bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1188bdd1243dSDimitry Andric 1189bdd1243dSDimitry Andricdef BuiltIn : GenericEnum, Operand<i32> { 1190bdd1243dSDimitry Andric let FilterClass = "BuiltIn"; 1191bdd1243dSDimitry Andric let NameField = "Name"; 1192bdd1243dSDimitry Andric let ValueField = "Value"; 1193bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1194bdd1243dSDimitry Andric} 1195bdd1243dSDimitry Andric 1196bdd1243dSDimitry Andricclass BuiltIn<string name, bits<32> value> { 1197bdd1243dSDimitry Andric string Name = name; 1198bdd1243dSDimitry Andric bits<32> Value = value; 1199bdd1243dSDimitry Andric} 1200bdd1243dSDimitry Andric 1201bdd1243dSDimitry Andricmulticlass BuiltInOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 1202bdd1243dSDimitry Andric def NAME : BuiltIn<NAME, value>; 1203bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<BuiltInOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 1204bdd1243dSDimitry Andric} 1205bdd1243dSDimitry Andric 1206bdd1243dSDimitry Andricdefm Position : BuiltInOperand<0, 0, 0, [], [Shader]>; 1207bdd1243dSDimitry Andricdefm PointSize : BuiltInOperand<1, 0, 0, [], [Shader]>; 1208bdd1243dSDimitry Andricdefm ClipDistanceVariable : BuiltInOperand<3, 0, 0, [], [ClipDistance]>; 1209bdd1243dSDimitry Andricdefm CullDistanceVariable : BuiltInOperand<4, 0, 0, [], [CullDistance]>; 1210bdd1243dSDimitry Andricdefm VertexId : BuiltInOperand<5, 0, 0, [], [Shader]>; 1211bdd1243dSDimitry Andricdefm InstanceId : BuiltInOperand<6, 0, 0, [], [Shader]>; 1212bdd1243dSDimitry Andricdefm PrimitiveId : BuiltInOperand<7, 0, 0, [], [Geometry, Tessellation, RayTracingNV]>; 1213bdd1243dSDimitry Andricdefm InvocationId : BuiltInOperand<8, 0, 0, [], [Geometry, Tessellation]>; 1214bdd1243dSDimitry Andricdefm Layer : BuiltInOperand<9, 0, 0, [], [Geometry]>; 1215bdd1243dSDimitry Andricdefm ViewportIndex : BuiltInOperand<10, 0, 0, [], [MultiViewport]>; 1216bdd1243dSDimitry Andricdefm TessLevelOuter : BuiltInOperand<11, 0, 0, [], [Tessellation]>; 1217bdd1243dSDimitry Andricdefm TessLevelInner : BuiltInOperand<12, 0, 0, [], [Tessellation]>; 1218bdd1243dSDimitry Andricdefm TessCoord : BuiltInOperand<13, 0, 0, [], [Tessellation]>; 1219bdd1243dSDimitry Andricdefm PatchVertices : BuiltInOperand<14, 0, 0, [], [Tessellation]>; 1220bdd1243dSDimitry Andricdefm FragCoord : BuiltInOperand<15, 0, 0, [], [Shader]>; 1221bdd1243dSDimitry Andricdefm PointCoord : BuiltInOperand<16, 0, 0, [], [Shader]>; 1222bdd1243dSDimitry Andricdefm FrontFacing : BuiltInOperand<17, 0, 0, [], [Shader]>; 1223bdd1243dSDimitry Andricdefm SampleId : BuiltInOperand<18, 0, 0, [], [SampleRateShading]>; 1224bdd1243dSDimitry Andricdefm SamplePosition : BuiltInOperand<19, 0, 0, [], [SampleRateShading]>; 1225bdd1243dSDimitry Andricdefm SampleMask : BuiltInOperand<20, 0, 0, [], [Shader]>; 1226bdd1243dSDimitry Andricdefm FragDepth : BuiltInOperand<22, 0, 0, [], [Shader]>; 1227bdd1243dSDimitry Andricdefm HelperInvocation : BuiltInOperand<23, 0, 0, [], [Shader]>; 1228bdd1243dSDimitry Andricdefm NumWorkgroups : BuiltInOperand<24, 0, 0, [], []>; 1229bdd1243dSDimitry Andricdefm WorkgroupSize : BuiltInOperand<25, 0, 0, [], []>; 1230bdd1243dSDimitry Andricdefm WorkgroupId : BuiltInOperand<26, 0, 0, [], []>; 1231bdd1243dSDimitry Andricdefm LocalInvocationId : BuiltInOperand<27, 0, 0, [], []>; 1232bdd1243dSDimitry Andricdefm GlobalInvocationId : BuiltInOperand<28, 0, 0, [], []>; 1233bdd1243dSDimitry Andricdefm LocalInvocationIndex : BuiltInOperand<29, 0, 0, [], []>; 1234bdd1243dSDimitry Andricdefm WorkDim : BuiltInOperand<30, 0, 0, [], [Kernel]>; 1235bdd1243dSDimitry Andricdefm GlobalSize : BuiltInOperand<31, 0, 0, [], [Kernel]>; 1236bdd1243dSDimitry Andricdefm EnqueuedWorkgroupSize : BuiltInOperand<32, 0, 0, [], [Kernel]>; 1237bdd1243dSDimitry Andricdefm GlobalOffset : BuiltInOperand<33, 0, 0, [], [Kernel]>; 1238bdd1243dSDimitry Andricdefm GlobalLinearId : BuiltInOperand<34, 0, 0, [], [Kernel]>; 1239bdd1243dSDimitry Andricdefm SubgroupSize : BuiltInOperand<36, 0, 0, [], [Kernel, GroupNonUniform, SubgroupBallotKHR]>; 1240bdd1243dSDimitry Andricdefm SubgroupMaxSize : BuiltInOperand<37, 0, 0, [], [Kernel]>; 1241bdd1243dSDimitry Andricdefm NumSubgroups : BuiltInOperand<38, 0, 0, [], [Kernel, GroupNonUniform]>; 1242bdd1243dSDimitry Andricdefm NumEnqueuedSubgroups : BuiltInOperand<39, 0, 0, [], [Kernel]>; 1243bdd1243dSDimitry Andricdefm SubgroupId : BuiltInOperand<40, 0, 0, [], [Kernel, GroupNonUniform]>; 1244bdd1243dSDimitry Andricdefm SubgroupLocalInvocationId : BuiltInOperand<41, 0, 0, [], [Kernel, GroupNonUniform, SubgroupBallotKHR]>; 1245bdd1243dSDimitry Andricdefm VertexIndex : BuiltInOperand<42, 0, 0, [], [Shader]>; 1246bdd1243dSDimitry Andricdefm InstanceIndex : BuiltInOperand<43, 0, 0, [], [Shader]>; 1247bdd1243dSDimitry Andricdefm SubgroupEqMask : BuiltInOperand<4416, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>; 1248bdd1243dSDimitry Andricdefm SubgroupGeMask : BuiltInOperand<4417, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>; 1249bdd1243dSDimitry Andricdefm SubgroupGtMask : BuiltInOperand<4418, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>; 1250bdd1243dSDimitry Andricdefm SubgroupLeMask : BuiltInOperand<4419, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>; 1251bdd1243dSDimitry Andricdefm SubgroupLtMask : BuiltInOperand<4420, 0, 0, [], [SubgroupBallotKHR, GroupNonUniformBallot]>; 1252bdd1243dSDimitry Andricdefm BaseVertex : BuiltInOperand<4424, 0, 0, [], [DrawParameters]>; 1253bdd1243dSDimitry Andricdefm BaseInstance : BuiltInOperand<4425, 0, 0, [], [DrawParameters]>; 1254bdd1243dSDimitry Andricdefm DrawIndex : BuiltInOperand<4426, 0, 0, [], [DrawParameters, MeshShadingNV]>; 1255bdd1243dSDimitry Andricdefm DeviceIndex : BuiltInOperand<4438, 0, 0, [], [DeviceGroup]>; 1256bdd1243dSDimitry Andricdefm ViewIndex : BuiltInOperand<4440, 0, 0, [], [MultiView]>; 1257bdd1243dSDimitry Andricdefm BaryCoordNoPerspAMD : BuiltInOperand<4492, 0, 0, [], []>; 1258bdd1243dSDimitry Andricdefm BaryCoordNoPerspCentroidAMD : BuiltInOperand<4493, 0, 0, [], []>; 1259bdd1243dSDimitry Andricdefm BaryCoordNoPerspSampleAMD : BuiltInOperand<4494, 0, 0, [], []>; 1260bdd1243dSDimitry Andricdefm BaryCoordSmoothAMD : BuiltInOperand<4495, 0, 0, [], []>; 1261bdd1243dSDimitry Andricdefm BaryCoordSmoothCentroid : BuiltInOperand<4496, 0, 0, [], []>; 1262bdd1243dSDimitry Andricdefm BaryCoordSmoothSample : BuiltInOperand<4497, 0, 0, [], []>; 1263bdd1243dSDimitry Andricdefm BaryCoordPullModel : BuiltInOperand<4498, 0, 0, [], []>; 1264bdd1243dSDimitry Andricdefm FragStencilRefEXT : BuiltInOperand<5014, 0, 0, [], [StencilExportEXT]>; 1265bdd1243dSDimitry Andricdefm ViewportMaskNV : BuiltInOperand<5253, 0, 0, [], [ShaderViewportMaskNV, MeshShadingNV]>; 1266bdd1243dSDimitry Andricdefm SecondaryPositionNV : BuiltInOperand<5257, 0, 0, [], [ShaderStereoViewNV]>; 1267bdd1243dSDimitry Andricdefm SecondaryViewportMaskNV : BuiltInOperand<5258, 0, 0, [], [ShaderStereoViewNV]>; 1268bdd1243dSDimitry Andricdefm PositionPerViewNV : BuiltInOperand<5261, 0, 0, [], [PerViewAttributesNV, MeshShadingNV]>; 1269bdd1243dSDimitry Andricdefm ViewportMaskPerViewNV : BuiltInOperand<5262, 0, 0, [], [PerViewAttributesNV, MeshShadingNV]>; 1270bdd1243dSDimitry Andricdefm FullyCoveredEXT : BuiltInOperand<5264, 0, 0, [], [FragmentFullyCoveredEXT]>; 1271bdd1243dSDimitry Andricdefm TaskCountNV : BuiltInOperand<5274, 0, 0, [], [MeshShadingNV]>; 1272bdd1243dSDimitry Andricdefm PrimitiveCountNV : BuiltInOperand<5275, 0, 0, [], [MeshShadingNV]>; 1273bdd1243dSDimitry Andricdefm PrimitiveIndicesNV : BuiltInOperand<5276, 0, 0, [], [MeshShadingNV]>; 1274bdd1243dSDimitry Andricdefm ClipDistancePerViewNV : BuiltInOperand<5277, 0, 0, [], [MeshShadingNV]>; 1275bdd1243dSDimitry Andricdefm CullDistancePerViewNV : BuiltInOperand<5278, 0, 0, [], [MeshShadingNV]>; 1276bdd1243dSDimitry Andricdefm LayerPerViewNV : BuiltInOperand<5279, 0, 0, [], [MeshShadingNV]>; 1277bdd1243dSDimitry Andricdefm MeshViewCountNV : BuiltInOperand<5280, 0, 0, [], [MeshShadingNV]>; 1278bdd1243dSDimitry Andricdefm MeshViewIndices : BuiltInOperand<5281, 0, 0, [], [MeshShadingNV]>; 1279bdd1243dSDimitry Andricdefm BaryCoordNV : BuiltInOperand<5286, 0, 0, [], [FragmentBarycentricNV]>; 1280bdd1243dSDimitry Andricdefm BaryCoordNoPerspNV : BuiltInOperand<5287, 0, 0, [], [FragmentBarycentricNV]>; 1281bdd1243dSDimitry Andricdefm FragSizeEXT : BuiltInOperand<5292, 0, 0, [], [FragmentDensityEXT]>; 1282bdd1243dSDimitry Andricdefm FragInvocationCountEXT : BuiltInOperand<5293, 0, 0, [], [FragmentDensityEXT]>; 1283bdd1243dSDimitry Andricdefm LaunchIdNV : BuiltInOperand<5319, 0, 0, [], [RayTracingNV]>; 1284bdd1243dSDimitry Andricdefm LaunchSizeNV : BuiltInOperand<5320, 0, 0, [], [RayTracingNV]>; 1285bdd1243dSDimitry Andricdefm WorldRayOriginNV : BuiltInOperand<5321, 0, 0, [], [RayTracingNV]>; 1286bdd1243dSDimitry Andricdefm WorldRayDirectionNV : BuiltInOperand<5322, 0, 0, [], [RayTracingNV]>; 1287bdd1243dSDimitry Andricdefm ObjectRayOriginNV : BuiltInOperand<5323, 0, 0, [], [RayTracingNV]>; 1288bdd1243dSDimitry Andricdefm ObjectRayDirectionNV : BuiltInOperand<5324, 0, 0, [], [RayTracingNV]>; 1289bdd1243dSDimitry Andricdefm RayTminNV : BuiltInOperand<5325, 0, 0, [], [RayTracingNV]>; 1290bdd1243dSDimitry Andricdefm RayTmaxNV : BuiltInOperand<5326, 0, 0, [], [RayTracingNV]>; 1291bdd1243dSDimitry Andricdefm InstanceCustomIndexNV : BuiltInOperand<5327, 0, 0, [], [RayTracingNV]>; 1292bdd1243dSDimitry Andricdefm ObjectToWorldNV : BuiltInOperand<5330, 0, 0, [], [RayTracingNV]>; 1293bdd1243dSDimitry Andricdefm WorldToObjectNV : BuiltInOperand<5331, 0, 0, [], [RayTracingNV]>; 1294bdd1243dSDimitry Andricdefm HitTNV : BuiltInOperand<5332, 0, 0, [], [RayTracingNV]>; 1295bdd1243dSDimitry Andricdefm HitKindNV : BuiltInOperand<5333, 0, 0, [], [RayTracingNV]>; 1296bdd1243dSDimitry Andricdefm IncomingRayFlagsNV : BuiltInOperand<5351, 0, 0, [], [RayTracingNV]>; 1297bdd1243dSDimitry Andric 1298bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1299bdd1243dSDimitry Andric// Multiclass used to define SelectionControl enum values and at the same time 1300bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics. 1301bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1302bdd1243dSDimitry Andric 1303bdd1243dSDimitry Andricdef SelectionControl : GenericEnum, Operand<i32> { 1304bdd1243dSDimitry Andric let FilterClass = "SelectionControl"; 1305bdd1243dSDimitry Andric let NameField = "Name"; 1306bdd1243dSDimitry Andric let ValueField = "Value"; 1307bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1308bdd1243dSDimitry Andric} 1309bdd1243dSDimitry Andric 1310bdd1243dSDimitry Andricclass SelectionControl<string name, bits<32> value> { 1311bdd1243dSDimitry Andric string Name = name; 1312bdd1243dSDimitry Andric bits<32> Value = value; 1313bdd1243dSDimitry Andric} 1314bdd1243dSDimitry Andric 1315bdd1243dSDimitry Andricmulticlass SelectionControlOperand<bits<32> value> { 1316bdd1243dSDimitry Andric def : SelectionControl<NAME, value>; 1317bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<SelectionControlOperand, value, NAME, 0, 0, [], []>; 1318bdd1243dSDimitry Andric} 1319bdd1243dSDimitry Andric 1320bdd1243dSDimitry Andricdefm None : SelectionControlOperand<0x0>; 1321bdd1243dSDimitry Andricdefm Flatten : SelectionControlOperand<0x1>; 1322bdd1243dSDimitry Andricdefm DontFlatten : SelectionControlOperand<0x2>; 1323bdd1243dSDimitry Andric 1324bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1325bdd1243dSDimitry Andric// Multiclass used to define LoopControl enum values and at the same time 1326bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics. 1327bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1328bdd1243dSDimitry Andric 1329bdd1243dSDimitry Andricdef LoopControl : GenericEnum, Operand<i32> { 1330bdd1243dSDimitry Andric let FilterClass = "LoopControl"; 1331bdd1243dSDimitry Andric let NameField = "Name"; 1332bdd1243dSDimitry Andric let ValueField = "Value"; 1333bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1334bdd1243dSDimitry Andric} 1335bdd1243dSDimitry Andric 1336bdd1243dSDimitry Andricclass LoopControl<string name, bits<32> value> { 1337bdd1243dSDimitry Andric string Name = name; 1338bdd1243dSDimitry Andric bits<32> Value = value; 1339bdd1243dSDimitry Andric} 1340bdd1243dSDimitry Andric 1341bdd1243dSDimitry Andricmulticlass LoopControlOperand<bits<32> value> { 1342bdd1243dSDimitry Andric def : LoopControl<NAME, value>; 1343bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<LoopControlOperand, value, NAME, 0, 0, [], []>; 1344bdd1243dSDimitry Andric} 1345bdd1243dSDimitry Andric 1346bdd1243dSDimitry Andricdefm None : LoopControlOperand<0x0>; 1347bdd1243dSDimitry Andricdefm Unroll : LoopControlOperand<0x1>; 1348bdd1243dSDimitry Andricdefm DontUnroll : LoopControlOperand<0x2>; 1349bdd1243dSDimitry Andricdefm DependencyInfinite : LoopControlOperand<0x4>; 1350bdd1243dSDimitry Andricdefm DependencyLength : LoopControlOperand<0x8>; 1351bdd1243dSDimitry Andricdefm MinIterations : LoopControlOperand<0x10>; 1352bdd1243dSDimitry Andricdefm MaxIterations : LoopControlOperand<0x20>; 1353bdd1243dSDimitry Andricdefm IterationMultiple : LoopControlOperand<0x40>; 1354bdd1243dSDimitry Andricdefm PeelCount : LoopControlOperand<0x80>; 1355bdd1243dSDimitry Andricdefm PartialCount : LoopControlOperand<0x100>; 1356bdd1243dSDimitry Andric 1357bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1358bdd1243dSDimitry Andric// Multiclass used to define FunctionControl enum values and at the same time 1359bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics. 1360bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1361bdd1243dSDimitry Andric 1362bdd1243dSDimitry Andricdef FunctionControl : GenericEnum, Operand<i32> { 1363bdd1243dSDimitry Andric let FilterClass = "FunctionControl"; 1364bdd1243dSDimitry Andric let NameField = "Name"; 1365bdd1243dSDimitry Andric let ValueField = "Value"; 1366bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1367bdd1243dSDimitry Andric} 1368bdd1243dSDimitry Andric 1369bdd1243dSDimitry Andricclass FunctionControl<string name, bits<32> value> { 1370bdd1243dSDimitry Andric string Name = name; 1371bdd1243dSDimitry Andric bits<32> Value = value; 1372bdd1243dSDimitry Andric} 1373bdd1243dSDimitry Andric 1374bdd1243dSDimitry Andricmulticlass FunctionControlOperand<bits<32> value> { 1375bdd1243dSDimitry Andric def : FunctionControl<NAME, value>; 1376bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<FunctionControlOperand, value, NAME, 0, 0, [], []>; 1377bdd1243dSDimitry Andric} 1378bdd1243dSDimitry Andric 1379bdd1243dSDimitry Andricdefm None : FunctionControlOperand<0x0>; 1380bdd1243dSDimitry Andricdefm Inline : FunctionControlOperand<0x1>; 1381bdd1243dSDimitry Andricdefm DontInline : FunctionControlOperand<0x2>; 1382bdd1243dSDimitry Andricdefm Pure : FunctionControlOperand<0x4>; 1383bdd1243dSDimitry Andricdefm Const : FunctionControlOperand<0x8>; 1384bdd1243dSDimitry Andric 1385bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1386bdd1243dSDimitry Andric// Multiclass used to define MemorySemantics enum values and at the same time 1387bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions and 1388bdd1243dSDimitry Andric// capabilities. 1389bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1390bdd1243dSDimitry Andric 1391bdd1243dSDimitry Andricdef MemorySemantics : GenericEnum, Operand<i32> { 1392bdd1243dSDimitry Andric let FilterClass = "MemorySemantics"; 1393bdd1243dSDimitry Andric let NameField = "Name"; 1394bdd1243dSDimitry Andric let ValueField = "Value"; 1395bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1396bdd1243dSDimitry Andric} 1397bdd1243dSDimitry Andric 1398bdd1243dSDimitry Andricclass MemorySemantics<string name, bits<32> value> { 1399bdd1243dSDimitry Andric string Name = name; 1400bdd1243dSDimitry Andric bits<32> Value = value; 1401bdd1243dSDimitry Andric} 1402bdd1243dSDimitry Andric 1403bdd1243dSDimitry Andricmulticlass MemorySemanticsOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 1404bdd1243dSDimitry Andric def : MemorySemantics<NAME, value>; 1405bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<MemorySemanticsOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 1406bdd1243dSDimitry Andric} 1407bdd1243dSDimitry Andric 1408bdd1243dSDimitry Andricdefm None : MemorySemanticsOperand<0x0, 0, 0, [], []>; 1409bdd1243dSDimitry Andricdefm Acquire : MemorySemanticsOperand<0x2, 0, 0, [], []>; 1410bdd1243dSDimitry Andricdefm Release : MemorySemanticsOperand<0x4, 0, 0, [], []>; 1411bdd1243dSDimitry Andricdefm AcquireRelease : MemorySemanticsOperand<0x8, 0, 0, [], []>; 1412bdd1243dSDimitry Andricdefm SequentiallyConsistent : MemorySemanticsOperand<0x10, 0, 0, [], []>; 1413bdd1243dSDimitry Andricdefm UniformMemory : MemorySemanticsOperand<0x40, 0, 0, [], [Shader]>; 1414bdd1243dSDimitry Andricdefm SubgroupMemory : MemorySemanticsOperand<0x80, 0, 0, [], []>; 1415bdd1243dSDimitry Andricdefm WorkgroupMemory : MemorySemanticsOperand<0x100, 0, 0, [], []>; 1416bdd1243dSDimitry Andricdefm CrossWorkgroupMemory : MemorySemanticsOperand<0x200, 0, 0, [], []>; 1417bdd1243dSDimitry Andricdefm AtomicCounterMemory : MemorySemanticsOperand<0x400, 0, 0, [], [AtomicStorage]>; 1418bdd1243dSDimitry Andricdefm ImageMemory : MemorySemanticsOperand<0x800, 0, 0, [], []>; 1419bdd1243dSDimitry Andricdefm OutputMemoryKHR : MemorySemanticsOperand<0x1000, 0, 0, [], [VulkanMemoryModelKHR]>; 1420bdd1243dSDimitry Andricdefm MakeAvailableKHR : MemorySemanticsOperand<0x2000, 0, 0, [], [VulkanMemoryModelKHR]>; 1421bdd1243dSDimitry Andricdefm MakeVisibleKHR : MemorySemanticsOperand<0x4000, 0, 0, [], [VulkanMemoryModelKHR]>; 1422bdd1243dSDimitry Andric 1423bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1424bdd1243dSDimitry Andric// Multiclass used to define MemoryOperand enum values and at the same time 1425bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions and 1426bdd1243dSDimitry Andric// capabilities. 1427bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1428bdd1243dSDimitry Andric 1429bdd1243dSDimitry Andricdef MemoryOperand : GenericEnum, Operand<i32> { 1430bdd1243dSDimitry Andric let FilterClass = "MemoryOperand"; 1431bdd1243dSDimitry Andric let NameField = "Name"; 1432bdd1243dSDimitry Andric let ValueField = "Value"; 1433bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1434bdd1243dSDimitry Andric} 1435bdd1243dSDimitry Andric 1436bdd1243dSDimitry Andricclass MemoryOperand<string name, bits<32> value> { 1437bdd1243dSDimitry Andric string Name = name; 1438bdd1243dSDimitry Andric bits<32> Value = value; 1439bdd1243dSDimitry Andric} 1440bdd1243dSDimitry Andric 1441bdd1243dSDimitry Andricmulticlass MemoryOperandOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 1442bdd1243dSDimitry Andric def : MemoryOperand<NAME, value>; 1443bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<MemoryOperandOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 1444bdd1243dSDimitry Andric} 1445bdd1243dSDimitry Andric 1446bdd1243dSDimitry Andricdefm None : MemoryOperandOperand<0x0, 0, 0, [], []>; 1447bdd1243dSDimitry Andricdefm Volatile : MemoryOperandOperand<0x1, 0, 0, [], []>; 1448bdd1243dSDimitry Andricdefm Aligned : MemoryOperandOperand<0x2, 0, 0, [], []>; 1449bdd1243dSDimitry Andricdefm Nontemporal : MemoryOperandOperand<0x4, 0, 0, [], []>; 1450bdd1243dSDimitry Andricdefm MakePointerAvailableKHR : MemoryOperandOperand<0x8, 0, 0, [], [VulkanMemoryModelKHR]>; 1451bdd1243dSDimitry Andricdefm MakePointerVisibleKHR : MemoryOperandOperand<0x10, 0, 0, [], [VulkanMemoryModelKHR]>; 1452bdd1243dSDimitry Andricdefm NonPrivatePointerKHR : MemoryOperandOperand<0x20, 0, 0, [], [VulkanMemoryModelKHR]>; 1453bdd1243dSDimitry Andric 1454bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1455bdd1243dSDimitry Andric// Multiclass used to define Scope enum values and at the same time 1456bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions and 1457bdd1243dSDimitry Andric// capabilities. 1458bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1459bdd1243dSDimitry Andric 1460bdd1243dSDimitry Andricdef Scope : GenericEnum, Operand<i32> { 1461bdd1243dSDimitry Andric let FilterClass = "Scope"; 1462bdd1243dSDimitry Andric let NameField = "Name"; 1463bdd1243dSDimitry Andric let ValueField = "Value"; 1464bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1465bdd1243dSDimitry Andric} 1466bdd1243dSDimitry Andric 1467bdd1243dSDimitry Andricclass Scope<string name, bits<32> value> { 1468bdd1243dSDimitry Andric string Name = name; 1469bdd1243dSDimitry Andric bits<32> Value = value; 1470bdd1243dSDimitry Andric} 1471bdd1243dSDimitry Andric 1472bdd1243dSDimitry Andricmulticlass ScopeOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 1473bdd1243dSDimitry Andric def : Scope<NAME, value>; 1474bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<ScopeOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 1475bdd1243dSDimitry Andric} 1476bdd1243dSDimitry Andric 1477bdd1243dSDimitry Andricdefm CrossDevice : ScopeOperand<0, 0, 0, [], []>; 1478bdd1243dSDimitry Andricdefm Device : ScopeOperand<1, 0, 0, [], []>; 1479bdd1243dSDimitry Andricdefm Workgroup : ScopeOperand<2, 0, 0, [], []>; 1480bdd1243dSDimitry Andricdefm Subgroup : ScopeOperand<3, 0, 0, [], []>; 1481bdd1243dSDimitry Andricdefm Invocation : ScopeOperand<4, 0, 0, [], []>; 1482bdd1243dSDimitry Andricdefm QueueFamilyKHR : ScopeOperand<5, 0, 0, [], [VulkanMemoryModelKHR]>; 1483bdd1243dSDimitry Andric 1484bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1485bdd1243dSDimitry Andric// Multiclass used to define GroupOperation enum values and at the same time 1486bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions and 1487bdd1243dSDimitry Andric// capabilities. 1488bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1489bdd1243dSDimitry Andric 1490bdd1243dSDimitry Andricdef GroupOperation : GenericEnum, Operand<i32> { 1491bdd1243dSDimitry Andric let FilterClass = "GroupOperation"; 1492bdd1243dSDimitry Andric let NameField = "Name"; 1493bdd1243dSDimitry Andric let ValueField = "Value"; 1494bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1495bdd1243dSDimitry Andric} 1496bdd1243dSDimitry Andric 1497bdd1243dSDimitry Andricclass GroupOperation<string name, bits<32> value> { 1498bdd1243dSDimitry Andric string Name = name; 1499bdd1243dSDimitry Andric bits<32> Value = value; 1500bdd1243dSDimitry Andric} 1501bdd1243dSDimitry Andric 1502bdd1243dSDimitry Andricmulticlass GroupOperationOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 1503bdd1243dSDimitry Andric def NAME : GroupOperation<NAME, value>; 1504bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<GroupOperationOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 1505bdd1243dSDimitry Andric} 1506bdd1243dSDimitry Andric 1507bdd1243dSDimitry Andricdefm Reduce : GroupOperationOperand<0, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>; 1508bdd1243dSDimitry Andricdefm InclusiveScan : GroupOperationOperand<1, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>; 1509bdd1243dSDimitry Andricdefm ExclusiveScan : GroupOperationOperand<2, 0, 0, [], [Kernel, GroupNonUniformArithmetic, GroupNonUniformBallot]>; 1510bdd1243dSDimitry Andricdefm ClusteredReduce : GroupOperationOperand<3, 0, 0, [], [GroupNonUniformClustered]>; 1511bdd1243dSDimitry Andricdefm PartitionedReduceNV : GroupOperationOperand<6, 0, 0, [], [GroupNonUniformPartitionedNV]>; 1512bdd1243dSDimitry Andricdefm PartitionedInclusiveScanNV : GroupOperationOperand<7, 0, 0, [], [GroupNonUniformPartitionedNV]>; 1513bdd1243dSDimitry Andricdefm PartitionedExclusiveScanNV : GroupOperationOperand<8, 0, 0, [], [GroupNonUniformPartitionedNV]>; 1514bdd1243dSDimitry Andric 1515bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1516bdd1243dSDimitry Andric// Multiclass used to define KernelEnqueueFlags enum values and at the same time 1517bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions and 1518bdd1243dSDimitry Andric// capabilities. 1519bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1520bdd1243dSDimitry Andric 1521bdd1243dSDimitry Andricdef KernelEnqueueFlags : GenericEnum, Operand<i32> { 1522bdd1243dSDimitry Andric let FilterClass = "KernelEnqueueFlags"; 1523bdd1243dSDimitry Andric let NameField = "Name"; 1524bdd1243dSDimitry Andric let ValueField = "Value"; 1525bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1526bdd1243dSDimitry Andric} 1527bdd1243dSDimitry Andric 1528bdd1243dSDimitry Andricclass KernelEnqueueFlags<string name, bits<32> value> { 1529bdd1243dSDimitry Andric string Name = name; 1530bdd1243dSDimitry Andric bits<32> Value = value; 1531bdd1243dSDimitry Andric} 1532bdd1243dSDimitry Andric 1533bdd1243dSDimitry Andricmulticlass KernelEnqueueFlagsOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 1534bdd1243dSDimitry Andric def : KernelEnqueueFlags<NAME, value>; 1535bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<KernelEnqueueFlagsOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 1536bdd1243dSDimitry Andric} 1537bdd1243dSDimitry Andric 1538bdd1243dSDimitry Andricdefm NoWait : KernelEnqueueFlagsOperand<0, 0, 0, [], [Kernel]>; 1539bdd1243dSDimitry Andricdefm WaitKernel : KernelEnqueueFlagsOperand<1, 0, 0, [], [Kernel]>; 1540bdd1243dSDimitry Andricdefm WaitWorkGroup : KernelEnqueueFlagsOperand<2, 0, 0, [], [Kernel]>; 1541bdd1243dSDimitry Andric 1542bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1543bdd1243dSDimitry Andric// Multiclass used to define KernelProfilingInfo enum values and at the same time 1544bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics, versioning, extensions and 1545bdd1243dSDimitry Andric// capabilities. 1546bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1547bdd1243dSDimitry Andric 1548bdd1243dSDimitry Andricdef KernelProfilingInfo : GenericEnum, Operand<i32> { 1549bdd1243dSDimitry Andric let FilterClass = "KernelProfilingInfo"; 1550bdd1243dSDimitry Andric let NameField = "Name"; 1551bdd1243dSDimitry Andric let ValueField = "Value"; 1552bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1553bdd1243dSDimitry Andric} 1554bdd1243dSDimitry Andric 1555bdd1243dSDimitry Andricclass KernelProfilingInfo<string name, bits<32> value> { 1556bdd1243dSDimitry Andric string Name = name; 1557bdd1243dSDimitry Andric bits<32> Value = value; 1558bdd1243dSDimitry Andric} 1559bdd1243dSDimitry Andric 1560bdd1243dSDimitry Andricmulticlass KernelProfilingInfoOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> { 1561bdd1243dSDimitry Andric def : KernelProfilingInfo<NAME, value>; 1562bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<KernelProfilingInfoOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>; 1563bdd1243dSDimitry Andric} 1564bdd1243dSDimitry Andric 1565bdd1243dSDimitry Andricdefm None : KernelProfilingInfoOperand<0x0, 0, 0, [], []>; 1566bdd1243dSDimitry Andricdefm CmdExecTime : KernelProfilingInfoOperand<0x1, 0, 0, [], [Kernel]>; 1567bdd1243dSDimitry Andric 1568bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1569bdd1243dSDimitry Andric// Multiclass used to define Opcode enum values and at the same time 1570bdd1243dSDimitry Andric// SymbolicOperand entries with string mnemonics and capabilities. 1571bdd1243dSDimitry Andric//===----------------------------------------------------------------------===// 1572bdd1243dSDimitry Andric 1573bdd1243dSDimitry Andricdef Opcode : GenericEnum, Operand<i32> { 1574bdd1243dSDimitry Andric let FilterClass = "Opcode"; 1575bdd1243dSDimitry Andric let NameField = "Name"; 1576bdd1243dSDimitry Andric let ValueField = "Value"; 1577bdd1243dSDimitry Andric let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>"); 1578bdd1243dSDimitry Andric} 1579bdd1243dSDimitry Andric 1580bdd1243dSDimitry Andricclass Opcode<string name, bits<32> value> { 1581bdd1243dSDimitry Andric string Name = name; 1582bdd1243dSDimitry Andric bits<32> Value = value; 1583bdd1243dSDimitry Andric} 1584bdd1243dSDimitry Andric 1585bdd1243dSDimitry Andricmulticlass OpcodeOperand<bits<32> value> { 1586bdd1243dSDimitry Andric def : Opcode<NAME, value>; 1587bdd1243dSDimitry Andric defm : SymbolicOperandWithRequirements<OpcodeOperand, value, NAME, 0, 0, [], []>; 1588bdd1243dSDimitry Andric} 1589bdd1243dSDimitry Andric// TODO: implement other mnemonics. 1590bdd1243dSDimitry Andricdefm InBoundsPtrAccessChain : OpcodeOperand<70>; 1591bdd1243dSDimitry Andricdefm PtrCastToGeneric : OpcodeOperand<121>; 1592