1#pragma once
2
3#include <nn/gfx/detail/gfx_Misc.h>
4#include <nn/nn_BitTypes.h>
5#include <nn/util/util_BitPack.h>
6
7namespace nn::gfx {
8
9struct TextureMipRangeData {
10 uint16_t minMipLevel;
11 uint16_t mipCount;
12 char reserved[12];
13};
14
15struct TextureArrayRangeData {
16 uint32_t baseArrayIndex;
17 uint32_t arrayLength;
18 char reserved[8];
19};
20
21struct TextureSubresourceRangeData {
22 TextureMipRangeData mipRange;
23 TextureArrayRangeData arrayRange;
24};
25
26struct TextureInfoData {
27 enum Flag { Flag_SpecifyTextureLayout, Flag_SparseBinding, Flag_SparseResidency };
28
29 nn::util::BitPack8 flags;
30 Bit8 imageStorageDimension;
31 Bit16 tileMode;
32 uint16_t swizzle;
33 uint16_t mipCount;
34 uint16_t multisampleCount;
35 char reserved2[2];
36 Bit32 imageFormat;
37 Bit32 gpuAccessFlags;
38 uint32_t width;
39 uint32_t height;
40 uint32_t depth;
41 uint32_t arrayLength;
42 char textureLayout[8];
43 char reserved[20];
44};
45
46struct TextureViewInfoData {
47 Bit8 imageDimension;
48 Bit8 depthStencilTextureMode;
49 char reserved2[2];
50 Bit32 imageFormat;
51 Bit8 channelMapping[4];
52 char reserved3[4];
53 TextureSubresourceRangeData subresourceRange;
54 detail::Ptr<const void> pTexture;
55 char reserved[8];
56};
57
58struct ColorTargetViewInfoData {
59 Bit8 imageDimension;
60 char reserved2;
61 uint16_t mipLevel;
62 Bit32 imageFormat;
63 TextureArrayRangeData arrayRange;
64 detail::Ptr<const void> pTexture;
65 char reserved[16];
66};
67
68struct DepthStencilViewInfoData {
69 Bit8 imageDimension;
70 char reserved2;
71 uint16_t mipLevel;
72 char reserved3[4];
73 TextureArrayRangeData arrayRange;
74 detail::Ptr<const void> pTexture;
75 char reserved[16];
76};
77
78struct TextureSubresourceData {
79 uint16_t mipLevel;
80 char reserved[2];
81 uint32_t arrayIndex;
82};
83
84struct TextureCopyRegionData {
85 uint32_t offsetU;
86 uint32_t offsetV;
87 uint32_t offsetW;
88 uint32_t width;
89 uint32_t height;
90 uint32_t depth;
91 TextureSubresourceData subresource;
92 uint32_t arrayLength;
93};
94
95struct BufferTextureCopyRegionData {
96 uint32_t bufferOffset;
97 uint32_t bufferImageWidth;
98 uint32_t bufferImageHeight;
99 TextureCopyRegionData textureCopyRegion;
100};
101
102struct ImageFormatProperty {
103 Bit32 propertyFlags;
104};
105
106} // namespace nn::gfx