-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtexture.c3i
More file actions
161 lines (141 loc) · 3.49 KB
/
Copy pathtexture.c3i
File metadata and controls
161 lines (141 loc) · 3.49 KB
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
module webgpu;
distinct Texture = void*;
fn TextureView Texture.createView(Texture texture, TextureViewDescriptor* descriptor = null) @extern("wgpuTextureCreateView");
fn void Texture.destroy(Texture texture) @extern("wgpuTextureDestroy");
fn CUInt Texture.getDepthOrArrayLayers(Texture texture) @extern("wgpuTextureGetDepthOrArrayLayers");
fn TextureDimension Texture.getDimension(Texture texture) @extern("wgpuTextureGetDimension");
fn TextureFormat Texture.getFormat(Texture texture) @extern("wgpuTextureGetFormat");
fn CUInt Texture.getHeight(Texture texture) @extern("wgpuTextureGetHeight");
fn CUInt Texture.getMipLevelCount(Texture texture) @extern("wgpuTextureGetMipLevelCount");
fn CUInt Texture.getSampleCount(Texture texture) @extern("wgpuTextureGetSampleCount");
fn CUInt Texture.getWidth(Texture texture) @extern("wgpuTextureGetWidth");
fn void Texture.setLabel(Texture texture, ZString label) @extern("wgpuTextureSetLabel");
fn void Texture.reference(Texture texture) @extern("wgpuTextureReference");
fn void Texture.release(Texture texture) @extern("wgpuTextureRelease");
struct TextureDescriptor {
ChainedStruct* next;
ZString label;
TextureUsage usage;
TextureDimension dimension;
Extent3D size;
TextureFormat format;
CUInt mipLevelCount;
CUInt sampleCount;
usz viewFormatCount;
TextureFormat* viewFormats;
}
bitstruct TextureUsage: CInt {
bool copySource;
bool copyDestination;
bool textureBinding;
bool storageBinding;
bool renderAttachment;
}
enum TextureDimension {
DIMENSION_1D,
DIMENSION_2D,
DIMENSION_3D
}
enum TextureFormat {
UNDEFINED,
R8_UNORM,
R8_SNORM,
R8_UINT,
R8_SINT,
R16_UINT,
R16_SINT,
R16_FLOAT,
RG8_UNORM,
RG8_SNORM,
RG8_UINT,
RG8_SINT,
R32_FLOAT,
R32_UINT,
R32_SINT,
RG16_UINT,
RG16_SINT,
RG16_FLOAT,
RGBA8_UNORM,
RGBA8_UNORM_SRGB,
RGBA8_SNORM,
RGBA8_UINT,
RGBA8_SINT,
BGRA8_UNORM,
BGRA8_UNORM_SRGB,
RGB10_A2_UINT,
RGB10_A2_UNORM,
RG11_B10_UFLOAT,
RGB9_E5_UFLOAT,
RG32_FLOAT,
RG32_UINT,
RG32_SINT,
RGBA16_UINT,
RGBA16_SINT,
RGBA16_FLOAT,
RGBA32_FLOAT,
RGBA32_UINT,
RGBA32_SINT,
STENCIL8,
DEPTH16_UNORM,
DEPTH24_PLUS,
DEPTH24_PLUS_STENCIL8,
DEPTH32_FLOAT,
DEPTH32_FLOAT_STENCIL8,
BC1_RGBAUNORM,
BC1_RGBAUNORM_SRGB,
BC2_RGBAUNORM,
BC2_RGBAUNORM_SRGB,
BC3_RGBAUNORM,
B3_RGBAUNORM_SRGB,
BC4_RUNORM,
BC4_RSNORM,
BC5_RGUNORM,
BC5_RGSNORM,
BC6_HRGBUFLOAT,
BC6_HRGBFLOAT,
BC7_RGBAUNORM,
BC7_RGBAUNORM_SRGB,
ETC2_RGB8_UNORM,
ETC2_RGB8_UNORM_SRGB,
ETC2_RGB8_A1_UNORM,
ETC2_RGB8_A1_UNORM_SRGB,
ETC2_RGBA8_UNORM,
ETC2_RGBA8_UNORM_SRGB,
EACR11_UNORM,
EACR11_SNORM,
EACRG11_UNORM,
EACRG11_SNORM,
ASTC4X4_UNORM,
ASTC4X4_UNORM_SRGB,
ASTC5X4_UNORM,
ASTC5X4_UNORM_SRGB,
ASTC5X5_UNORM,
ASTC5X5_UNORM_SRGB,
ASTC6X5_UNORM,
ASTC6X5_UNORM_SRGB,
ASTC6X6_UNORM,
ASTC6X6_UNORM_SRGB,
ASTC8X5_UNORM,
ASTC8X5_UNORM_SRGB,
ASTC8X6_UNORM,
ASTC8X6_UNORM_SRGB,
ASTC8X8_UNORM,
ASTC8X8_UNORM_SRGB,
ASTC10X5_UNORM,
ASTC10X5_UNORM_SRGB,
ASTC10X6_UNORM,
ASTC10X6_UNORM_SRGB,
ASTC10X8_UNORM,
ASTC10X8_UNORM_SRGB,
ASTC10X10_UNORM,
ASTC10X10_UNORM_SRGB,
ASTC12X10_UNORM,
ASTC12X10_UNORM_SRGB,
ASTC12X12_UNORM,
ASTC12X12_UNORM_SRGB
}
enum TextureAspect {
ALL,
STENCIL_ONLY,
DEPTH_ONLY
}