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