summaryrefslogtreecommitdiff
path: root/lib/SPIRV/libSPIRV/SPIRVIsValidEnum.h
blob: 9833a4ce8218d013cc22aa07a8c7de5357e71b88 (plain)
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
//===- SPIRVIsValidEnum.h - SPIR-V isValid enums ----------------*- C++ -*-===//
//
//                     The LLVM/SPIRV Translator
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
// Copyright (c) 2014 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal with the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimers.
// Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimers in the documentation
// and/or other materials provided with the distribution.
// Neither the names of Advanced Micro Devices, Inc., nor the names of its
// contributors may be used to endorse or promote products derived from this
// Software without specific prior written permission.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH
// THE SOFTWARE.
//
//===----------------------------------------------------------------------===//
/// \file
///
/// This file defines SPIR-V isValid enums.
///
//===----------------------------------------------------------------------===//
// WARNING:
//
// This file has been generated using `tools/spirv-tool/gen_spirv.bash` and
// should not be modified manually. If the file needs to be updated, edit the
// script and any other source file instead, before re-generating this file.
//===----------------------------------------------------------------------===//

#ifndef SPIRVISVALIDENUM_H_
#define SPIRVISVALIDENUM_H_

#include "SPIRVEnum.h"
#include "spirv.hpp"

using namespace spv;

