RavEngine
Loading...
Searching...
No Matches
TextureFormat.hpp
1#pragma once
2#include <cstdint>
3#undef None
4
5namespace RGL {
6 enum class ResourceLayout : uint8_t {
7 Undefined = 0,
8 General = 1,
9 ColorAttachmentOptimal = 2,
10 DepthStencilAttachmentOptimal = 3,
11 DepthStencilReadOnlyOptimal = 4,
12 ShaderReadOnlyOptimal = 5,
13 TransferSourceOptimal = 6,
14 TransferDestinationOptimal,
15 Reinitialized,
16 DepthReadOnlyStencilAttachmentOptimal,
17 DepthAttachmentStencilReadOnlyOptimal,
18 DepthAttachmentOptimal,
19 DepthReadOnlyOptimal,
20 StencilAttachmentOptimal,
21 StencilReadOnlyOptimal,
22 ReadOnlyOptimal,
23 AttachmentOptimal,
24 Present
25 };
26
27
28 enum class TextureFormat {
29 Undefined,
30 BGRA8_Unorm,
31 RGBA8_Uint,
32 RGBA8_Unorm,
33 RGBA16_Unorm,
34 RGBA16_Snorm,
35 RGBA16_Sfloat,
36 RGBA32_Sfloat,
37
38 R8_Uint,
39 R16_Float,
40 R32_Uint,
41 R32_Float,
42
43 BC1_RGB_Unorm, // DXT1
44 BC1_RGB_SRGB,
45 BC1_RGBA_Unorm,
46 BC1_RGBA_SRGB,
47
48 BC2_Unorm, // DXT2,
49 BC2_SRGB,
50
51 BC3_Unorm, // DXT3
52 BC3_SRGB,
53
54 BC4_Unorm, // DXT4
55 BC4_SRGB,
56
57 BC5_Unorm, // DXT5
58 BC5_SRGB,
59
60 D32SFloat, // 32 bit float
61 D24UnormS8Uint, // 24 bit depth, 8 bit stencil
62 };
63
64 enum class MSASampleCount : uint8_t {
65 C0 = 0,
66 C1 = 1,
67 C2 = 2,
68 C4 = 4,
69 C8 = 8,
70 C16 = 16,
71 C32 = 32,
72 C64 = 64,
73 };
74
75 enum class LoadAccessOperation : uint8_t {
76 Load = 0,
77 Clear,
78 DontCare,
79 NotAccessed
80 };
81
82 enum class StoreAccessOperation : uint8_t {
83 Store,
84 DontCare,
85 None,
86 };
87
88 struct TextureUsage {
89 bool TransferSource : 1 = false;
90 bool TransferDestination : 1 = false;
91 bool Sampled : 1 = false;
92 bool Storage : 1 = false;
93 bool ColorAttachment : 1 = false;
94 bool DepthStencilAttachment : 1 = false;
95 bool TransientAttachment : 1 = false;
96 bool InputAttachment : 1 = false;
97 };
98
100 bool HasColor : 1 = false;
101 bool HasDepth : 1 = false;
102 bool HasStencil : 1 = false;
103 bool HasMetadata : 1 = false;
104 };
105
106}
uint8 uint8_t
Definition fwd.hpp:103
Definition TextureFormat.hpp:99
Definition TextureFormat.hpp:88