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