namespace SPIRV {

inline bool isValid(spv::SourceLanguage V) {
  switch (V) {
  case SourceLanguageUnknown:
  case SourceLanguageESSL:
  case SourceLanguageGLSL:
  case SourceLanguageOpenCL_C:
  case SourceLanguageOpenCL_CPP:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::ExecutionModel V) {
  switch (V) {
  case ExecutionModelVertex:
  case ExecutionModelTessellationControl:
  case ExecutionModelTessellationEvaluation:
  case ExecutionModelGeometry:
  case ExecutionModelFragment:
  case ExecutionModelGLCompute:
  case ExecutionModelKernel:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::AddressingModel V) {
  switch (V) {
  case AddressingModelLogical:
  case AddressingModelPhysical32:
  case AddressingModelPhysical64:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::MemoryModel V) {
  switch (V) {
  case MemoryModelSimple:
  case MemoryModelGLSL450:
  case MemoryModelOpenCL:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::ExecutionMode V) {
  switch (V) {
  case ExecutionModeInvocations:
  case ExecutionModeSpacingEqual:
  case ExecutionModeSpacingFractionalEven:
  case ExecutionModeSpacingFractionalOdd:
  case ExecutionModeVertexOrderCw:
  case ExecutionModeVertexOrderCcw:
  case ExecutionModePixelCenterInteger:
  case ExecutionModeOriginUpperLeft:
  case ExecutionModeOriginLowerLeft:
  case ExecutionModeEarlyFragmentTests:
  case ExecutionModePointMode:
  case ExecutionModeXfb:
  case ExecutionModeDepthReplacing:
  case ExecutionModeDepthGreater:
  case ExecutionModeDepthLess:
  case ExecutionModeDepthUnchanged:
  case ExecutionModeLocalSize:
  case ExecutionModeLocalSizeHint:
  case ExecutionModeInputPoints:
  case ExecutionModeInputLines:
  case ExecutionModeInputLinesAdjacency:
  case ExecutionModeTriangles:
  case ExecutionModeInputTrianglesAdjacency:
  case ExecutionModeQuads:
  case ExecutionModeIsolines:
  case ExecutionModeOutputVertices:
  case ExecutionModeOutputPoints:
  case ExecutionModeOutputLineStrip:
  case ExecutionModeOutputTriangleStrip:
  case ExecutionModeVecTypeHint:
  case ExecutionModeContractionOff:
  case ExecutionModeInitializer:
  case ExecutionModeFinalizer:
  case ExecutionModeSubgroupSize:
  case ExecutionModeSubgroupsPerWorkgroup:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::StorageClass V) {
  switch (V) {
  case StorageClassUniformConstant:
  case StorageClassInput:
  case StorageClassUniform:
  case StorageClassOutput:
  case StorageClassWorkgroup:
  case StorageClassCrossWorkgroup:
  case StorageClassPrivate:
  case StorageClassFunction:
  case StorageClassGeneric:
  case StorageClassPushConstant:
  case StorageClassAtomicCounter:
  case StorageClassImage:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::Dim V) {
  switch (V) {
  case Dim1D:
  case Dim2D:
  case Dim3D:
  case DimCube:
  case DimRect:
  case DimBuffer:
  case DimSubpassData:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::SamplerAddressingMode V) {
  switch (V) {
  case SamplerAddressingModeNone:
  case SamplerAddressingModeClampToEdge:
  case SamplerAddressingModeClamp:
  case SamplerAddressingModeRepeat:
  case SamplerAddressingModeRepeatMirrored:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::SamplerFilterMode V) {
  switch (V) {
  case SamplerFilterModeNearest:
  case SamplerFilterModeLinear:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::ImageFormat V) {
  switch (V) {
  case ImageFormatUnknown:
  case ImageFormatRgba32f:
  case ImageFormatRgba16f:
  case ImageFormatR32f:
  case ImageFormatRgba8:
  case ImageFormatRgba8Snorm:
  case ImageFormatRg32f:
  case ImageFormatRg16f:
  case ImageFormatR11fG11fB10f:
  case ImageFormatR16f:
  case ImageFormatRgba16:
  case ImageFormatRgb10A2:
  case ImageFormatRg16:
  case ImageFormatRg8:
  case ImageFormatR16:
  case ImageFormatR8:
  case ImageFormatRgba16Snorm:
  case ImageFormatRg16Snorm:
  case ImageFormatRg8Snorm:
  case ImageFormatR16Snorm:
  case ImageFormatR8Snorm:
  case ImageFormatRgba32i:
  case ImageFormatRgba16i:
  case ImageFormatRgba8i:
  case ImageFormatR32i:
  case ImageFormatRg32i:
  case ImageFormatRg16i:
  case ImageFormatRg8i:
  case ImageFormatR16i:
  case ImageFormatR8i:
  case ImageFormatRgba32ui:
  case ImageFormatRgba16ui:
  case ImageFormatRgba8ui:
  case ImageFormatR32ui:
  case ImageFormatRgb10a2ui:
  case ImageFormatRg32ui:
  case ImageFormatRg16ui:
  case ImageFormatRg8ui:
  case ImageFormatR16ui:
  case ImageFormatR8ui:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::ImageChannelOrder V) {
  switch (V) {
  case ImageChannelOrderR:
  case ImageChannelOrderA:
  case ImageChannelOrderRG:
  case ImageChannelOrderRA:
  case ImageChannelOrderRGB:
  case ImageChannelOrderRGBA:
  case ImageChannelOrderBGRA:
  case ImageChannelOrderARGB:
  case ImageChannelOrderIntensity:
  case ImageChannelOrderLuminance:
  case ImageChannelOrderRx:
  case ImageChannelOrderRGx:
  case ImageChannelOrderRGBx:
  case ImageChannelOrderDepth:
  case ImageChannelOrderDepthStencil:
  case ImageChannelOrderABGR:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::ImageChannelDataType V) {
  switch (V) {
  case ImageChannelDataTypeSnormInt8:
  case ImageChannelDataTypeSnormInt16:
  case ImageChannelDataTypeUnormInt8:
  case ImageChannelDataTypeUnormInt16:
  case ImageChannelDataTypeUnormShort565:
  case ImageChannelDataTypeUnormShort555:
  case ImageChannelDataTypeUnormInt101010:
  case ImageChannelDataTypeSignedInt8:
  case ImageChannelDataTypeSignedInt16:
  case ImageChannelDataTypeSignedInt32:
  case ImageChannelDataTypeUnsignedInt8:
  case ImageChannelDataTypeUnsignedInt16:
  case ImageChannelDataTypeUnsignedInt32:
  case ImageChannelDataTypeHalfFloat:
  case ImageChannelDataTypeFloat:
  case ImageChannelDataTypeUnormInt24:
  case ImageChannelDataTypeUnormInt101010_2:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::FPRoundingMode V) {
  switch (V) {
  case FPRoundingModeRTE:
  case FPRoundingModeRTZ:
  case FPRoundingModeRTP:
  case FPRoundingModeRTN:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::LinkageType V) {
  switch (V) {
  case LinkageTypeExport:
  case LinkageTypeImport:
  case LinkageTypeInternal:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::AccessQualifier V) {
  switch (V) {
  case AccessQualifierReadOnly:
  case AccessQualifierWriteOnly:
  case AccessQualifierReadWrite:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::FunctionParameterAttribute V) {
  switch (V) {
  case FunctionParameterAttributeZext:
  case FunctionParameterAttributeSext:
  case FunctionParameterAttributeByVal:
  case FunctionParameterAttributeSret:
  case FunctionParameterAttributeNoAlias:
  case FunctionParameterAttributeNoCapture:
  case FunctionParameterAttributeNoWrite:
  case FunctionParameterAttributeNoReadWrite:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::Decoration V) {
  switch (V) {
  case DecorationRelaxedPrecision:
  case DecorationSpecId:
  case DecorationBlock:
  case DecorationBufferBlock:
  case DecorationRowMajor:
  case DecorationColMajor:
  case DecorationArrayStride:
  case DecorationMatrixStride:
  case DecorationGLSLShared:
  case DecorationGLSLPacked:
  case DecorationCPacked:
  case DecorationBuiltIn:
  case DecorationNoPerspective:
  case DecorationFlat:
  case DecorationPatch:
  case DecorationCentroid:
  case DecorationSample:
  case DecorationInvariant:
  case DecorationRestrict:
  case DecorationAliased:
  case DecorationVolatile:
  case DecorationConstant:
  case DecorationCoherent:
  case DecorationNonWritable:
  case DecorationNonReadable:
  case DecorationUniform:
  case DecorationSaturatedConversion:
  case DecorationStream:
  case DecorationLocation:
  case DecorationComponent:
  case DecorationIndex:
  case DecorationBinding:
  case DecorationDescriptorSet:
  case DecorationOffset:
  case DecorationXfbBuffer:
  case DecorationXfbStride:
  case DecorationFuncParamAttr:
  case DecorationFPRoundingMode:
  case DecorationFPFastMathMode:
  case DecorationLinkageAttributes:
  case DecorationNoContraction:
  case DecorationInputAttachmentIndex:
  case DecorationAlignment:
  case DecorationMaxByteOffset:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::BuiltIn V) {
  switch (V) {
  case BuiltInPosition:
  case BuiltInPointSize:
  case BuiltInClipDistance:
  case BuiltInCullDistance:
  case BuiltInVertexId:
  case BuiltInInstanceId:
  case BuiltInPrimitiveId:
  case BuiltInInvocationId:
  case BuiltInLayer:
  case BuiltInViewportIndex:
  case BuiltInTessLevelOuter:
  case BuiltInTessLevelInner:
  case BuiltInTessCoord:
  case BuiltInPatchVertices:
  case BuiltInFragCoord:
  case BuiltInPointCoord:
  case BuiltInFrontFacing:
  case BuiltInSampleId:
  case BuiltInSamplePosition:
  case BuiltInSampleMask:
  case BuiltInFragDepth:
  case BuiltInHelperInvocation:
  case BuiltInNumWorkgroups:
  case BuiltInWorkgroupSize:
  case BuiltInWorkgroupId:
  case BuiltInLocalInvocationId:
  case BuiltInGlobalInvocationId:
  case BuiltInLocalInvocationIndex:
  case BuiltInWorkDim:
  case BuiltInGlobalSize:
  case BuiltInEnqueuedWorkgroupSize:
  case BuiltInGlobalOffset:
  case BuiltInGlobalLinearId:
  case BuiltInSubgroupSize:
  case BuiltInSubgroupMaxSize:
  case BuiltInNumSubgroups:
  case BuiltInNumEnqueuedSubgroups:
  case BuiltInSubgroupId:
  case BuiltInSubgroupLocalInvocationId:
  case BuiltInVertexIndex:
  case BuiltInInstanceIndex:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::Scope V) {
  switch (V) {
  case ScopeCrossDevice:
  case ScopeDevice:
  case ScopeWorkgroup:
  case ScopeSubgroup:
  case ScopeInvocation:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::GroupOperation V) {
  switch (V) {
  case GroupOperationReduce:
  case GroupOperationInclusiveScan:
  case GroupOperationExclusiveScan:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::KernelEnqueueFlags V) {
  switch (V) {
  case KernelEnqueueFlagsNoWait:
  case KernelEnqueueFlagsWaitKernel:
  case KernelEnqueueFlagsWaitWorkGroup:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::Capability V) {
  switch (V) {
  case CapabilityMatrix:
  case CapabilityShader:
  case CapabilityGeometry:
  case CapabilityTessellation:
  case CapabilityAddresses:
  case CapabilityLinkage:
  case CapabilityKernel:
  case CapabilityVector16:
  case CapabilityFloat16Buffer:
  case CapabilityFloat16:
  case CapabilityFloat64:
  case CapabilityInt64:
  case CapabilityInt64Atomics:
  case CapabilityImageBasic:
  case CapabilityImageReadWrite:
  case CapabilityImageMipmap:
  case CapabilityPipes:
  case CapabilityGroups:
  case CapabilityDeviceEnqueue:
  case CapabilityLiteralSampler:
  case CapabilityAtomicStorage:
  case CapabilityInt16:
  case CapabilityTessellationPointSize:
  case CapabilityGeometryPointSize:
  case CapabilityImageGatherExtended:
  case CapabilityStorageImageMultisample:
  case CapabilityUniformBufferArrayDynamicIndexing:
  case CapabilitySampledImageArrayDynamicIndexing:
  case CapabilityStorageBufferArrayDynamicIndexing:
  case CapabilityStorageImageArrayDynamicIndexing:
  case CapabilityClipDistance:
  case CapabilityCullDistance:
  case CapabilityImageCubeArray:
  case CapabilitySampleRateShading:
  case CapabilityImageRect:
  case CapabilitySampledRect:
  case CapabilityGenericPointer:
  case CapabilityInt8:
  case CapabilityInputAttachment:
  case CapabilitySparseResidency:
  case CapabilityMinLod:
  case CapabilitySampled1D:
  case CapabilityImage1D:
  case CapabilitySampledCubeArray:
  case CapabilitySampledBuffer:
  case CapabilityImageBuffer:
  case CapabilityImageMSArray:
  case CapabilityStorageImageExtendedFormats:
  case CapabilityImageQuery:
  case CapabilityDerivativeControl:
  case CapabilityInterpolationFunction:
  case CapabilityTransformFeedback:
  case CapabilityGeometryStreams:
  case CapabilityStorageImageReadWithoutFormat:
  case CapabilityStorageImageWriteWithoutFormat:
  case CapabilityMultiViewport:
  case CapabilitySubgroupDispatch:
  case CapabilityNamedBarrier:
  case CapabilityPipeStorage:
    return true;
  default:
    return false;
  }
}

inline bool isValid(spv::Op V) {
  switch (V) {
  case OpNop:
  case OpUndef:
  case OpSourceContinued:
  case OpSource:
  case OpSourceExtension:
  case OpName:
  case OpMemberName:
  case OpString:
  case OpLine:
  case OpExtension:
  case OpExtInstImport:
  case OpExtInst:
  case OpMemoryModel:
  case OpEntryPoint:
  case OpExecutionMode:
  case OpCapability:
  case OpTypeVoid:
  case OpTypeBool:
  case OpTypeInt:
  case OpTypeFloat:
  case OpTypeVector:
  case OpTypeMatrix:
  case OpTypeImage:
  case OpTypeSampler:
  case OpTypeSampledImage:
  case OpTypeArray:
  case OpTypeRuntimeArray:
  case OpTypeStruct:
  case OpTypeOpaque:
  case OpTypePointer:
  case OpTypeFunction:
  case OpTypeEvent:
  case OpTypeDeviceEvent:
  case OpTypeReserveId:
  case OpTypeQueue:
  case OpTypePipe:
  case OpTypeForwardPointer:
  case OpConstantTrue:
  case OpConstantFalse:
  case OpConstant:
  case OpConstantComposite:
  case OpConstantSampler:
  case OpConstantNull:
  case OpSpecConstantTrue:
  case OpSpecConstantFalse:
  case OpSpecConstant:
  case OpSpecConstantComposite:
  case OpSpecConstantOp:
  case OpFunction:
  case OpFunctionParameter:
  case OpFunctionEnd:
  case OpFunctionCall:
  case OpVariable:
  case OpImageTexelPointer:
  case OpLoad:
  case OpStore:
  case OpCopyMemory:
  case OpCopyMemorySized:
  case OpAccessChain:
  case OpInBoundsAccessChain:
  case OpPtrAccessChain:
  case OpArrayLength:
  case OpGenericPtrMemSemantics:
  case OpInBoundsPtrAccessChain:
  case OpDecorate:
  case OpMemberDecorate:
  case OpDecorationGroup:
  case OpGroupDecorate:
  case OpGroupMemberDecorate:
  case OpVectorExtractDynamic:
  case OpVectorInsertDynamic:
  case OpVectorShuffle:
  case OpCompositeConstruct:
  case OpCompositeExtract:
  case OpCompositeInsert:
  case OpCopyObject:
  case OpTranspose:
  case OpSampledImage:
  case OpImageSampleImplicitLod:
  case OpImageSampleExplicitLod:
  case OpImageSampleDrefImplicitLod:
  case OpImageSampleDrefExplicitLod:
  case OpImageSampleProjImplicitLod:
  case OpImageSampleProjExplicitLod:
  case OpImageSampleProjDrefImplicitLod:
  case OpImageSampleProjDrefExplicitLod:
  case OpImageFetch:
  case OpImageGather:
  case OpImageDrefGather:
  case OpImageRead:
  case OpImageWrite:
  case OpImage:
  case OpImageQueryFormat:
  case OpImageQueryOrder:
  case OpImageQuerySizeLod:
  case OpImageQuerySize:
  case OpImageQueryLod:
  case OpImageQueryLevels:
  case OpImageQuerySamples:
  case OpConvertFToU:
  case OpConvertFToS:
  case OpConvertSToF:
  case OpConvertUToF:
  case OpUConvert:
  case OpSConvert:
  case OpFConvert:
  case OpQuantizeToF16:
  case OpConvertPtrToU:
  case OpSatConvertSToU:
  case OpSatConvertUToS:
  case OpConvertUToPtr:
  case OpPtrCastToGeneric:
  case OpGenericCastToPtr:
  case OpGenericCastToPtrExplicit:
  case OpBitcast:
  case OpSNegate:
  case OpFNegate:
  case OpIAdd:
  case OpFAdd:
  case OpISub:
  case OpFSub:
  case OpIMul:
  case OpFMul:
  case OpUDiv:
  case OpSDiv:
  case OpFDiv:
  case OpUMod:
  case OpSRem:
  case OpSMod:
  case OpFRem:
  case OpFMod:
  case OpVectorTimesScalar:
  case OpMatrixTimesScalar:
  case OpVectorTimesMatrix:
  case OpMatrixTimesVector:
  case OpMatrixTimesMatrix:
  case OpOuterProduct:
  case OpDot:
  case OpIAddCarry:
  case OpISubBorrow:
  case OpUMulExtended:
  case OpSMulExtended:
  case OpAny:
  case OpAll:
  case OpIsNan:
  case OpIsInf:
  case OpIsFinite:
  case OpIsNormal:
  case OpSignBitSet:
  case OpLessOrGreater:
  case OpOrdered:
  case OpUnordered:
  case OpLogicalEqual:
  case OpLogicalNotEqual:
  case OpLogicalOr:
  case OpLogicalAnd:
  case OpLogicalNot:
  case OpSelect:
  case OpIEqual:
  case OpINotEqual:
  case OpUGreaterThan:
  case OpSGreaterThan:
  case OpUGreaterThanEqual:
  case OpSGreaterThanEqual:
  case OpULessThan:
  case OpSLessThan:
  case OpULessThanEqual:
  case OpSLessThanEqual:
  case OpFOrdEqual:
  case OpFUnordEqual:
  case OpFOrdNotEqual:
  case OpFUnordNotEqual:
  case OpFOrdLessThan:
  case OpFUnordLessThan:
  case OpFOrdGreaterThan:
  case OpFUnordGreaterThan:
  case OpFOrdLessThanEqual:
  case OpFUnordLessThanEqual:
  case OpFOrdGreaterThanEqual:
  case OpFUnordGreaterThanEqual:
  case OpShiftRightLogical:
  case OpShiftRightArithmetic:
  case OpShiftLeftLogical:
  case OpBitwiseOr:
  case OpBitwiseXor:
  case OpBitwiseAnd:
  case OpNot:
  case OpBitFieldInsert:
  case OpBitFieldSExtract:
  case OpBitFieldUExtract:
  case OpBitReverse:
  case OpBitCount:
  case OpDPdx:
  case OpDPdy:
  case OpFwidth:
  case OpDPdxFine:
  case OpDPdyFine:
  case OpFwidthFine:
  case OpDPdxCoarse:
  case OpDPdyCoarse:
  case OpFwidthCoarse:
  case OpEmitVertex:
  case OpEndPrimitive:
  case OpEmitStreamVertex:
  case OpEndStreamPrimitive:
  case OpControlBarrier:
  case OpMemoryBarrier:
  case OpAtomicLoad:
  case OpAtomicStore:
  case OpAtomicExchange:
  case OpAtomicCompareExchange:
  case OpAtomicCompareExchangeWeak:
  case OpAtomicIIncrement:
  case OpAtomicIDecrement:
  case OpAtomicIAdd:
  case OpAtomicISub:
  case OpAtomicSMin:
  case OpAtomicUMin:
  case OpAtomicSMax:
  case OpAtomicUMax:
  case OpAtomicAnd:
  case OpAtomicOr:
  case OpAtomicXor:
  case OpPhi:
  case OpLoopMerge:
  case OpSelectionMerge:
  case OpLabel:
  case OpBranch:
  case OpBranchConditional:
  case OpSwitch:
  case OpKill:
  case OpReturn:
  case OpReturnValue:
  case OpUnreachable:
  case OpLifetimeStart:
  case OpLifetimeStop:
  case OpGroupAsyncCopy:
  case OpGroupWaitEvents:
  case OpGroupAll:
  case OpGroupAny:
  case OpGroupBroadcast:
  case OpGroupIAdd:
  case OpGroupFAdd:
  case OpGroupFMin:
  case OpGroupUMin:
  case OpGroupSMin:
  case OpGroupFMax:
  case OpGroupUMax:
  case OpGroupSMax:
  case OpReadPipe:
  case OpWritePipe:
  case OpReservedReadPipe:
  case OpReservedWritePipe:
  case OpReserveReadPipePackets:
  case OpReserveWritePipePackets:
  case OpCommitReadPipe:
  case OpCommitWritePipe:
  case OpIsValidReserveId:
  case OpGetNumPipePackets:
  case OpGetMaxPipePackets:
  case OpGroupReserveReadPipePackets:
  case OpGroupReserveWritePipePackets:
  case OpGroupCommitReadPipe:
  case OpGroupCommitWritePipe:
  case OpEnqueueMarker:
  case OpEnqueueKernel:
  case OpGetKernelNDrangeSubGroupCount:
  case OpGetKernelNDrangeMaxSubGroupSize:
  case OpGetKernelWorkGroupSize:
  case OpGetKernelPreferredWorkGroupSizeMultiple:
  case OpRetainEvent:
  case OpReleaseEvent:
  case OpCreateUserEvent:
  case OpIsValidEvent:
  case OpSetUserEventStatus:
  case OpCaptureEventProfilingInfo:
  case OpGetDefaultQueue:
  case OpBuildNDRange:
  case OpImageSparseSampleImplicitLod:
  case OpImageSparseSampleExplicitLod:
  case OpImageSparseSampleDrefImplicitLod:
  case OpImageSparseSampleDrefExplicitLod:
  case OpImageSparseSampleProjImplicitLod:
  case OpImageSparseSampleProjExplicitLod:
  case OpImageSparseSampleProjDrefImplicitLod:
  case OpImageSparseSampleProjDrefExplicitLod:
  case OpImageSparseFetch:
  case OpImageSparseGather:
  case OpImageSparseDrefGather:
  case OpImageSparseTexelsResident:
  case OpNoLine:
  case OpAtomicFlagTestAndSet:
  case OpAtomicFlagClear:
  case OpImageSparseRead:
  case OpSizeOf:
  case OpTypePipeStorage:
  case OpConstantPipeStorage:
  case OpCreatePipeFromPipeStorage:
  case OpGetKernelLocalSizeForSubgroupCount:
  case OpGetKernelMaxNumSubgroups:
  case OpTypeNamedBarrier:
  case OpNamedBarrierInitialize:
  case OpMemoryNamedBarrier:
  case OpModuleProcessed:
  case OpForward:
  case OpSubgroupShuffleINTEL:
  case OpSubgroupShuffleDownINTEL:
  case OpSubgroupShuffleUpINTEL:
  case OpSubgroupShuffleXorINTEL:
  case OpSubgroupBlockReadINTEL:
  case OpSubgroupBlockWriteINTEL:
  case OpSubgroupImageBlockReadINTEL:
  case OpSubgroupImageBlockWriteINTEL:
    return true;
  default:
    return false;
  }
}

inline bool isValidImageOperandsMask(SPIRVWord Mask) {
  SPIRVWord ValidMask = 0u;
  ValidMask |= ImageOperandsBiasMask;
  ValidMask |= ImageOperandsLodMask;
  ValidMask |= ImageOperandsGradMask;
  ValidMask |= ImageOperandsConstOffsetMask;
  ValidMask |= ImageOperandsOffsetMask;
  ValidMask |= ImageOperandsConstOffsetsMask;
  ValidMask |= ImageOperandsSampleMask;
  ValidMask |= ImageOperandsMinLodMask;

  return (Mask & ~ValidMask) == 0;
}

inline bool isValidFPFastMathModeMask(SPIRVWord Mask) {
  SPIRVWord ValidMask = 0u;
  ValidMask |= FPFastMathModeNotNaNMask;
  ValidMask |= FPFastMathModeNotInfMask;
  ValidMask |= FPFastMathModeNSZMask;
  ValidMask |= FPFastMathModeAllowRecipMask;
  ValidMask |= FPFastMathModeFastMask;

  return (Mask & ~ValidMask) == 0;
}

inline bool isValidSelectionControlMask(SPIRVWord Mask) {
  SPIRVWord ValidMask = 0u;
  ValidMask |= SelectionControlFlattenMask;
  ValidMask |= SelectionControlDontFlattenMask;

  return (Mask & ~ValidMask) == 0;
}

inline bool isValidLoopControlMask(SPIRVWord Mask) {
  SPIRVWord ValidMask = 0u;
  ValidMask |= LoopControlUnrollMask;
  ValidMask |= LoopControlDontUnrollMask;
  ValidMask |= LoopControlDependencyInfiniteMask;
  ValidMask |= LoopControlDependencyLengthMask;

  return (Mask & ~ValidMask) == 0;
}

inline bool isValidFunctionControlMask(SPIRVWord Mask) {
  SPIRVWord ValidMask = 0u;
  ValidMask |= FunctionControlInlineMask;
  ValidMask |= FunctionControlDontInlineMask;
  ValidMask |= FunctionControlPureMask;
  ValidMask |= FunctionControlConstMask;

  return (Mask & ~ValidMask) == 0;
}

inline bool isValidMemorySemanticsMask(SPIRVWord Mask) {
  SPIRVWord ValidMask = 0u;
  ValidMask |= MemorySemanticsAcquireMask;
  ValidMask |= MemorySemanticsReleaseMask;
  ValidMask |= MemorySemanticsAcquireReleaseMask;
  ValidMask |= MemorySemanticsSequentiallyConsistentMask;
  ValidMask |= MemorySemanticsUniformMemoryMask;
  ValidMask |= MemorySemanticsSubgroupMemoryMask;
  ValidMask |= MemorySemanticsWorkgroupMemoryMask;
  ValidMask |= MemorySemanticsCrossWorkgroupMemoryMask;
  ValidMask |= MemorySemanticsAtomicCounterMemoryMask;
  ValidMask |= MemorySemanticsImageMemoryMask;

  return (Mask & ~ValidMask) == 0;
}

inline bool isValidMemoryAccessMask(SPIRVWord Mask) {
  SPIRVWord ValidMask = 0u;
  ValidMask |= MemoryAccessVolatileMask;
  ValidMask |= MemoryAccessAlignedMask;
  ValidMask |= MemoryAccessNontemporalMask;

  return (Mask & ~ValidMask) == 0;
}

inline bool isValidKernelProfilingInfoMask(SPIRVWord Mask) {
  SPIRVWord ValidMask = 0u;
  ValidMask |= KernelProfilingInfoCmdExecTimeMask;

  return (Mask & ~ValidMask) == 0;
}

} /* namespace SPIRV */

#endif /* SPIRVISVALIDENUM_H_ */