LCOV - code coverage report
Current view: top level - xenolith/core - XLCoreEnum.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 5 6 83.3 %
Date: 2024-05-12 00:16:13 Functions: 4 5 80.0 %

          Line data    Source code
       1             : /**
       2             : Copyright (c) 2023 Stappler LLC <admin@stappler.dev>
       3             : 
       4             : Permission is hereby granted, free of charge, to any person obtaining a copy
       5             : of this software and associated documentation files (the "Software"), to deal
       6             : in the Software without restriction, including without limitation the rights
       7             : to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
       8             : copies of the Software, and to permit persons to whom the Software is
       9             : furnished to do so, subject to the following conditions:
      10             : 
      11             : The above copyright notice and this permission notice shall be included in
      12             : all copies or substantial portions of the Software.
      13             : 
      14             : THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      15             : IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      16             : FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
      17             : AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      18             : LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
      19             : OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
      20             : THE SOFTWARE.
      21             : **/
      22             : 
      23             : #ifndef XENOLITH_CORE_XLCOREENUM_H_
      24             : #define XENOLITH_CORE_XLCOREENUM_H_
      25             : 
      26             : #include "SPCommon.h"
      27             : 
      28             : namespace STAPPLER_VERSIONIZED stappler::xenolith::core {
      29             : 
      30             : enum class FrameRenderPassState {
      31             :         Initial,
      32             :         Ready,
      33             :         Owned,
      34             :         ResourcesAcquired,
      35             :         Prepared,
      36             :         Submission,
      37             :         Submitted,
      38             :         Complete,
      39             :         Finalized,
      40             : };
      41             : 
      42             : enum class FrameAttachmentState {
      43             :         Initial,
      44             :         Setup,
      45             :         InputRequired,
      46             :         Ready,
      47             :         ResourcesPending,
      48             :         ResourcesAcquired,
      49             :         Detached, // resource ownership transferred out of Frame
      50             :         Complete,
      51             :         ResourcesReleased,
      52             :         Finalized,
      53             : };
      54             : 
      55             : enum class AttachmentType {
      56             :         Image,
      57             :         Buffer,
      58             :         Generic
      59             : };
      60             : 
      61             : // VkPipelineStageFlagBits
      62             : enum class PipelineStage {
      63             :         None,
      64             :         TopOfPipe = 0x00000001,
      65             :         DrawIndirect = 0x00000002,
      66             :         VertexInput = 0x00000004,
      67             :         VertexShader = 0x00000008,
      68             :         TesselationControl = 0x00000010,
      69             :         TesselationEvaluation = 0x00000020,
      70             :         GeometryShader = 0x00000040,
      71             :         FragmentShader = 0x00000080,
      72             :         EarlyFragmentTest = 0x00000100,
      73             :         LateFragmentTest = 0x00000200,
      74             :         ColorAttachmentOutput = 0x00000400,
      75             :         ComputeShader = 0x00000800,
      76             :         Transfer = 0x00001000,
      77             :         BottomOfPipe = 0x00002000,
      78             :         Host = 0x00004000,
      79             :         AllGraphics = 0x00008000,
      80             :         AllCommands = 0x00010000,
      81             :         TransformFeedback = 0x01000000,
      82             :         ConditionalRendering = 0x00040000,
      83             :         AccelerationStructureBuild = 0x02000000,
      84             :         RayTracingShader = 0x00200000,
      85             :         ShadingRateImage = 0x00400000,
      86             :         TaskShader = 0x00080000,
      87             :         MeshShader = 0x00100000,
      88             :         FragmentDensityProcess = 0x00800000,
      89             :         CommandPreprocess = 0x00020000,
      90             : };
      91             : 
      92             : SP_DEFINE_ENUM_AS_MASK(PipelineStage);
      93             : 
      94             : // VkAccessFlag
      95             : enum class AccessType {
      96             :         None,
      97             :     IndirectCommandRead = 0x00000001,
      98             :     IndexRead = 0x00000002,
      99             :     VertexAttributeRead = 0x00000004,
     100             :     UniformRead = 0x00000008,
     101             :     InputAttachmantRead = 0x00000010,
     102             :     ShaderRead = 0x00000020,
     103             :         ShaderWrite = 0x00000040,
     104             :     ColorAttachmentRead = 0x00000080,
     105             :     ColorAttachmentWrite = 0x00000100,
     106             :     DepthStencilAttachmentRead = 0x00000200,
     107             :         DepthStencilAttachmentWrite = 0x00000400,
     108             :     TransferRead = 0x00000800,
     109             :     TransferWrite = 0x00001000,
     110             :     HostRead = 0x00002000,
     111             :     HostWrite = 0x00004000,
     112             :     MemoryRead = 0x00008000,
     113             :     MemoryWrite = 0x00010000,
     114             :         TransformFeedbackWrite = 0x02000000,
     115             :         TransformFeedbackCounterRead = 0x04000000,
     116             :         TransformFeedbackCounterWrite = 0x08000000,
     117             :         ConditionalRenderingRead = 0x00100000,
     118             :         ColorAttachmentReadNonCoherent = 0x00080000,
     119             :         AccelerationStructureRead = 0x00200000,
     120             :         AccelerationStructureWrite = 0x00400000,
     121             :         ShadingRateImageRead = 0x00800000,
     122             :         FragmentDensityMapRead = 0x01000000,
     123             :         CommandPreprocessRead = 0x00020000,
     124             :         CommandPreprocessWrite = 0x00040000,
     125             : };
     126             : 
     127             : SP_DEFINE_ENUM_AS_MASK(AccessType);
     128             : 
     129             : // read-write operations on attachment within passes
     130             : enum class AttachmentOps {
     131             :         Undefined,
     132             :         ReadColor = 1,
     133             :         ReadStencil = 2,
     134             :         WritesColor = 4,
     135             :         WritesStencil = 8
     136             : };
     137             : 
     138             : SP_DEFINE_ENUM_AS_MASK(AttachmentOps);
     139             : 
     140             : // VkAttachmentLoadOp
     141             : enum class AttachmentLoadOp {
     142             :         Load = 0,
     143             :         Clear = 1,
     144             :         DontCare = 2,
     145             : };
     146             : 
     147             : // VkAttachmentStoreOp
     148             : enum class AttachmentStoreOp {
     149             :         Store = 0,
     150             :         DontCare = 1,
     151             : };
     152             : 
     153             : // Attachment usage within subpasses
     154             : enum class AttachmentUsage {
     155             :         None,
     156             :         Input = 1,
     157             :         Output = 2,
     158             :         InputOutput = Input | Output,
     159             :         Resolve = 4,
     160             :         DepthStencil = 8,
     161             :         InputDepthStencil = Input | DepthStencil
     162             : };
     163             : 
     164             : SP_DEFINE_ENUM_AS_MASK(AttachmentUsage);
     165             : 
     166             : // VkDescriptorType
     167             : enum class DescriptorType : uint32_t {
     168             :         Sampler = 0,
     169             :         CombinedImageSampler = 1,
     170             :         SampledImage = 2,
     171             :         StorageImage = 3,
     172             :         UniformTexelBuffer = 4,
     173             :         StorageTexelBuffer = 5,
     174             :         UniformBuffer = 6,
     175             :         StorageBuffer = 7,
     176             :         UniformBufferDynamic = 8,
     177             :         StorageBufferDynamic = 9,
     178             :         InputAttachment = 10,
     179             :         Attachment = maxOf<uint32_t>() - 1,
     180             :         Unknown = maxOf<uint32_t>()
     181             : };
     182             : 
     183             : // mapping to VkShaderStageFlagBits
     184             : enum class ProgramStage {
     185             :         None,
     186             :         Vertex = 0x00000001,
     187             :         TesselationControl = 0x00000002,
     188             :         TesselationEvaluation = 0x00000004,
     189             :         Geometry = 0x00000008,
     190             :         Fragment = 0x00000010,
     191             :         Compute = 0x00000020,
     192             :         RayGen = 0x00000100,
     193             :         AnyHit = 0x00000200,
     194             :         ClosestHit = 0x00000400,
     195             :         MissHit = 0x00000800,
     196             :         Intersection = 0x00001000,
     197             :         Callable = 0x00002000,
     198             :         Task = 0x00000040,
     199             :         Mesh = 0x00000080,
     200             : };
     201             : 
     202             : SP_DEFINE_ENUM_AS_MASK(ProgramStage);
     203             : 
     204             : // mapping to VkImageLayout
     205             : enum class AttachmentLayout : uint32_t {
     206             :         Undefined = 0,
     207             :         General = 1,
     208             :         ColorAttachmentOptimal = 2,
     209             :         DepthStencilAttachmentOptimal = 3,
     210             :         DepthStencilReadOnlyOptimal = 4,
     211             :         ShaderReadOnlyOptimal = 5,
     212             :         TransferSrcOptimal = 6,
     213             :         TransferDstOptimal = 7,
     214             :         Preinitialized = 8,
     215             :         DepthReadOnlyStencilAttachmentOptimal = 1000117000,
     216             :         DepthAttachmentStencilReadOnlyOptimal = 1000117001,
     217             :         DepthAttachmentOptimal = 1000241000,
     218             :         DepthReadOnlyOptimal = 1000241001,
     219             :         StencilAttachmentOptimal = 1000241002,
     220             :         StencilReadOnlyOptimal = 1000241003,
     221             :         PresentSrc = 1000001002,
     222             :         Ignored = maxOf<uint32_t>()
     223             : };
     224             : 
     225             : enum class PassType {
     226             :         Graphics,
     227             :         Compute,
     228             :         Transfer,
     229             :         Generic
     230             : };
     231             : 
     232             : // engine-defined specialization constants for shaders
     233             : enum class PredefinedConstant {
     234             :         SamplersArraySize,
     235             :         SamplersDescriptorIdx,
     236             :         TexturesArraySize,
     237             :         TexturesDescriptorIdx,
     238             :         BuffersArraySize,
     239             :         BuffersDescriptorIdx,
     240             :         CurrentSamplerIdx,
     241             : };
     242             : 
     243             : struct SpecializationConstant {
     244             :         enum Type {
     245             :                 Int,
     246             :                 Float,
     247             :                 Predefined
     248             :         };
     249             : 
     250             :         Type type = Int;
     251             :         union {
     252             :                 int intValue;
     253             :                 float floatValue;
     254             :                 PredefinedConstant predefinedValue;
     255             :         };
     256             : 
     257         525 :         SpecializationConstant(int val) : type(Int), intValue(val) { }
     258        5334 :         SpecializationConstant(uint32_t val) : type(Int), intValue(val) { }
     259           0 :         SpecializationConstant(float val) : type(Float), floatValue(val) { }
     260         100 :         SpecializationConstant(PredefinedConstant val) : type(Predefined), predefinedValue(val) { }
     261             : };
     262             : 
     263             : enum class DynamicState {
     264             :         None,
     265             :         Viewport = 1,
     266             :         Scissor = 2,
     267             : 
     268             :         Default = Viewport | Scissor,
     269             : };
     270             : 
     271             : SP_DEFINE_ENUM_AS_MASK(DynamicState)
     272             : 
     273             : // Mapping to VkBufferCreateFlagBits
     274             : enum class BufferFlags {
     275             :         None,
     276             :         SparceBinding = 0x00000001,
     277             :         SparceResidency = 0x00000002,
     278             :         SparceAliased = 0x00000004,
     279             :         Protected = 0x00000008,
     280             : };
     281             : 
     282             : SP_DEFINE_ENUM_AS_MASK(BufferFlags)
     283             : 
     284             : 
     285             : // Mapping to VkBufferUsageFlagBits
     286             : enum class BufferUsage {
     287             :         None,
     288             :         TransferSrc = 0x00000001,
     289             :         TransferDst = 0x00000002,
     290             :         UniformTexelBuffer = 0x00000004,
     291             :         StorageTexelBuffer = 0x00000008,
     292             :         UniformBuffer = 0x00000010,
     293             :         StorageBuffer = 0x00000020,
     294             :         IndexBuffer = 0x00000040,
     295             :         VertexBuffer = 0x00000080,
     296             :         IndirectBuffer = 0x00000100,
     297             :         ShaderDeviceAddress = 0x00020000,
     298             : 
     299             :         TransformFeedback = 0x00000800,
     300             :         TransformFeedbackCounter = 0x00001000,
     301             :         ConditionalRendering = 0x00000200,
     302             :         AccelerationStructureBuildInputReadOnly = 0x00080000,
     303             :         AccelerationStructureStorage = 0x00100000,
     304             :         ShaderBindingTable = 0x00000400,
     305             : };
     306             : 
     307             : SP_DEFINE_ENUM_AS_MASK(BufferUsage)
     308             : 
     309             : 
     310             : // Mapping to VkImageCreateFlagBits
     311             : enum ImageFlags {
     312             :         None,
     313             :         SparceBinding = 0x00000001,
     314             :         SparceResidency = 0x00000002,
     315             :         SparceAliased = 0x00000004,
     316             :         MutableFormat = 0x00000008,
     317             :         CubeCompatible = 0x00000010,
     318             :         Alias = 0x00000400,
     319             :         SplitInstanceBindRegions = 0x00000040,
     320             :         Array2dCompatible = 0x00000020,
     321             :         BlockTexelViewCompatible = 0x00000080,
     322             :         ExtendedUsage = 0x00000100,
     323             :         Protected = 0x00000800,
     324             :         Disjoint = 0x00000200,
     325             : };
     326             : 
     327             : SP_DEFINE_ENUM_AS_MASK(ImageFlags)
     328             : 
     329             : 
     330             : // Mapping to VkSampleCountFlagBits
     331             : enum class SampleCount {
     332             :         None,
     333             :         X1 = 0x00000001,
     334             :         X2 = 0x00000002,
     335             :         X4 = 0x00000004,
     336             :         X8 = 0x00000008,
     337             :         X16 = 0x00000010,
     338             :         X32 = 0x00000020,
     339             :         X64 = 0x00000040,
     340             : };
     341             : 
     342             : SP_DEFINE_ENUM_AS_MASK(SampleCount)
     343             : 
     344             : 
     345             : // Mapping to VkImageType
     346             : enum class ImageType {
     347             :         Image1D = 0,
     348             :         Image2D = 1,
     349             :         Image3D = 2,
     350             : };
     351             : 
     352             : // Mapping to VkImageViewType
     353             : enum class ImageViewType {
     354             :     ImageView1D = 0,
     355             :     ImageView2D = 1,
     356             :         ImageView3D = 2,
     357             :         ImageViewCube = 3,
     358             :         ImageView1DArray = 4,
     359             :         ImageView2DArray = 5,
     360             :         ImageViewCubeArray = 6,
     361             : };
     362             : 
     363             : // Mapping to VkFormat
     364             : enum class ImageFormat {
     365             :         Undefined = 0,
     366             :         R4G4_UNORM_PACK8 = 1,
     367             :         R4G4B4A4_UNORM_PACK16 = 2,
     368             :         B4G4R4A4_UNORM_PACK16 = 3,
     369             :         R5G6B5_UNORM_PACK16 = 4,
     370             :         B5G6R5_UNORM_PACK16 = 5,
     371             :         R5G5B5A1_UNORM_PACK16 = 6,
     372             :         B5G5R5A1_UNORM_PACK16 = 7,
     373             :         A1R5G5B5_UNORM_PACK16 = 8,
     374             :         R8_UNORM = 9,
     375             :         R8_SNORM = 10,
     376             :         R8_USCALED = 11,
     377             :         R8_SSCALED = 12,
     378             :         R8_UINT = 13,
     379             :         R8_SINT = 14,
     380             :         R8_SRGB = 15,
     381             :         R8G8_UNORM = 16,
     382             :         R8G8_SNORM = 17,
     383             :         R8G8_USCALED = 18,
     384             :         R8G8_SSCALED = 19,
     385             :         R8G8_UINT = 20,
     386             :         R8G8_SINT = 21,
     387             :         R8G8_SRGB = 22,
     388             :         R8G8B8_UNORM = 23,
     389             :         R8G8B8_SNORM = 24,
     390             :         R8G8B8_USCALED = 25,
     391             :         R8G8B8_SSCALED = 26,
     392             :         R8G8B8_UINT = 27,
     393             :         R8G8B8_SINT = 28,
     394             :         R8G8B8_SRGB = 29,
     395             :         B8G8R8_UNORM = 30,
     396             :         B8G8R8_SNORM = 31,
     397             :         B8G8R8_USCALED = 32,
     398             :         B8G8R8_SSCALED = 33,
     399             :         B8G8R8_UINT = 34,
     400             :         B8G8R8_SINT = 35,
     401             :         B8G8R8_SRGB = 36,
     402             :         R8G8B8A8_UNORM = 37,
     403             :         R8G8B8A8_SNORM = 38,
     404             :         R8G8B8A8_USCALED = 39,
     405             :         R8G8B8A8_SSCALED = 40,
     406             :         R8G8B8A8_UINT = 41,
     407             :         R8G8B8A8_SINT = 42,
     408             :         R8G8B8A8_SRGB = 43,
     409             :         B8G8R8A8_UNORM = 44,
     410             :         B8G8R8A8_SNORM = 45,
     411             :         B8G8R8A8_USCALED = 46,
     412             :         B8G8R8A8_SSCALED = 47,
     413             :         B8G8R8A8_UINT = 48,
     414             :         B8G8R8A8_SINT = 49,
     415             :         B8G8R8A8_SRGB = 50,
     416             :         A8B8G8R8_UNORM_PACK32 = 51,
     417             :         A8B8G8R8_SNORM_PACK32 = 52,
     418             :         A8B8G8R8_USCALED_PACK32 = 53,
     419             :         A8B8G8R8_SSCALED_PACK32 = 54,
     420             :         A8B8G8R8_UINT_PACK32 = 55,
     421             :         A8B8G8R8_SINT_PACK32 = 56,
     422             :         A8B8G8R8_SRGB_PACK32 = 57,
     423             :         A2R10G10B10_UNORM_PACK32 = 58,
     424             :         A2R10G10B10_SNORM_PACK32 = 59,
     425             :         A2R10G10B10_USCALED_PACK32 = 60,
     426             :         A2R10G10B10_SSCALED_PACK32 = 61,
     427             :         A2R10G10B10_UINT_PACK32 = 62,
     428             :         A2R10G10B10_SINT_PACK32 = 63,
     429             :         A2B10G10R10_UNORM_PACK32 = 64,
     430             :         A2B10G10R10_SNORM_PACK32 = 65,
     431             :         A2B10G10R10_USCALED_PACK32 = 66,
     432             :         A2B10G10R10_SSCALED_PACK32 = 67,
     433             :         A2B10G10R10_UINT_PACK32 = 68,
     434             :         A2B10G10R10_SINT_PACK32 = 69,
     435             :         R16_UNORM = 70,
     436             :         R16_SNORM = 71,
     437             :         R16_USCALED = 72,
     438             :         R16_SSCALED = 73,
     439             :         R16_UINT = 74,
     440             :         R16_SINT = 75,
     441             :         R16_SFLOAT = 76,
     442             :         R16G16_UNORM = 77,
     443             :         R16G16_SNORM = 78,
     444             :         R16G16_USCALED = 79,
     445             :         R16G16_SSCALED = 80,
     446             :         R16G16_UINT = 81,
     447             :         R16G16_SINT = 82,
     448             :         R16G16_SFLOAT = 83,
     449             :         R16G16B16_UNORM = 84,
     450             :         R16G16B16_SNORM = 85,
     451             :         R16G16B16_USCALED = 86,
     452             :         R16G16B16_SSCALED = 87,
     453             :         R16G16B16_UINT = 88,
     454             :         R16G16B16_SINT = 89,
     455             :         R16G16B16_SFLOAT = 90,
     456             :         R16G16B16A16_UNORM = 91,
     457             :         R16G16B16A16_SNORM = 92,
     458             :         R16G16B16A16_USCALED = 93,
     459             :         R16G16B16A16_SSCALED = 94,
     460             :         R16G16B16A16_UINT = 95,
     461             :         R16G16B16A16_SINT = 96,
     462             :         R16G16B16A16_SFLOAT = 97,
     463             :         R32_UINT = 98,
     464             :         R32_SINT = 99,
     465             :         R32_SFLOAT = 100,
     466             :         R32G32_UINT = 101,
     467             :         R32G32_SINT = 102,
     468             :         R32G32_SFLOAT = 103,
     469             :         R32G32B32_UINT = 104,
     470             :         R32G32B32_SINT = 105,
     471             :         R32G32B32_SFLOAT = 106,
     472             :         R32G32B32A32_UINT = 107,
     473             :         R32G32B32A32_SINT = 108,
     474             :         R32G32B32A32_SFLOAT = 109,
     475             :         R64_UINT = 110,
     476             :         R64_SINT = 111,
     477             :         R64_SFLOAT = 112,
     478             :         R64G64_UINT = 113,
     479             :         R64G64_SINT = 114,
     480             :         R64G64_SFLOAT = 115,
     481             :         R64G64B64_UINT = 116,
     482             :         R64G64B64_SINT = 117,
     483             :         R64G64B64_SFLOAT = 118,
     484             :         R64G64B64A64_UINT = 119,
     485             :         R64G64B64A64_SINT = 120,
     486             :         R64G64B64A64_SFLOAT = 121,
     487             :         B10G11R11_UFLOAT_PACK32 = 122,
     488             :         E5B9G9R9_UFLOAT_PACK32 = 123,
     489             :         D16_UNORM = 124,
     490             :         X8_D24_UNORM_PACK32 = 125,
     491             :         D32_SFLOAT = 126,
     492             :         S8_UINT = 127,
     493             :         D16_UNORM_S8_UINT = 128,
     494             :         D24_UNORM_S8_UINT = 129,
     495             :         D32_SFLOAT_S8_UINT = 130,
     496             :         BC1_RGB_UNORM_BLOCK = 131,
     497             :         BC1_RGB_SRGB_BLOCK = 132,
     498             :         BC1_RGBA_UNORM_BLOCK = 133,
     499             :         BC1_RGBA_SRGB_BLOCK = 134,
     500             :         BC2_UNORM_BLOCK = 135,
     501             :         BC2_SRGB_BLOCK = 136,
     502             :         BC3_UNORM_BLOCK = 137,
     503             :         BC3_SRGB_BLOCK = 138,
     504             :         BC4_UNORM_BLOCK = 139,
     505             :         BC4_SNORM_BLOCK = 140,
     506             :         BC5_UNORM_BLOCK = 141,
     507             :         BC5_SNORM_BLOCK = 142,
     508             :         BC6H_UFLOAT_BLOCK = 143,
     509             :         BC6H_SFLOAT_BLOCK = 144,
     510             :         BC7_UNORM_BLOCK = 145,
     511             :         BC7_SRGB_BLOCK = 146,
     512             :         ETC2_R8G8B8_UNORM_BLOCK = 147,
     513             :         ETC2_R8G8B8_SRGB_BLOCK = 148,
     514             :         ETC2_R8G8B8A1_UNORM_BLOCK = 149,
     515             :         ETC2_R8G8B8A1_SRGB_BLOCK = 150,
     516             :         ETC2_R8G8B8A8_UNORM_BLOCK = 151,
     517             :         ETC2_R8G8B8A8_SRGB_BLOCK = 152,
     518             :         EAC_R11_UNORM_BLOCK = 153,
     519             :         EAC_R11_SNORM_BLOCK = 154,
     520             :         EAC_R11G11_UNORM_BLOCK = 155,
     521             :         EAC_R11G11_SNORM_BLOCK = 156,
     522             :         ASTC_4x4_UNORM_BLOCK = 157,
     523             :         ASTC_4x4_SRGB_BLOCK = 158,
     524             :         ASTC_5x4_UNORM_BLOCK = 159,
     525             :         ASTC_5x4_SRGB_BLOCK = 160,
     526             :         ASTC_5x5_UNORM_BLOCK = 161,
     527             :         ASTC_5x5_SRGB_BLOCK = 162,
     528             :         ASTC_6x5_UNORM_BLOCK = 163,
     529             :         ASTC_6x5_SRGB_BLOCK = 164,
     530             :         ASTC_6x6_UNORM_BLOCK = 165,
     531             :         ASTC_6x6_SRGB_BLOCK = 166,
     532             :         ASTC_8x5_UNORM_BLOCK = 167,
     533             :         ASTC_8x5_SRGB_BLOCK = 168,
     534             :         ASTC_8x6_UNORM_BLOCK = 169,
     535             :         ASTC_8x6_SRGB_BLOCK = 170,
     536             :         ASTC_8x8_UNORM_BLOCK = 171,
     537             :         ASTC_8x8_SRGB_BLOCK = 172,
     538             :         ASTC_10x5_UNORM_BLOCK = 173,
     539             :         ASTC_10x5_SRGB_BLOCK = 174,
     540             :         ASTC_10x6_UNORM_BLOCK = 175,
     541             :         ASTC_10x6_SRGB_BLOCK = 176,
     542             :         ASTC_10x8_UNORM_BLOCK = 177,
     543             :         ASTC_10x8_SRGB_BLOCK = 178,
     544             :         ASTC_10x10_UNORM_BLOCK = 179,
     545             :         ASTC_10x10_SRGB_BLOCK = 180,
     546             :         ASTC_12x10_UNORM_BLOCK = 181,
     547             :         ASTC_12x10_SRGB_BLOCK = 182,
     548             :         ASTC_12x12_UNORM_BLOCK = 183,
     549             :         ASTC_12x12_SRGB_BLOCK = 184,
     550             :         G8B8G8R8_422_UNORM = 1000156000,
     551             :         B8G8R8G8_422_UNORM = 1000156001,
     552             :         G8_B8_R8_3PLANE_420_UNORM = 1000156002,
     553             :         G8_B8R8_2PLANE_420_UNORM = 1000156003,
     554             :         G8_B8_R8_3PLANE_422_UNORM = 1000156004,
     555             :         G8_B8R8_2PLANE_422_UNORM = 1000156005,
     556             :         G8_B8_R8_3PLANE_444_UNORM = 1000156006,
     557             :         R10X6_UNORM_PACK16 = 1000156007,
     558             :         R10X6G10X6_UNORM_2PACK16 = 1000156008,
     559             :         R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009,
     560             :         G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010,
     561             :         B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011,
     562             :         G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012,
     563             :         G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013,
     564             :         G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014,
     565             :         G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015,
     566             :         G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016,
     567             :         R12X4_UNORM_PACK16 = 1000156017,
     568             :         R12X4G12X4_UNORM_2PACK16 = 1000156018,
     569             :         R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019,
     570             :         G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020,
     571             :         B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021,
     572             :         G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022,
     573             :         G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023,
     574             :         G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024,
     575             :         G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025,
     576             :         G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026,
     577             :         G16B16G16R16_422_UNORM = 1000156027,
     578             :         B16G16R16G16_422_UNORM = 1000156028,
     579             :         G16_B16_R16_3PLANE_420_UNORM = 1000156029,
     580             :         G16_B16R16_2PLANE_420_UNORM = 1000156030,
     581             :         G16_B16_R16_3PLANE_422_UNORM = 1000156031,
     582             :         G16_B16R16_2PLANE_422_UNORM = 1000156032,
     583             :         G16_B16_R16_3PLANE_444_UNORM = 1000156033,
     584             :         PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000,
     585             :         PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001,
     586             :         PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002,
     587             :         PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003,
     588             :         PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004,
     589             :         PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005,
     590             :         PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006,
     591             :         PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007,
     592             :         ASTC_4x4_SFLOAT_BLOCK_EXT = 1000066000,
     593             :         ASTC_5x4_SFLOAT_BLOCK_EXT = 1000066001,
     594             :         ASTC_5x5_SFLOAT_BLOCK_EXT = 1000066002,
     595             :         ASTC_6x5_SFLOAT_BLOCK_EXT = 1000066003,
     596             :         ASTC_6x6_SFLOAT_BLOCK_EXT = 1000066004,
     597             :         ASTC_8x5_SFLOAT_BLOCK_EXT = 1000066005,
     598             :         ASTC_8x6_SFLOAT_BLOCK_EXT = 1000066006,
     599             :         ASTC_8x8_SFLOAT_BLOCK_EXT = 1000066007,
     600             :         ASTC_10x5_SFLOAT_BLOCK_EXT = 1000066008,
     601             :         ASTC_10x6_SFLOAT_BLOCK_EXT = 1000066009,
     602             :         ASTC_10x8_SFLOAT_BLOCK_EXT = 1000066010,
     603             :         ASTC_10x10_SFLOAT_BLOCK_EXT = 1000066011,
     604             :         ASTC_12x10_SFLOAT_BLOCK_EXT = 1000066012,
     605             :         ASTC_12x12_SFLOAT_BLOCK_EXT = 1000066013,
     606             :         G8_B8R8_2PLANE_444_UNORM_EXT = 1000330000,
     607             :         G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT = 1000330001,
     608             :         G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT = 1000330002,
     609             :         G16_B16R16_2PLANE_444_UNORM_EXT = 1000330003,
     610             :         A4R4G4B4_UNORM_PACK16_EXT = 1000340000,
     611             :         A4B4G4R4_UNORM_PACK16_EXT = 1000340001,
     612             : };
     613             : 
     614             : // VkColorSpaceKHR
     615             : enum class ColorSpace {
     616             :         SRGB_NONLINEAR_KHR = 0,
     617             :         DISPLAY_P3_NONLINEAR_EXT = 1000104001,
     618             :         EXTENDED_SRGB_LINEAR_EXT = 1000104002,
     619             :         DISPLAY_P3_LINEAR_EXT = 1000104003,
     620             :         DCI_P3_NONLINEAR_EXT = 1000104004,
     621             :         BT709_LINEAR_EXT = 1000104005,
     622             :         BT709_NONLINEAR_EXT = 1000104006,
     623             :         BT2020_LINEAR_EXT = 1000104007,
     624             :         HDR10_ST2084_EXT = 1000104008,
     625             :         DOLBYVISION_EXT = 1000104009,
     626             :         HDR10_HLG_EXT = 1000104010,
     627             :         ADOBERGB_LINEAR_EXT = 1000104011,
     628             :         ADOBERGB_NONLINEAR_EXT = 1000104012,
     629             :         PASS_THROUGH_EXT = 1000104013,
     630             :         EXTENDED_SRGB_NONLINEAR_EXT = 1000104014,
     631             :         DISPLAY_NATIVE_AMD = 1000213000,
     632             : };
     633             : 
     634             : // VkCompositeAlphaFlagBitsKHR
     635             : enum class CompositeAlphaFlags {
     636             :         None = 0,
     637             :         Opaque = 0x00000001,
     638             :         Premultiplied = 0x00000002,
     639             :         Postmultiplied = 0x00000004,
     640             :         Inherit = 0x00000008,
     641             : };
     642             : 
     643             : SP_DEFINE_ENUM_AS_MASK(CompositeAlphaFlags)
     644             : 
     645             : // mapping to VkImageTiling
     646             : enum class ImageTiling {
     647             :         Optimal = 0,
     648             :         Linear = 1,
     649             : };
     650             : 
     651             : // mapping to VkImageUsageFlagBits
     652             : enum class ImageUsage {
     653             :         None,
     654             :         TransferSrc = 0x00000001,
     655             :         TransferDst = 0x00000002,
     656             :     Sampled = 0x00000004,
     657             :     Storage = 0x00000008,
     658             :     ColorAttachment = 0x00000010,
     659             :     DepthStencilAttachment = 0x00000020,
     660             :     TransientAttachment = 0x00000040,
     661             :     InputAttachment = 0x00000080,
     662             : };
     663             : 
     664             : SP_DEFINE_ENUM_AS_MASK(ImageUsage);
     665             : 
     666             : enum class PresentMode : uint32_t {
     667             :         Unsupported,
     668             :         Immediate,
     669             :         FifoRelaxed,
     670             :         Fifo,
     671             :         Mailbox
     672             : };
     673             : 
     674             : enum class AttachmentStorageType {
     675             :         // Implementation-defined transient memory storage (if supported)
     676             :         Transient,
     677             : 
     678             :         // Attachment data stored in per-frame memory
     679             :         FrameStateless,
     680             : 
     681             :         // Attachment stored in independent, but persistent memory
     682             :         ObjectStateless,
     683             : 
     684             :         // Attachment has a persistent state
     685             :         Stateful,
     686             : };
     687             : 
     688             : enum class ImageHints {
     689             :         None = 0,
     690             :         Opaque = 1 << 0,
     691             :         FixedSize = 1 << 1,
     692             :         DoNotCache = 1 << 2,
     693             :         ReadOnly = 1 << 3,
     694             :         Static = FixedSize | DoNotCache | ReadOnly
     695             : };
     696             : 
     697             : SP_DEFINE_ENUM_AS_MASK(ImageHints);
     698             : 
     699             : // VkComponentSwizzle
     700             : enum class ComponentMapping : uint32_t {
     701             :         Identity = 0,
     702             :         Zero = 1,
     703             :         One = 2,
     704             :         R = 3,
     705             :         G = 4,
     706             :         B = 5,
     707             :         A = 6,
     708             : };
     709             : 
     710             : // VkFilter
     711             : enum class Filter {
     712             :         Nearest = 0,
     713             :         Linear = 1,
     714             :         Cubic = 1000015000
     715             : };
     716             : 
     717             : // VkSamplerMipmapMode
     718             : enum class SamplerMipmapMode {
     719             :         Nearest = 0,
     720             :         Linear = 1,
     721             : };
     722             : 
     723             : // VkSamplerAddressMode
     724             : enum class SamplerAddressMode {
     725             :         Repeat = 0,
     726             :         MirroredRepeat = 1,
     727             :         ClampToEdge = 2,
     728             :         ClampToBorder = 3,
     729             : };
     730             : 
     731             : // VkCompareOp
     732             : enum class CompareOp : uint8_t {
     733             :         Never = 0,
     734             :         Less = 1,
     735             :         Equal = 2,
     736             :         LessOrEqual = 3,
     737             :         Greater = 4,
     738             :         NotEqual = 5,
     739             :         GreaterOrEqual = 6,
     740             :         Always = 7,
     741             : };
     742             : 
     743             : enum class BlendFactor : uint8_t {
     744             :         Zero = 0,
     745             :         One = 1,
     746             :         SrcColor = 2,
     747             :         OneMinusSrcColor = 3,
     748             :         DstColor = 4,
     749             :         OneMinusDstColor = 5,
     750             :         SrcAlpha = 6,
     751             :         OneMinusSrcAlpha = 7,
     752             :         DstAlpha = 8,
     753             :         OneMinusDstAlpha = 9,
     754             : };
     755             : 
     756             : enum class BlendOp : uint8_t {
     757             :         Add = 0,
     758             :         Subtract = 1,
     759             :         ReverseSubtract = 2,
     760             :         Min = 3,
     761             :         Max = 4,
     762             : };
     763             : 
     764             : enum class ColorComponentFlags {
     765             :         R = 0x00000001,
     766             :         G = 0x00000002,
     767             :         B = 0x00000004,
     768             :         A = 0x00000008,
     769             :         All = 0x0000000F
     770             : };
     771             : 
     772             : enum class StencilOp : uint8_t {
     773             :         Keep = 0,
     774             :         Zero = 1,
     775             :         Replace = 2,
     776             :         IncrementAndClamp = 3,
     777             :         DecrementAndClamp = 4,
     778             :         Invert = 5,
     779             :         InvertAndWrap = 6,
     780             :         DecrementAndWrap = 7,
     781             : };
     782             : 
     783             : SP_DEFINE_ENUM_AS_MASK(ColorComponentFlags)
     784             : 
     785             : enum class SurfaceTransformFlags {
     786             :         None,
     787             :         Identity = 0x00000001,
     788             :         Rotate90 = 0x00000002,
     789             :         Rotate180 = 0x00000004,
     790             :         Rotate270 = 0x00000008,
     791             :         Mirror = 0x00000010,
     792             :         MirrorRotate90 = 0x00000020,
     793             :         MirrorRotate180 = 0x00000040,
     794             :         MirrorRotate270 = 0x00000080,
     795             :         Inherit = 0x00000100,
     796             :         PreRotated = 0x01000000,
     797             :         TransformMask = 0x000001FF,
     798             : };
     799             : 
     800             : SP_DEFINE_ENUM_AS_MASK(SurfaceTransformFlags)
     801             : 
     802        6482 : inline SurfaceTransformFlags getPureTransform(SurfaceTransformFlags flags) {
     803        6482 :         return flags & SurfaceTransformFlags::TransformMask;
     804             : }
     805             : 
     806             : enum class RenderingLevel {
     807             :         Default,
     808             :         Solid,
     809             :         Surface,
     810             :         Transparent
     811             : };
     812             : 
     813             : enum class ObjectType {
     814             :         Unknown,
     815             :         Buffer,
     816             :         BufferView,
     817             :         CommandPool,
     818             :         DescriptorPool,
     819             :         DescriptorSetLayout,
     820             :         Event,
     821             :         Fence,
     822             :         Framebuffer,
     823             :         Image,
     824             :         ImageView,
     825             :         Pipeline,
     826             :         PipelineCache,
     827             :         PipelineLayout,
     828             :         QueryPool,
     829             :         RenderPass,
     830             :         Sampler,
     831             :         Semaphore,
     832             :         ShaderModule,
     833             :         DeviceMemory,
     834             :         Swapchain
     835             : };
     836             : 
     837             : enum class PixelFormat {
     838             :         Unknown,
     839             :         A, // single-channel color
     840             :         IA, // dual-channel color
     841             :         RGB,
     842             :         RGBA,
     843             :         D, // depth
     844             :         DS, // depth-stencil
     845             :         S // stencil
     846             : };
     847             : 
     848             : enum class ClockType {
     849             :         Default,
     850             :         Monotonic,
     851             :         Realtime,
     852             :         Process,
     853             :         Thread,
     854             : };
     855             : 
     856             : }
     857             : 
     858             : #endif /* XENOLITH_CORE_XLCOREENUM_H_ */

Generated by: LCOV version 1.14