-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathSPIRVSymbolicOperands.td
1587 lines (1404 loc) · 77.8 KB
/
SPIRVSymbolicOperands.td
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//===- SPIRVSymbolicOperands.td ----------------------------*- tablegen -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines symbolic/named operands for various SPIR-V instructions.
//
//===----------------------------------------------------------------------===//
include "llvm/TableGen/SearchableTable.td"
//===----------------------------------------------------------------------===//
// Lookup table containing symbolic operands with the following columns:
// - Category (Extension/Capability/BuiltIn/etc.)
// - Value (32-bit representation for binary emission)
// - Mnemonic (String representation for textual emission)
// - MinVersion
// - MaxVersion
//===----------------------------------------------------------------------===//
// Forward-declare classes used in SymbolicOperand
class OperandCategory;
class SymbolicOperand<OperandCategory category, bits<32> value, string mnemonic, bits<32> minVersion, bits<32> maxVersion> {
OperandCategory Category = category;
bits<32> Value = value;
string Mnemonic = mnemonic;
bits<32> MinVersion = minVersion;
bits<32> MaxVersion = maxVersion;
}
def SymbolicOperands : GenericTable {
let FilterClass = "SymbolicOperand";
let Fields = ["Category", "Value", "Mnemonic", "MinVersion", "MaxVersion"];
string TypeOf_Category = "OperandCategory";
let PrimaryKey = ["Category", "Value"];
// Function for looking up symbolic operands based on category and value.
let PrimaryKeyName = "lookupSymbolicOperandByCategoryAndValue";
}
// Function for looking up symbolic operands based on just category.
def lookupSymbolicOperandByCategory : SearchIndex {
let Table = SymbolicOperands;
let Key = ["Category"];
}
// Function for looking up symbolic operands based on category and mnemonic.
def lookupSymbolicOperandByCategoryAndMnemonic : SearchIndex {
let Table = SymbolicOperands;
let Key = ["Category", "Mnemonic"];
}
//===----------------------------------------------------------------------===//
// Lookup table for matching symbolic operands (category + 32-bit value) to
// a SPIR-V extension.
//===----------------------------------------------------------------------===//
// Forward-declare classes used in ExtensionEntry
class Extension;
class ExtensionEntry<OperandCategory category, bits<32> value, Extension reqExtension> {
OperandCategory Category = category;
bits<32> Value = value;
Extension ReqExtension = reqExtension;
}
def ExtensionEntries : GenericTable {
let FilterClass = "ExtensionEntry";
let Fields = ["Category", "Value", "ReqExtension"];
string TypeOf_Category = "OperandCategory";
string TypeOf_ReqExtension = "Extension";
let PrimaryKey = ["Category", "Value"];
// Function for looking up the extension by category + value.
let PrimaryKeyName = "lookupExtensionByCategoryAndValue";
}
// Function to lookup symbolic operands enabled by a given extension.
def lookupSymbolicOperandsEnabledByExtension : SearchIndex {
let Table = ExtensionEntries;
let Key = ["ReqExtension", "Category"];
}
//===----------------------------------------------------------------------===//
// Lookup table for matching symbolic operands (category + 32-bit value) to
// SPIR-V capabilities. If an operand requires more than one capability, there
// will be multiple consecutive entries present in the table.
//===----------------------------------------------------------------------===//
// Forward-declare classes used in ExtensionEntry
class Capability;
class CapabilityEntry<OperandCategory category, bits<32> value, Capability reqCabaility> {
OperandCategory Category = category;
bits<32> Value = value;
Capability ReqCapability = reqCabaility;
}
def CapabilityEntries : GenericTable {
let FilterClass = "CapabilityEntry";
let Fields = ["Category", "Value", "ReqCapability"];
string TypeOf_Category = "OperandCategory";
string TypeOf_ReqCapability = "Capability";
let PrimaryKey = ["Category", "Value"];
// Function for looking up a (the first) capability by category + value. Next
// capabilities should be consecutive.
let PrimaryKeyName = "lookupCapabilityByCategoryAndValue";
}
//===----------------------------------------------------------------------===//
// Multiclass used to define a SymbolicOperand and at the same time declare
// required extension and capabilities.
//===----------------------------------------------------------------------===//
multiclass SymbolicOperandWithRequirements<OperandCategory category, bits<32> value, string mnemonic, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
assert !ge(!size(mnemonic), 1), "No mnemonic/string representation provided for symbolic operand with value " # value;
def : SymbolicOperand<category, value, mnemonic, minVersion, maxVersion>;
assert !le(!size(reqExtensions), 1), "Too many required extensions for a symbolic/named operand: " # mnemonic;
if !eq(!size(reqExtensions), 1) then {
def : ExtensionEntry<category, value, reqExtensions[0]>;
}
foreach capability = reqCapabilities in {
def : CapabilityEntry<category, value, capability>;
}
}
//===----------------------------------------------------------------------===//
// Enum defining different categories of symbolic/named operands.
//===----------------------------------------------------------------------===//
def OperandCategory : GenericEnum {
let FilterClass = "OperandCategory";
}
class OperandCategory;
def ExtensionOperand : OperandCategory;
def CapabilityOperand : OperandCategory;
def SourceLanguageOperand : OperandCategory;
def AddressingModelOperand : OperandCategory;
def ExecutionModelOperand : OperandCategory;
def MemoryModelOperand : OperandCategory;
def ExecutionModeOperand : OperandCategory;
def StorageClassOperand : OperandCategory;
def DimOperand : OperandCategory;
def SamplerAddressingModeOperand : OperandCategory;
def SamplerFilterModeOperand : OperandCategory;
def ImageFormatOperand : OperandCategory;
def ImageChannelOrderOperand : OperandCategory;
def ImageChannelDataTypeOperand : OperandCategory;
def ImageOperandOperand : OperandCategory;
def FPFastMathModeOperand : OperandCategory;
def FPRoundingModeOperand : OperandCategory;
def LinkageTypeOperand : OperandCategory;
def AccessQualifierOperand : OperandCategory;
def FunctionParameterAttributeOperand : OperandCategory;
def DecorationOperand : OperandCategory;
def BuiltInOperand : OperandCategory;
def SelectionControlOperand : OperandCategory;
def LoopControlOperand : OperandCategory;
def FunctionControlOperand : OperandCategory;
def MemorySemanticsOperand : OperandCategory;
def MemoryOperandOperand : OperandCategory;
def ScopeOperand : OperandCategory;
def GroupOperationOperand : OperandCategory;
def KernelEnqueueFlagsOperand : OperandCategory;
def KernelProfilingInfoOperand : OperandCategory;
def OpcodeOperand : OperandCategory;
//===----------------------------------------------------------------------===//
// Multiclass used to define Extesions enum values and at the same time
// SymbolicOperand entries.
//===----------------------------------------------------------------------===//
def Extension : GenericEnum, Operand<i32> {
let FilterClass = "Extension";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = "printExtension";
}
class Extension<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass ExtensionOperand<bits<32> value> {
def NAME : Extension<NAME, value>;
defm : SymbolicOperandWithRequirements<ExtensionOperand, value, NAME, 0, 0, [], []>;
}
defm SPV_AMD_shader_explicit_vertex_parameter : ExtensionOperand<1>;
defm SPV_AMD_shader_trinary_minmax_extension : ExtensionOperand<2>;
defm SPV_AMD_gcn_shader : ExtensionOperand<3>;
defm SPV_KHR_shader_ballot : ExtensionOperand<4>;
defm SPV_AMD_shader_ballot : ExtensionOperand<5>;
defm SPV_AMD_gpu_shader_half_float : ExtensionOperand<6>;
defm SPV_KHR_shader_draw_parameters : ExtensionOperand<7>;
defm SPV_KHR_subgroup_vote : ExtensionOperand<8>;
defm SPV_KHR_16bit_storeage : ExtensionOperand<9>;
defm SPV_KHR_device_group : ExtensionOperand<10>;
defm SPV_KHR_multiview : ExtensionOperand<11>;
defm SPV_NVX_multiview_per_view_attributes : ExtensionOperand<12>;
defm SPV_NV_viewport_array2 : ExtensionOperand<13>;
defm SPV_NV_stereo_view_rendering : ExtensionOperand<14>;
defm SPV_NV_sample_mask_override_coverage : ExtensionOperand<15>;
defm SPV_NV_geometry_shader_passthrough : ExtensionOperand<16>;
defm SPV_AMD_texture_gather_bias_lod : ExtensionOperand<17>;
defm SPV_KHR_storage_buffer_storage_class : ExtensionOperand<18>;
defm SPV_KHR_variable_pointers : ExtensionOperand<19>;
defm SPV_AMD_gpu_shader_int16 : ExtensionOperand<20>;
defm SPV_KHR_post_depth_coverage : ExtensionOperand<21>;
defm SPV_KHR_shader_atomic_counter_ops : ExtensionOperand<22>;
defm SPV_EXT_shader_stencil_export : ExtensionOperand<23>;
defm SPV_EXT_shader_viewport_index_layer : ExtensionOperand<24>;
defm SPV_AMD_shader_image_load_store_lod : ExtensionOperand<25>;
defm SPV_AMD_shader_fragment_mask : ExtensionOperand<26>;
defm SPV_EXT_fragment_fully_covered : ExtensionOperand<27>;
defm SPV_AMD_gpu_shader_half_float_fetch : ExtensionOperand<28>;
defm SPV_GOOGLE_decorate_string : ExtensionOperand<29>;
defm SPV_GOOGLE_hlsl_functionality1 : ExtensionOperand<30>;
defm SPV_NV_shader_subgroup_partitioned : ExtensionOperand<31>;
defm SPV_EXT_descriptor_indexing : ExtensionOperand<32>;
defm SPV_KHR_8bit_storage : ExtensionOperand<33>;
defm SPV_KHR_vulkan_memory_model : ExtensionOperand<34>;
defm SPV_NV_ray_tracing : ExtensionOperand<35>;
defm SPV_NV_compute_shader_derivatives : ExtensionOperand<36>;
defm SPV_NV_fragment_shader_barycentric : ExtensionOperand<37>;
defm SPV_NV_mesh_shader : ExtensionOperand<38>;
defm SPV_NV_shader_image_footprint : ExtensionOperand<39>;
defm SPV_NV_shading_rate : ExtensionOperand<40>;
defm SPV_INTEL_subgroups : ExtensionOperand<41>;
defm SPV_INTEL_media_block_io : ExtensionOperand<42>;
defm SPV_EXT_fragment_invocation_density : ExtensionOperand<44>;
defm SPV_KHR_no_integer_wrap_decoration : ExtensionOperand<45>;
defm SPV_KHR_float_controls : ExtensionOperand<46>;
defm SPV_EXT_physical_storage_buffer : ExtensionOperand<47>;
defm SPV_INTEL_fpga_memory_attributes : ExtensionOperand<48>;
defm SPV_NV_cooperative_matrix : ExtensionOperand<49>;
defm SPV_INTEL_shader_integer_functions2 : ExtensionOperand<50>;
defm SPV_INTEL_fpga_loop_controls : ExtensionOperand<51>;
defm SPV_EXT_fragment_shader_interlock : ExtensionOperand<52>;
defm SPV_NV_shader_sm_builtins : ExtensionOperand<53>;
defm SPV_KHR_shader_clock : ExtensionOperand<54>;
defm SPV_INTEL_unstructured_loop_controls : ExtensionOperand<55>;
defm SPV_EXT_demote_to_helper_invocation : ExtensionOperand<56>;
defm SPV_INTEL_fpga_reg : ExtensionOperand<57>;
defm SPV_INTEL_blocking_pipes : ExtensionOperand<58>;
defm SPV_GOOGLE_user_type : ExtensionOperand<59>;
defm SPV_KHR_physical_storage_buffer : ExtensionOperand<60>;
defm SPV_INTEL_kernel_attributes : ExtensionOperand<61>;
defm SPV_KHR_non_semantic_info : ExtensionOperand<62>;
defm SPV_INTEL_io_pipes : ExtensionOperand<63>;
defm SPV_KHR_ray_tracing : ExtensionOperand<64>;
defm SPV_KHR_ray_query : ExtensionOperand<65>;
defm SPV_INTEL_fpga_memory_accesses : ExtensionOperand<66>;
defm SPV_INTEL_arbitrary_precision_integers : ExtensionOperand<67>;
defm SPV_EXT_shader_atomic_float_add : ExtensionOperand<68>;
defm SPV_KHR_terminate_invocation : ExtensionOperand<69>;
defm SPV_KHR_fragment_shading_rate : ExtensionOperand<70>;
defm SPV_EXT_shader_image_int64 : ExtensionOperand<71>;
defm SPV_INTEL_fp_fast_math_mode : ExtensionOperand<72>;
defm SPV_INTEL_fpga_cluster_attributes : ExtensionOperand<73>;
defm SPV_INTEL_loop_fuse : ExtensionOperand<74>;
defm SPV_EXT_shader_atomic_float_min_max : ExtensionOperand<75>;
defm SPV_KHR_workgroup_memory_explicit_layout : ExtensionOperand<76>;
defm SPV_KHR_linkonce_odr : ExtensionOperand<77>;
defm SPV_KHR_expect_assume : ExtensionOperand<78>;
defm SPV_INTEL_fpga_dsp_control : ExtensionOperand<79>;
defm SPV_NV_bindless_texture : ExtensionOperand<80>;
defm SPV_INTEL_fpga_invocation_pipelining_attributes : ExtensionOperand<81>;
defm SPV_KHR_subgroup_uniform_control_flow : ExtensionOperand<82>;
defm SPV_HUAWEI_subpass_shading : ExtensionOperand<83>;
defm SPV_KHR_integer_dot_product : ExtensionOperand<84>;
defm SPV_EXT_shader_atomic_float16_add : ExtensionOperand<85>;
defm SPV_INTEL_runtime_aligned : ExtensionOperand<86>;
defm SPV_KHR_bit_instructions : ExtensionOperand<87>;
defm SPV_NV_ray_tracing_motion_blur : ExtensionOperand<88>;
defm SPV_KHR_uniform_group_instructions : ExtensionOperand<89>;
defm SPV_KHR_subgroup_rotate : ExtensionOperand<90>;
defm SPV_INTEL_split_barrier : ExtensionOperand<91>;
defm SPV_KHR_ray_cull_mask : ExtensionOperand<92>;
defm SPV_KHR_fragment_shader_barycentric : ExtensionOperand<93>;
defm SPV_EXT_relaxed_printf_string_address_space : ExtensionOperand<94>;
defm SPV_EXT_ycbcr_attachments : ExtensionOperand<95>;
defm SPV_EXT_mesh_shader : ExtensionOperand<96>;
defm SPV_ARM_core_builtins : ExtensionOperand<97>;
defm SPV_EXT_opacity_micromap : ExtensionOperand<98>;
defm SPV_NV_shader_invocation_reorder : ExtensionOperand<99>;
defm SPV_INTEL_usm_storage_classes : ExtensionOperand<100>;
defm SPV_INTEL_fpga_latency_control : ExtensionOperand<101>;
defm SPV_INTEL_fpga_argument_interfaces : ExtensionOperand<102>;
//===----------------------------------------------------------------------===//
// Multiclass used to define Capabilities enum values and at the same time
// SymbolicOperand entries with string mnemonics, versioning, extensions, and
// capabilities.
//===----------------------------------------------------------------------===//
def Capability : GenericEnum, Operand<i32> {
let FilterClass = "Capability";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class Capability<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass CapabilityOperand<bits<32> value, bits<32> minVersion, bits<32> maxVersion, list<Extension> reqExtensions, list<Capability> reqCapabilities> {
def NAME : Capability<NAME, value>;
defm : SymbolicOperandWithRequirements<CapabilityOperand, value, NAME, minVersion, maxVersion, reqExtensions, reqCapabilities>;
}
defm Matrix : CapabilityOperand<0, 0, 0, [], []>;
defm Shader : CapabilityOperand<1, 0, 0, [], [Matrix]>;
defm Geometry : CapabilityOperand<2, 0, 0, [], [Shader]>;
defm Tessellation : CapabilityOperand<3, 0, 0, [], [Shader]>;
defm Addresses : CapabilityOperand<4, 0, 0, [], []>;
defm Linkage : CapabilityOperand<5, 0, 0, [], []>;
defm Kernel : CapabilityOperand<6, 0, 0, [], []>;
defm Vector16 : CapabilityOperand<7, 0, 0, [], [Kernel]>;
defm Float16Buffer : CapabilityOperand<8, 0, 0, [], [Kernel]>;
defm Float16 : CapabilityOperand<9, 0, 0, [], []>;
defm Float64 : CapabilityOperand<10, 0, 0, [], []>;
defm Int64 : CapabilityOperand<11, 0, 0, [], []>;
defm Int64Atomics : CapabilityOperand<12, 0, 0, [], [Int64]>;
defm ImageBasic : CapabilityOperand<13, 0, 0, [], [Kernel]>;
defm ImageReadWrite : CapabilityOperand<14, 0, 0, [], [ImageBasic]>;
defm ImageMipmap : CapabilityOperand<15, 0, 0, [], [ImageBasic]>;
defm Pipes : CapabilityOperand<17, 0, 0, [], [Kernel]>;
defm Groups : CapabilityOperand<18, 0, 0, [], []>;
defm DeviceEnqueue : CapabilityOperand<19, 0, 0, [], []>;
defm LiteralSampler : CapabilityOperand<20, 0, 0, [], [Kernel]>;
defm AtomicStorage : CapabilityOperand<21, 0, 0, [], [Shader]>;
defm Int16 : CapabilityOperand<22, 0, 0, [], []>;
defm TessellationPointSize : CapabilityOperand<23, 0, 0, [], [Tessellation]>;
defm GeometryPointSize : CapabilityOperand<24, 0, 0, [], [Geometry]>;
defm ImageGatherExtended : CapabilityOperand<25, 0, 0, [], [Shader]>;
defm StorageImageMultisample : CapabilityOperand<27, 0, 0, [], [Shader]>;
defm UniformBufferArrayDynamicIndexing : CapabilityOperand<28, 0, 0, [], [Shader]>;
defm SampledImageArrayDymnamicIndexing : CapabilityOperand<29, 0, 0, [], [Shader]>;
defm ClipDistance : CapabilityOperand<32, 0, 0, [], [Shader]>;
defm CullDistance : CapabilityOperand<33, 0, 0, [], [Shader]>;
defm SampleRateShading : CapabilityOperand<35, 0, 0, [], [Shader]>;
defm SampledRect : CapabilityOperand<37, 0, 0, [], [Shader]>;
defm ImageRect : CapabilityOperand<36, 0, 0, [], [SampledRect]>;
defm GenericPointer : CapabilityOperand<38, 0, 0, [], [Addresses]>;
defm Int8 : CapabilityOperand<39, 0, 0, [], []>;
defm InputAttachment : CapabilityOperand<40, 0, 0, [], [Shader]>;
defm SparseResidency : CapabilityOperand<41, 0, 0, [], [Shader]>;
defm MinLod : CapabilityOperand<42, 0, 0, [], [Shader]>;
defm Sampled1D : CapabilityOperand<43, 0, 0, [], []>;
defm Image1D : CapabilityOperand<44, 0, 0, [], [Sampled1D]>;
defm SampledCubeArray : CapabilityOperand<45, 0, 0, [], [Shader]>;
defm ImageCubeArray : CapabilityOperand<34, 0, 0, [], [SampledCubeArray]>;
defm SampledBuffer : CapabilityOperand<46, 0, 0, [], []>;
defm ImageBuffer : CapabilityOperand<47, 0, 0, [], [SampledBuffer]>;
defm ImageMSArray : CapabilityOperand<48, 0, 0, [], [Shader]>;
defm StorageImageExtendedFormats : CapabilityOperand<49, 0, 0, [], [Shader]>;
defm ImageQuery : CapabilityOperand<50, 0, 0, [], [Shader]>;
defm DerivativeControl : CapabilityOperand<51, 0, 0, [], [Shader]>;
defm InterpolationFunction : CapabilityOperand<52, 0, 0, [], [Shader]>;
defm TransformFeedback : CapabilityOperand<53, 0, 0, [], [Shader]>;
defm GeometryStreams : CapabilityOperand<54, 0, 0, [], [Geometry]>;
defm StorageImageReadWithoutFormat : CapabilityOperand<55, 0, 0, [], [Shader]>;
defm StorageImageWriteWithoutFormat : CapabilityOperand<56, 0, 0, [], [Shader]>;
defm MultiViewport : CapabilityOperand<57, 0, 0, [], [Geometry]>;
defm SubgroupDispatch : CapabilityOperand<58, 0x10100, 0, [], [DeviceEnqueue]>;
defm NamedBarrier : CapabilityOperand<59, 0x10100, 0, [], [Kernel]>;
defm PipeStorage : CapabilityOperand<60, 0x10100, 0, [], [Pipes]>;
defm GroupNonUniform : CapabilityOperand<61, 0x10300, 0, [], []>;
defm GroupNonUniformVote : CapabilityOperand<62, 0x10300, 0, [], [GroupNonUniform]>;
defm GroupNonUniformArithmetic : CapabilityOperand<63, 0x10300, 0, [], [GroupNonUniform]>;
defm GroupNonUniformBallot : CapabilityOperand<64, 0x10300, 0, [], [GroupNonUniform]>;
defm GroupNonUniformShuffle : CapabilityOperand<65, 0x10300, 0, [], [GroupNonUniform]>;
defm GroupNonUniformShuffleRelative : CapabilityOperand<66, 0x10300, 0, [], [GroupNonUniform]>;
defm GroupNonUniformClustered : CapabilityOperand<67, 0x10300, 0, [], [GroupNonUniform]>;
defm GroupNonUniformQuad : CapabilityOperand<68, 0x10300, 0, [], [GroupNonUniform]>;
defm SubgroupBallotKHR : CapabilityOperand<4423, 0, 0, [SPV_KHR_shader_ballot], []>;
defm DrawParameters : CapabilityOperand<4427, 0x10300, 0, [SPV_KHR_shader_draw_parameters], [Shader]>;
defm SubgroupVoteKHR : CapabilityOperand<4431, 0, 0, [SPV_KHR_subgroup_vote], []>;
defm StorageBuffer16BitAccess : CapabilityOperand<4433, 0x10300, 0, [SPV_KHR_16bit_storeage], []>;
defm StorageUniform16 : CapabilityOperand<4434, 0x10300, 0, [SPV_KHR_16bit_storeage], [StorageBuffer16BitAccess]>;
defm StoragePushConstant16 : CapabilityOperand<4435, 0x10300, 0, [SPV_KHR_16bit_storeage], []>;
defm StorageInputOutput16 : CapabilityOperand<4436, 0x10300, 0, [SPV_KHR_16bit_storeage], []>;
defm DeviceGroup : CapabilityOperand<4437, 0x10300, 0, [SPV_KHR_device_group], []>;
defm MultiView : CapabilityOperand<4439, 0x10300, 0, [SPV_KHR_multiview], [Shader]>;
defm VariablePointersStorageBuffer : CapabilityOperand<4441, 0x10300, 0, [SPV_KHR_variable_pointers], [Shader]>;
defm VariablePointers : CapabilityOperand<4442, 0x10300, 0, [SPV_KHR_variable_pointers], [VariablePointersStorageBuffer]>;
defm AtomicStorageOps : CapabilityOperand<4445, 0, 0, [SPV_KHR_shader_atomic_counter_ops], []>;
defm SampleMaskPostDepthCoverage : CapabilityOperand<4447, 0, 0, [SPV_KHR_post_depth_coverage], []>;
defm StorageBuffer8BitAccess : CapabilityOperand<4448, 0, 0, [SPV_KHR_8bit_storage], []>;
defm UniformAndStorageBuffer8BitAccess : CapabilityOperand<4449, 0, 0, [SPV_KHR_8bit_storage], [StorageBuffer8BitAccess]>;
defm StoragePushConstant8 : CapabilityOperand<4450, 0, 0, [SPV_KHR_8bit_storage], []>;
defm DenormPreserve : CapabilityOperand<4464, 0x10400, 0, [SPV_KHR_float_controls], []>;
defm DenormFlushToZero : CapabilityOperand<4465, 0x10400, 0, [SPV_KHR_float_controls], []>;
defm SignedZeroInfNanPreserve : CapabilityOperand<4466, 0x10400, 0, [SPV_KHR_float_controls], []>;
defm RoundingModeRTE : CapabilityOperand<4467, 0x10400, 0, [SPV_KHR_float_controls], []>;
defm RoundingModeRTZ : CapabilityOperand<4468, 0x10400, 0, [SPV_KHR_float_controls], []>;
defm Float16ImageAMD : CapabilityOperand<5008, 0, 0, [], [Shader]>;
defm ImageGatherBiasLodAMD : CapabilityOperand<5009, 0, 0, [], [Shader]>;
defm FragmentMaskAMD : CapabilityOperand<5010, 0, 0, [], [Shader]>;
defm StencilExportEXT : CapabilityOperand<5013, 0, 0, [], [Shader]>;
defm ImageReadWriteLodAMD : CapabilityOperand<5015, 0, 0, [], [Shader]>;
defm SampleMaskOverrideCoverageNV : CapabilityOperand<5249, 0, 0, [], [SampleRateShading]>;
defm GeometryShaderPassthroughNV : CapabilityOperand<5251, 0, 0, [], [Geometry]>;
defm ShaderViewportIndexLayerEXT : CapabilityOperand<5254, 0, 0, [], [MultiViewport]>;
defm ShaderViewportMaskNV : CapabilityOperand<5255, 0, 0, [], [ShaderViewportIndexLayerEXT]>;
defm ShaderStereoViewNV : CapabilityOperand<5259, 0, 0, [], [ShaderViewportMaskNV]>;
defm PerViewAttributesNV : CapabilityOperand<5260, 0, 0, [], [MultiView]>;
defm FragmentFullyCoveredEXT : CapabilityOperand<5265, 0, 0, [], [Shader]>;
defm MeshShadingNV : CapabilityOperand<5266, 0, 0, [], [Shader]>;
defm ShaderNonUniformEXT : CapabilityOperand<5301, 0, 0, [], [Shader]>;
defm RuntimeDescriptorArrayEXT : CapabilityOperand<5302, 0, 0, [], [Shader]>;
defm InputAttachmentArrayDynamicIndexingEXT : CapabilityOperand<5303, 0, 0, [], [InputAttachment]>;
defm UniformTexelBufferArrayDynamicIndexingEXT : CapabilityOperand<5304, 0, 0, [], [SampledBuffer]>;
defm StorageTexelBufferArrayDynamicIndexingEXT : CapabilityOperand<5305, 0, 0, [], [ImageBuffer]>;
defm UniformBufferArrayNonUniformIndexingEXT : CapabilityOperand<5306, 0, 0, [], [ShaderNonUniformEXT]>;
defm SampledImageArrayNonUniformIndexingEXT : CapabilityOperand<5307, 0, 0, [], [ShaderNonUniformEXT]>;
defm StorageBufferArrayNonUniformIndexingEXT : CapabilityOperand<5308, 0, 0, [], [ShaderNonUniformEXT]>;
defm StorageImageArrayNonUniformIndexingEXT : CapabilityOperand<5309, 0, 0, [], [ShaderNonUniformEXT]>;
defm InputAttachmentArrayNonUniformIndexingEXT : CapabilityOperand<5310, 0, 0, [], [InputAttachment, ShaderNonUniformEXT]>;
defm UniformTexelBufferArrayNonUniformIndexingEXT : CapabilityOperand<5311, 0, 0, [], [SampledBuffer, ShaderNonUniformEXT]>;
defm StorageTexelBufferArrayNonUniformIndexingEXT : CapabilityOperand<5312, 0, 0, [], [ImageBuffer, ShaderNonUniformEXT]>;
defm RayTracingNV : CapabilityOperand<5340, 0, 0, [], [Shader]>;
defm SubgroupShuffleINTEL : CapabilityOperand<5568, 0, 0, [], []>;
defm SubgroupBufferBlockIOINTEL : CapabilityOperand<5569, 0, 0, [], []>;
defm SubgroupImageBlockIOINTEL : CapabilityOperand<5570, 0, 0, [], []>;
defm SubgroupImageMediaBlockIOINTEL : CapabilityOperand<5579, 0, 0, [], []>;
defm SubgroupAvcMotionEstimationINTEL : CapabilityOperand<5696, 0, 0, [], []>;
defm SubgroupAvcMotionEstimationIntraINTEL : CapabilityOperand<5697, 0, 0, [], []>;
defm SubgroupAvcMotionEstimationChromaINTEL : CapabilityOperand<5698, 0, 0, [], []>;
defm GroupNonUniformPartitionedNV : CapabilityOperand<5297, 0, 0, [], []>;
defm VulkanMemoryModelKHR : CapabilityOperand<5345, 0, 0, [], []>;
defm VulkanMemoryModelDeviceScopeKHR : CapabilityOperand<5346, 0, 0, [], []>;
defm ImageFootprintNV : CapabilityOperand<5282, 0, 0, [], []>;
defm FragmentBarycentricNV : CapabilityOperand<5284, 0, 0, [], []>;
defm ComputeDerivativeGroupQuadsNV : CapabilityOperand<5288, 0, 0, [], []>;
defm ComputeDerivativeGroupLinearNV : CapabilityOperand<5350, 0, 0, [], []>;
defm FragmentDensityEXT : CapabilityOperand<5291, 0, 0, [], [Shader]>;
defm PhysicalStorageBufferAddressesEXT : CapabilityOperand<5347, 0, 0, [], [Shader]>;
defm CooperativeMatrixNV : CapabilityOperand<5357, 0, 0, [], [Shader]>;
defm ArbitraryPrecisionIntegersINTEL : CapabilityOperand<5844, 0, 0, [SPV_INTEL_arbitrary_precision_integers], [Int8, Int16]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define SourceLanguage enum values and at the same time
// SymbolicOperand entries.
//===----------------------------------------------------------------------===//
def SourceLanguage : GenericEnum, Operand<i32> {
let FilterClass = "SourceLanguage";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class SourceLanguage<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass SourceLanguageOperand<bits<32> value> {
def : SourceLanguage<NAME, value>;
defm : SymbolicOperandWithRequirements<SourceLanguageOperand, value, NAME, 0, 0, [], []>;
}
defm Unknown : SourceLanguageOperand<0>;
defm ESSL : SourceLanguageOperand<1>;
defm GLSL : SourceLanguageOperand<2>;
defm OpenCL_C : SourceLanguageOperand<3>;
defm OpenCL_CPP : SourceLanguageOperand<4>;
defm HLSL : SourceLanguageOperand<5>;
//===----------------------------------------------------------------------===//
// Multiclass used to define AddressingModel enum values and at the same time
// SymbolicOperand entries with string mnemonics, and capabilities.
//===----------------------------------------------------------------------===//
def AddressingModel : GenericEnum, Operand<i32> {
let FilterClass = "AddressingModel";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class AddressingModel<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass AddressingModelOperand<bits<32> value, list<Capability> reqCapabilities> {
def : AddressingModel<NAME, value>;
defm : SymbolicOperandWithRequirements<AddressingModelOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm Logical : AddressingModelOperand<0, []>;
defm Physical32 : AddressingModelOperand<1, [Addresses]>;
defm Physical64 : AddressingModelOperand<2, [Addresses]>;
defm PhysicalStorageBuffer64EXT : AddressingModelOperand<5348, [PhysicalStorageBufferAddressesEXT]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define ExecutionModel enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def ExecutionModel : GenericEnum, Operand<i32> {
let FilterClass = "ExecutionModel";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class ExecutionModel<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass ExecutionModelOperand<bits<32> value, list<Capability> reqCapabilities> {
def : ExecutionModel<NAME, value>;
defm : SymbolicOperandWithRequirements<ExecutionModelOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm Vertex : ExecutionModelOperand<0, [Shader]>;
defm TessellationControl: ExecutionModelOperand<1, [Tessellation]>;
defm TessellationEvaluation: ExecutionModelOperand<2, [Tessellation]>;
defm Geometry: ExecutionModelOperand<3, [Geometry]>;
defm Fragment: ExecutionModelOperand<4, [Shader]>;
defm GLCompute: ExecutionModelOperand<5, [Shader]>;
defm Kernel: ExecutionModelOperand<6, [Kernel]>;
defm TaskNV: ExecutionModelOperand<5267, [MeshShadingNV]>;
defm MeshNV: ExecutionModelOperand<5268, [MeshShadingNV]>;
defm RayGenerationNV: ExecutionModelOperand<5313, [RayTracingNV]>;
defm IntersectionNV: ExecutionModelOperand<5314, [RayTracingNV]>;
defm AnyHitNV: ExecutionModelOperand<5315, [RayTracingNV]>;
defm ClosestHitNV: ExecutionModelOperand<5316, [RayTracingNV]>;
defm MissNV: ExecutionModelOperand<5317, [RayTracingNV]>;
defm CallableNV: ExecutionModelOperand<5318, [RayTracingNV]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define MemoryModel enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def MemoryModel : GenericEnum, Operand<i32> {
let FilterClass = "MemoryModel";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class MemoryModel<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass MemoryModelOperand<bits<32> value, list<Capability> reqCapabilities> {
def : MemoryModel<NAME, value>;
defm : SymbolicOperandWithRequirements<MemoryModelOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm Simple : MemoryModelOperand<0, [Shader]>;
defm GLSL450 : MemoryModelOperand<1, [Shader]>;
defm OpenCL : MemoryModelOperand<2, [Kernel]>;
defm VulkanKHR : MemoryModelOperand<3, [VulkanMemoryModelKHR]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define ExecutionMode enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def ExecutionMode : GenericEnum, Operand<i32> {
let FilterClass = "ExecutionMode";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class ExecutionMode<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass ExecutionModeOperand<bits<32> value, list<Capability> reqCapabilities> {
def : ExecutionMode<NAME, value>;
defm : SymbolicOperandWithRequirements<ExecutionModeOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm Invocations : ExecutionModeOperand<0, [Geometry]>;
defm SpacingEqual : ExecutionModeOperand<1, [Tessellation]>;
defm SpacingFractionalEven : ExecutionModeOperand<2, [Tessellation]>;
defm SpacingFractionalOdd : ExecutionModeOperand<3, [Tessellation]>;
defm VertexOrderCw : ExecutionModeOperand<4, [Tessellation]>;
defm VertexOrderCcw : ExecutionModeOperand<5, [Tessellation]>;
defm PixelCenterInteger : ExecutionModeOperand<6, [Shader]>;
defm OriginUpperLeft : ExecutionModeOperand<7, [Shader]>;
defm OriginLowerLeft : ExecutionModeOperand<8, [Shader]>;
defm EarlyFragmentTests : ExecutionModeOperand<9, [Shader]>;
defm PointMode : ExecutionModeOperand<10, [Tessellation]>;
defm Xfb : ExecutionModeOperand<11, [TransformFeedback]>;
defm DepthReplacing : ExecutionModeOperand<12, [Shader]>;
defm DepthGreater : ExecutionModeOperand<14, [Shader]>;
defm DepthLess : ExecutionModeOperand<15, [Shader]>;
defm DepthUnchanged : ExecutionModeOperand<16, [Shader]>;
defm LocalSize : ExecutionModeOperand<17, []>;
defm LocalSizeHint : ExecutionModeOperand<18, [Kernel]>;
defm InputPoints : ExecutionModeOperand<19, [Geometry]>;
defm InputLines : ExecutionModeOperand<20, [Geometry]>;
defm InputLinesAdjacency : ExecutionModeOperand<21, [Geometry]>;
defm Triangles : ExecutionModeOperand<22, [Geometry]>;
defm InputTrianglesAdjacency : ExecutionModeOperand<23, [Geometry]>;
defm Quads : ExecutionModeOperand<24, [Tessellation]>;
defm Isolines : ExecutionModeOperand<25, [Tessellation]>;
defm OutputVertices : ExecutionModeOperand<26, [Geometry]>;
defm OutputPoints : ExecutionModeOperand<27, [Geometry]>;
defm OutputLineStrip : ExecutionModeOperand<28, [Geometry]>;
defm OutputTriangleStrip : ExecutionModeOperand<29, [Geometry]>;
defm VecTypeHint : ExecutionModeOperand<30, [Kernel]>;
defm ContractionOff : ExecutionModeOperand<31, [Kernel]>;
defm Initializer : ExecutionModeOperand<33, [Kernel]>;
defm Finalizer : ExecutionModeOperand<34, [Kernel]>;
defm SubgroupSize : ExecutionModeOperand<35, [SubgroupDispatch]>;
defm SubgroupsPerWorkgroup : ExecutionModeOperand<36, [SubgroupDispatch]>;
defm SubgroupsPerWorkgroupId : ExecutionModeOperand<37, [SubgroupDispatch]>;
defm LocalSizeId : ExecutionModeOperand<38, []>;
defm LocalSizeHintId : ExecutionModeOperand<39, [Kernel]>;
defm PostDepthCoverage : ExecutionModeOperand<4446, [SampleMaskPostDepthCoverage]>;
defm DenormPreserve : ExecutionModeOperand<4459, [DenormPreserve]>;
defm DenormFlushToZero : ExecutionModeOperand<4460, [DenormFlushToZero]>;
defm SignedZeroInfNanPreserve : ExecutionModeOperand<4461, [SignedZeroInfNanPreserve]>;
defm RoundingModeRTE : ExecutionModeOperand<4462, [RoundingModeRTE]>;
defm RoundingModeRTZ : ExecutionModeOperand<4463, [RoundingModeRTZ]>;
defm StencilRefReplacingEXT : ExecutionModeOperand<5027, [StencilExportEXT]>;
defm OutputLinesNV : ExecutionModeOperand<5269, [MeshShadingNV]>;
defm DerivativeGroupQuadsNV : ExecutionModeOperand<5289, [ComputeDerivativeGroupQuadsNV]>;
defm DerivativeGroupLinearNV : ExecutionModeOperand<5290, [ComputeDerivativeGroupLinearNV]>;
defm OutputTrianglesNV : ExecutionModeOperand<5298, [MeshShadingNV]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define StorageClass enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def StorageClass : GenericEnum, Operand<i32> {
let FilterClass = "StorageClass";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class StorageClass<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass StorageClassOperand<bits<32> value, list<Capability> reqCapabilities> {
def : StorageClass<NAME, value>;
defm : SymbolicOperandWithRequirements<StorageClassOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm UniformConstant : StorageClassOperand<0, []>;
defm Input : StorageClassOperand<1, []>;
defm Uniform : StorageClassOperand<2, [Shader]>;
defm Output : StorageClassOperand<3, [Shader]>;
defm Workgroup : StorageClassOperand<4, []>;
defm CrossWorkgroup : StorageClassOperand<5, []>;
defm Private : StorageClassOperand<6, [Shader]>;
defm Function : StorageClassOperand<7, []>;
defm Generic : StorageClassOperand<8, [GenericPointer]>;
defm PushConstant : StorageClassOperand<9, [Shader]>;
defm AtomicCounter : StorageClassOperand<10, [AtomicStorage]>;
defm Image : StorageClassOperand<11, []>;
defm StorageBuffer : StorageClassOperand<12, [Shader]>;
defm CallableDataNV : StorageClassOperand<5328, [RayTracingNV]>;
defm IncomingCallableDataNV : StorageClassOperand<5329, [RayTracingNV]>;
defm RayPayloadNV : StorageClassOperand<5338, [RayTracingNV]>;
defm HitAttributeNV : StorageClassOperand<5339, [RayTracingNV]>;
defm IncomingRayPayloadNV : StorageClassOperand<5342, [RayTracingNV]>;
defm ShaderRecordBufferNV : StorageClassOperand<5343, [RayTracingNV]>;
defm PhysicalStorageBufferEXT : StorageClassOperand<5349, [PhysicalStorageBufferAddressesEXT]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define Dim enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def Dim : GenericEnum, Operand<i32> {
let FilterClass = "Dim";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class Dim<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass DimOperand<bits<32> value, string mnemonic, list<Capability> reqCapabilities> {
def NAME : Dim<NAME, value>;
defm : SymbolicOperandWithRequirements<DimOperand, value, mnemonic, 0, 0, [], reqCapabilities>;
}
defm DIM_1D : DimOperand<0, "1D", [Sampled1D, Image1D]>;
defm DIM_2D : DimOperand<1, "2D", [Shader, Kernel, ImageMSArray]>;
defm DIM_3D : DimOperand<2, "3D", []>;
defm DIM_Cube : DimOperand<3, "Cube", [Shader, ImageCubeArray]>;
defm DIM_Rect : DimOperand<4, "Rect", [SampledRect, ImageRect]>;
defm DIM_Buffer : DimOperand<5, "Buffer", [SampledBuffer, ImageBuffer]>;
defm DIM_SubpassData : DimOperand<6, "SubpassData", [InputAttachment]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define SamplerAddressingMode enum values and at the same
// time SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def SamplerAddressingMode : GenericEnum, Operand<i32> {
let FilterClass = "SamplerAddressingMode";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class SamplerAddressingMode<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass SamplerAddressingModeOperand<bits<32> value, list<Capability> reqCapabilities> {
def : SamplerAddressingMode<NAME, value>;
defm : SymbolicOperandWithRequirements<SamplerAddressingModeOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm None : SamplerAddressingModeOperand<0, [Kernel]>;
defm ClampToEdge : SamplerAddressingModeOperand<1, [Kernel]>;
defm Clamp : SamplerAddressingModeOperand<2, [Kernel]>;
defm Repeat : SamplerAddressingModeOperand<3, [Kernel]>;
defm RepeatMirrored : SamplerAddressingModeOperand<4, [Kernel]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define SamplerFilterMode enum values and at the same
// time SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def SamplerFilterMode : GenericEnum, Operand<i32> {
let FilterClass = "SamplerFilterMode";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class SamplerFilterMode<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass SamplerFilterModeOperand<bits<32> value, list<Capability> reqCapabilities> {
def : SamplerFilterMode<NAME, value>;
defm : SymbolicOperandWithRequirements<SamplerFilterModeOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm Nearest : SamplerFilterModeOperand<0, [Kernel]>;
defm Linear : SamplerFilterModeOperand<1, [Kernel]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define ImageFormat enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def ImageFormat : GenericEnum, Operand<i32> {
let FilterClass = "ImageFormat";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class ImageFormat<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass ImageFormatOperand<bits<32> value, list<Capability> reqCapabilities> {
def NAME : ImageFormat<NAME, value>;
defm : SymbolicOperandWithRequirements<ImageFormatOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm Unknown : ImageFormatOperand<0, []>;
defm Rgba32f : ImageFormatOperand<1, [Shader]>;
defm Rgba16f : ImageFormatOperand<2, [Shader]>;
defm R32f : ImageFormatOperand<3, [Shader]>;
defm Rgba8 : ImageFormatOperand<4, [Shader]>;
defm Rgba8Snorm : ImageFormatOperand<5, [Shader]>;
defm Rg32f : ImageFormatOperand<6, [StorageImageExtendedFormats]>;
defm Rg16f : ImageFormatOperand<7, [StorageImageExtendedFormats]>;
defm R11fG11fB10f : ImageFormatOperand<8, [StorageImageExtendedFormats]>;
defm R16f : ImageFormatOperand<9, [StorageImageExtendedFormats]>;
defm Rgba16 : ImageFormatOperand<10, [StorageImageExtendedFormats]>;
defm Rgb10A2 : ImageFormatOperand<11, [StorageImageExtendedFormats]>;
defm Rg16 : ImageFormatOperand<12, [StorageImageExtendedFormats]>;
defm Rg8 : ImageFormatOperand<13, [StorageImageExtendedFormats]>;
defm R16 : ImageFormatOperand<14, [StorageImageExtendedFormats]>;
defm R8 : ImageFormatOperand<15, [StorageImageExtendedFormats]>;
defm Rgba16Snorm : ImageFormatOperand<16, [StorageImageExtendedFormats]>;
defm Rg16Snorm : ImageFormatOperand<17, [StorageImageExtendedFormats]>;
defm Rg8Snorm : ImageFormatOperand<18, [StorageImageExtendedFormats]>;
defm R16Snorm : ImageFormatOperand<19, [StorageImageExtendedFormats]>;
defm R8Snorm : ImageFormatOperand<20, [StorageImageExtendedFormats]>;
defm Rgba32i : ImageFormatOperand<21, [Shader]>;
defm Rgba16i : ImageFormatOperand<22, [Shader]>;
defm Rgba8i : ImageFormatOperand<23, [Shader]>;
defm R32i : ImageFormatOperand<24, [Shader]>;
defm Rg32i : ImageFormatOperand<25, [StorageImageExtendedFormats]>;
defm Rg16i : ImageFormatOperand<26, [StorageImageExtendedFormats]>;
defm Rg8i : ImageFormatOperand<27, [StorageImageExtendedFormats]>;
defm R16i : ImageFormatOperand<28, [StorageImageExtendedFormats]>;
defm R8i : ImageFormatOperand<29, [StorageImageExtendedFormats]>;
defm Rgba32ui : ImageFormatOperand<30, [Shader]>;
defm Rgba16ui : ImageFormatOperand<31, [Shader]>;
defm Rgba8ui : ImageFormatOperand<32, [Shader]>;
defm R32ui : ImageFormatOperand<33, [Shader]>;
defm Rgb10a2ui : ImageFormatOperand<34, [StorageImageExtendedFormats]>;
defm Rg32ui : ImageFormatOperand<35, [StorageImageExtendedFormats]>;
defm Rg16ui : ImageFormatOperand<36, [StorageImageExtendedFormats]>;
defm Rg8ui : ImageFormatOperand<37, [StorageImageExtendedFormats]>;
defm R16ui : ImageFormatOperand<38, [StorageImageExtendedFormats]>;
defm R8ui : ImageFormatOperand<39, [StorageImageExtendedFormats]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define ImageChannelOrder enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def ImageChannelOrder : GenericEnum, Operand<i32> {
let FilterClass = "ImageChannelOrder";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class ImageChannelOrder<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass ImageChannelOrderOperand<bits<32> value, list<Capability> reqCapabilities> {
def : ImageChannelOrder<NAME, value>;
defm : SymbolicOperandWithRequirements<ImageChannelOrderOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm R : ImageChannelOrderOperand<0, [Kernel]>;
defm A : ImageChannelOrderOperand<1, [Kernel]>;
defm RG : ImageChannelOrderOperand<2, [Kernel]>;
defm RA : ImageChannelOrderOperand<3, [Kernel]>;
defm RGB : ImageChannelOrderOperand<4, [Kernel]>;
defm RGBA : ImageChannelOrderOperand<5, [Kernel]>;
defm BGRA : ImageChannelOrderOperand<6, [Kernel]>;
defm ARGB : ImageChannelOrderOperand<7, [Kernel]>;
defm Intensity : ImageChannelOrderOperand<8, [Kernel]>;
defm Luminance : ImageChannelOrderOperand<9, [Kernel]>;
defm Rx : ImageChannelOrderOperand<10, [Kernel]>;
defm RGx : ImageChannelOrderOperand<11, [Kernel]>;
defm RGBx : ImageChannelOrderOperand<12, [Kernel]>;
defm Depth : ImageChannelOrderOperand<13, [Kernel]>;
defm DepthStencil : ImageChannelOrderOperand<14, [Kernel]>;
defm sRGB : ImageChannelOrderOperand<15, [Kernel]>;
defm sRGBx : ImageChannelOrderOperand<16, [Kernel]>;
defm sRGBA : ImageChannelOrderOperand<17, [Kernel]>;
defm sBGRA : ImageChannelOrderOperand<18, [Kernel]>;
defm ABGR : ImageChannelOrderOperand<19, [Kernel]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define ImageChannelDataType enum values and at the same
// time SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def ImageChannelDataType : GenericEnum, Operand<i32> {
let FilterClass = "ImageChannelDataType";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class ImageChannelDataType<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass ImageChannelDataTypeOperand<bits<32> value, list<Capability> reqCapabilities> {
def : ImageChannelDataType<NAME, value>;
defm : SymbolicOperandWithRequirements<ImageChannelDataTypeOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm SnormInt8 : ImageChannelDataTypeOperand<0, []>;
defm SnormInt16 : ImageChannelDataTypeOperand<1, []>;
defm UnormInt8 : ImageChannelDataTypeOperand<2, [Kernel]>;
defm UnormInt16 : ImageChannelDataTypeOperand<3, [Kernel]>;
defm UnormShort565 : ImageChannelDataTypeOperand<4, [Kernel]>;
defm UnormShort555 : ImageChannelDataTypeOperand<5, [Kernel]>;
defm UnormInt101010 : ImageChannelDataTypeOperand<6, [Kernel]>;
defm SignedInt8 : ImageChannelDataTypeOperand<7, [Kernel]>;
defm SignedInt16 : ImageChannelDataTypeOperand<8, [Kernel]>;
defm SignedInt32 : ImageChannelDataTypeOperand<9, [Kernel]>;
defm UnsignedInt8 : ImageChannelDataTypeOperand<10, [Kernel]>;
defm UnsignedInt16 : ImageChannelDataTypeOperand<11, [Kernel]>;
defm UnsigendInt32 : ImageChannelDataTypeOperand<12, [Kernel]>;
defm HalfFloat : ImageChannelDataTypeOperand<13, [Kernel]>;
defm Float : ImageChannelDataTypeOperand<14, [Kernel]>;
defm UnormInt24 : ImageChannelDataTypeOperand<15, [Kernel]>;
defm UnormInt101010_2 : ImageChannelDataTypeOperand<16, [Kernel]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define ImageOperand enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def ImageOperand : GenericEnum, Operand<i32> {
let FilterClass = "ImageOperand";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class ImageOperand<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass ImageOperandOperand<bits<32> value, list<Capability> reqCapabilities> {
def : ImageOperand<NAME, value>;
defm : SymbolicOperandWithRequirements<ImageOperandOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm None : ImageOperandOperand<0x0, []>;
defm Bias : ImageOperandOperand<0x1, [Shader]>;
defm Lod : ImageOperandOperand<0x2, []>;
defm Grad : ImageOperandOperand<0x4, []>;
defm ConstOffset : ImageOperandOperand<0x8, []>;
defm Offset : ImageOperandOperand<0x10, [ImageGatherExtended]>;
defm ConstOffsets : ImageOperandOperand<0x20, [ImageGatherExtended]>;
defm Sample : ImageOperandOperand<0x40, []>;
defm MinLod : ImageOperandOperand<0x80, [MinLod]>;
defm MakeTexelAvailableKHR : ImageOperandOperand<0x100, [VulkanMemoryModelKHR]>;
defm MakeTexelVisibleKHR : ImageOperandOperand<0x200, [VulkanMemoryModelKHR]>;
defm NonPrivateTexelKHR : ImageOperandOperand<0x400, [VulkanMemoryModelKHR]>;
defm VolatileTexelKHR : ImageOperandOperand<0x800, [VulkanMemoryModelKHR]>;
defm SignExtend : ImageOperandOperand<0x1000, []>;
defm ZeroExtend : ImageOperandOperand<0x2000, []>;
//===----------------------------------------------------------------------===//
// Multiclass used to define FPFastMathMode enum values and at the same time
// SymbolicOperand entries with string mnemonics and capabilities.
//===----------------------------------------------------------------------===//
def FPFastMathMode : GenericEnum, Operand<i32> {
let FilterClass = "FPFastMathMode";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class FPFastMathMode<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}
multiclass FPFastMathModeOperand<bits<32> value, list<Capability> reqCapabilities> {
def : FPFastMathMode<NAME, value>;
defm : SymbolicOperandWithRequirements<FPFastMathModeOperand, value, NAME, 0, 0, [], reqCapabilities>;
}
defm None : FPFastMathModeOperand<0x0, []>;
defm NotNaN : FPFastMathModeOperand<0x1, [Kernel]>;
defm NotInf : FPFastMathModeOperand<0x2, [Kernel]>;
defm NSZ : FPFastMathModeOperand<0x4, [Kernel]>;
defm AllowRecip : FPFastMathModeOperand<0x8, [Kernel]>;
defm Fast : FPFastMathModeOperand<0x10, [Kernel]>;
//===----------------------------------------------------------------------===//
// Multiclass used to define FPRoundingMode enum values and at the same time
// SymbolicOperand entries with string mnemonics.
//===----------------------------------------------------------------------===//
def FPRoundingMode : GenericEnum, Operand<i32> {
let FilterClass = "FPRoundingMode";
let NameField = "Name";
let ValueField = "Value";
let PrintMethod = !strconcat("printSymbolicOperand<OperandCategory::", FilterClass, "Operand>");
}
class FPRoundingMode<string name, bits<32> value> {
string Name = name;
bits<32> Value = value;
}