@wasi-gfx/js-webgpu 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/canvas.d.ts +3 -3
- package/dist/canvas.js +36 -23
- package/dist/webgpu.d.ts +39 -12
- package/dist/webgpu.js +248 -42
- package/package.json +12 -6
- package/types/interfaces/wasi-cli-run.d.ts +2 -2
- package/types/interfaces/wasi-cli-stdout.d.ts +14 -3
- package/types/interfaces/wasi-cli-types.d.ts +15 -0
- package/types/interfaces/wasi-gfx-frame-buffer-frame-buffer.d.ts +13 -0
- package/types/interfaces/wasi-gfx-surface-surface-frame-buffer.d.ts +12 -0
- package/types/interfaces/wasi-gfx-surface-surface-webgpu.d.ts +29 -0
- package/types/interfaces/{wasi-surface-surface.d.ts → wasi-gfx-surface-surface.d.ts} +8 -18
- package/types/interfaces/wasi-webgpu-webgpu.d.ts +809 -810
- package/types/wit.d.ts +9 -10
- package/wit/deps/wasi-cli-0.3.0/package.wit +256 -0
- package/wit/deps/wasi-clocks-0.3.0/package.wit +43 -0
- package/wit/deps/wasi-filesystem-0.3.0/package.wit +149 -0
- package/wit/deps/wasi-gfx-frame-buffer-0.2.0/package.wit +13 -0
- package/wit/deps/{surface/surface.wit → wasi-gfx-surface-0.2.0/package.wit} +69 -44
- package/wit/deps/wasi-random-0.3.0/package.wit +18 -0
- package/wit/deps/wasi-sockets-0.3.0/package.wit +116 -0
- package/wit/deps/{webgpu/webgpu.wit → wasi-webgpu-0.3.0-rc.2/package.wit} +1007 -836
- package/wit/world.wit +8 -7
- package/types/interfaces/wasi-frame-buffer-frame-buffer.d.ts +0 -21
- package/types/interfaces/wasi-graphics-context-graphics-context.d.ts +0 -17
- package/types/interfaces/wasi-io-error.d.ts +0 -18
- package/types/interfaces/wasi-io-poll.d.ts +0 -43
- package/types/interfaces/wasi-io-streams.d.ts +0 -240
- package/wit/deps/cli/command.wit +0 -7
- package/wit/deps/cli/environment.wit +0 -18
- package/wit/deps/cli/exit.wit +0 -4
- package/wit/deps/cli/imports.wit +0 -20
- package/wit/deps/cli/run.wit +0 -4
- package/wit/deps/cli/stdio.wit +0 -17
- package/wit/deps/cli/terminal.wit +0 -49
- package/wit/deps/clocks/monotonic-clock.wit +0 -45
- package/wit/deps/clocks/wall-clock.wit +0 -42
- package/wit/deps/clocks/world.wit +0 -6
- package/wit/deps/filesystem/preopens.wit +0 -8
- package/wit/deps/filesystem/types.wit +0 -634
- package/wit/deps/filesystem/world.wit +0 -6
- package/wit/deps/frame-buffer/frame-buffer.wit +0 -23
- package/wit/deps/graphics-context/graphics-context.wit +0 -18
- package/wit/deps/io/error.wit +0 -34
- package/wit/deps/io/poll.wit +0 -41
- package/wit/deps/io/streams.wit +0 -262
- package/wit/deps/io/world.wit +0 -6
- package/wit/deps/random/insecure-seed.wit +0 -25
- package/wit/deps/random/insecure.wit +0 -22
- package/wit/deps/random/random.wit +0 -26
- package/wit/deps/random/world.wit +0 -7
- package/wit/deps/sockets/instance-network.wit +0 -9
- package/wit/deps/sockets/ip-name-lookup.wit +0 -51
- package/wit/deps/sockets/network.wit +0 -145
- package/wit/deps/sockets/tcp-create-socket.wit +0 -27
- package/wit/deps/sockets/tcp.wit +0 -353
- package/wit/deps/sockets/udp-create-socket.wit +0 -27
- package/wit/deps/sockets/udp.wit +0 -266
- package/wit/deps/sockets/world.wit +0 -11
- package/wit/deps/webgpu/imports.wit +0 -5
- package/wit/deps.lock +0 -51
- package/wit/deps.toml +0 -18
|
@@ -1,321 +1,330 @@
|
|
|
1
|
-
/** @module Interface wasi:webgpu/webgpu@0.0.
|
|
1
|
+
/** @module Interface wasi:webgpu/webgpu@0.3.0-rc.2 **/
|
|
2
2
|
export function getGpu(): Gpu;
|
|
3
|
-
export type
|
|
4
|
-
export
|
|
5
|
-
|
|
3
|
+
export type CreateQuerySetErrorKind = CreateQuerySetErrorKindTypeError;
|
|
4
|
+
export interface CreateQuerySetErrorKindTypeError {
|
|
5
|
+
tag: 'type-error',
|
|
6
|
+
}
|
|
7
|
+
export interface CreateQuerySetError {
|
|
8
|
+
kind: CreateQuerySetErrorKind,
|
|
9
|
+
message: string,
|
|
10
|
+
}
|
|
11
|
+
export type GetMappedRangeErrorKind = GetMappedRangeErrorKindOperationError | GetMappedRangeErrorKindRangeError | GetMappedRangeErrorKindTypeError;
|
|
12
|
+
export interface GetMappedRangeErrorKindOperationError {
|
|
13
|
+
tag: 'operation-error',
|
|
14
|
+
}
|
|
15
|
+
export interface GetMappedRangeErrorKindRangeError {
|
|
16
|
+
tag: 'range-error',
|
|
17
|
+
}
|
|
18
|
+
export interface GetMappedRangeErrorKindTypeError {
|
|
19
|
+
tag: 'type-error',
|
|
20
|
+
}
|
|
21
|
+
export interface GetMappedRangeError {
|
|
22
|
+
kind: GetMappedRangeErrorKind,
|
|
23
|
+
message: string,
|
|
24
|
+
}
|
|
6
25
|
/**
|
|
7
26
|
* # Variants
|
|
8
27
|
*
|
|
9
|
-
* ## `"
|
|
28
|
+
* ## `"clamp-to-edge"`
|
|
10
29
|
*
|
|
11
|
-
* ## `"
|
|
30
|
+
* ## `"repeat"`
|
|
31
|
+
*
|
|
32
|
+
* ## `"mirror-repeat"`
|
|
12
33
|
*/
|
|
13
|
-
export type
|
|
14
|
-
export interface GpuRequestAdapterOptions {
|
|
15
|
-
featureLevel?: string,
|
|
16
|
-
powerPreference?: GpuPowerPreference,
|
|
17
|
-
forceFallbackAdapter?: boolean,
|
|
18
|
-
xrCompatible?: boolean,
|
|
19
|
-
}
|
|
34
|
+
export type GpuAddressMode = 'clamp-to-edge' | 'repeat' | 'mirror-repeat';
|
|
20
35
|
/**
|
|
21
36
|
* # Variants
|
|
22
37
|
*
|
|
23
|
-
* ## `"
|
|
38
|
+
* ## `"zero"`
|
|
24
39
|
*
|
|
25
|
-
* ## `"
|
|
40
|
+
* ## `"one"`
|
|
26
41
|
*
|
|
27
|
-
* ## `"
|
|
42
|
+
* ## `"src"`
|
|
28
43
|
*
|
|
29
|
-
* ## `"
|
|
44
|
+
* ## `"one-minus-src"`
|
|
30
45
|
*
|
|
31
|
-
* ## `"
|
|
46
|
+
* ## `"src-alpha"`
|
|
32
47
|
*
|
|
33
|
-
* ## `"
|
|
48
|
+
* ## `"one-minus-src-alpha"`
|
|
34
49
|
*
|
|
35
|
-
* ## `"
|
|
50
|
+
* ## `"dst"`
|
|
36
51
|
*
|
|
37
|
-
* ## `"
|
|
52
|
+
* ## `"one-minus-dst"`
|
|
38
53
|
*
|
|
39
|
-
* ## `"
|
|
54
|
+
* ## `"dst-alpha"`
|
|
40
55
|
*
|
|
41
|
-
* ## `"
|
|
56
|
+
* ## `"one-minus-dst-alpha"`
|
|
42
57
|
*
|
|
43
|
-
* ## `"
|
|
58
|
+
* ## `"src-alpha-saturated"`
|
|
44
59
|
*
|
|
45
|
-
* ## `"
|
|
60
|
+
* ## `"constant"`
|
|
46
61
|
*
|
|
47
|
-
* ## `"
|
|
62
|
+
* ## `"one-minus-constant"`
|
|
48
63
|
*
|
|
49
|
-
* ## `"
|
|
64
|
+
* ## `"src1"`
|
|
50
65
|
*
|
|
51
|
-
* ## `"
|
|
66
|
+
* ## `"one-minus-src1"`
|
|
52
67
|
*
|
|
53
|
-
* ## `"
|
|
68
|
+
* ## `"src1-alpha"`
|
|
54
69
|
*
|
|
55
|
-
* ## `"
|
|
70
|
+
* ## `"one-minus-src1-alpha"`
|
|
56
71
|
*/
|
|
57
|
-
export type
|
|
72
|
+
export type GpuBlendFactor = 'zero' | 'one' | 'src' | 'one-minus-src' | 'src-alpha' | 'one-minus-src-alpha' | 'dst' | 'one-minus-dst' | 'dst-alpha' | 'one-minus-dst-alpha' | 'src-alpha-saturated' | 'constant' | 'one-minus-constant' | 'src1' | 'one-minus-src1' | 'src1-alpha' | 'one-minus-src1-alpha';
|
|
58
73
|
/**
|
|
59
74
|
* # Variants
|
|
60
75
|
*
|
|
61
|
-
* ## `"
|
|
76
|
+
* ## `"add"`
|
|
62
77
|
*
|
|
63
|
-
* ## `"
|
|
78
|
+
* ## `"subtract"`
|
|
64
79
|
*
|
|
65
|
-
* ## `"
|
|
80
|
+
* ## `"reverse-subtract"`
|
|
81
|
+
*
|
|
82
|
+
* ## `"min"`
|
|
83
|
+
*
|
|
84
|
+
* ## `"max"`
|
|
66
85
|
*/
|
|
67
|
-
export type
|
|
68
|
-
export
|
|
69
|
-
|
|
86
|
+
export type GpuBlendOperation = 'add' | 'subtract' | 'reverse-subtract' | 'min' | 'max';
|
|
87
|
+
export interface GpuBlendComponent {
|
|
88
|
+
operation?: GpuBlendOperation,
|
|
89
|
+
srcFactor?: GpuBlendFactor,
|
|
90
|
+
dstFactor?: GpuBlendFactor,
|
|
91
|
+
}
|
|
92
|
+
export interface GpuBlendState {
|
|
93
|
+
color: GpuBlendComponent,
|
|
94
|
+
alpha: GpuBlendComponent,
|
|
95
|
+
}
|
|
70
96
|
/**
|
|
71
97
|
* # Variants
|
|
72
98
|
*
|
|
73
|
-
* ## `"
|
|
99
|
+
* ## `"uniform"`
|
|
74
100
|
*
|
|
75
|
-
* ## `"
|
|
101
|
+
* ## `"storage"`
|
|
76
102
|
*
|
|
77
|
-
* ## `"
|
|
103
|
+
* ## `"read-only-storage"`
|
|
78
104
|
*/
|
|
79
|
-
export type
|
|
80
|
-
export type
|
|
105
|
+
export type GpuBufferBindingType = 'uniform' | 'storage' | 'read-only-storage';
|
|
106
|
+
export type GpuBufferDynamicOffset = number;
|
|
81
107
|
/**
|
|
82
108
|
* # Variants
|
|
83
109
|
*
|
|
84
|
-
* ## `"
|
|
85
|
-
*
|
|
86
|
-
* ## `"d2"`
|
|
110
|
+
* ## `"unmapped"`
|
|
87
111
|
*
|
|
88
|
-
* ## `"
|
|
112
|
+
* ## `"pending"`
|
|
89
113
|
*
|
|
90
|
-
* ## `"
|
|
114
|
+
* ## `"mapped"`
|
|
115
|
+
*/
|
|
116
|
+
export type GpuBufferMapState = 'unmapped' | 'pending' | 'mapped';
|
|
117
|
+
export interface GpuBufferUsage {
|
|
118
|
+
mapRead?: boolean,
|
|
119
|
+
mapWrite?: boolean,
|
|
120
|
+
copySrc?: boolean,
|
|
121
|
+
copyDst?: boolean,
|
|
122
|
+
index?: boolean,
|
|
123
|
+
vertex?: boolean,
|
|
124
|
+
uniform?: boolean,
|
|
125
|
+
storage?: boolean,
|
|
126
|
+
indirect?: boolean,
|
|
127
|
+
queryResolve?: boolean,
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* # Variants
|
|
91
131
|
*
|
|
92
|
-
* ## `"
|
|
132
|
+
* ## `"opaque"`
|
|
93
133
|
*
|
|
94
|
-
* ## `"
|
|
134
|
+
* ## `"premultiplied"`
|
|
95
135
|
*/
|
|
96
|
-
export type
|
|
136
|
+
export type GpuCanvasAlphaMode = 'opaque' | 'premultiplied';
|
|
97
137
|
/**
|
|
98
138
|
* # Variants
|
|
99
139
|
*
|
|
100
|
-
* ## `"
|
|
101
|
-
*
|
|
102
|
-
* ## `"stencil-only"`
|
|
140
|
+
* ## `"standard"`
|
|
103
141
|
*
|
|
104
|
-
* ## `"
|
|
142
|
+
* ## `"extended"`
|
|
105
143
|
*/
|
|
106
|
-
export type
|
|
144
|
+
export type GpuCanvasToneMappingMode = 'standard' | 'extended';
|
|
145
|
+
export interface GpuCanvasToneMapping {
|
|
146
|
+
mode?: GpuCanvasToneMappingMode,
|
|
147
|
+
}
|
|
148
|
+
export interface GpuColor {
|
|
149
|
+
r: number,
|
|
150
|
+
g: number,
|
|
151
|
+
b: number,
|
|
152
|
+
a: number,
|
|
153
|
+
}
|
|
154
|
+
export interface GpuColorWrite {
|
|
155
|
+
red?: boolean,
|
|
156
|
+
green?: boolean,
|
|
157
|
+
blue?: boolean,
|
|
158
|
+
alpha?: boolean,
|
|
159
|
+
all?: boolean,
|
|
160
|
+
}
|
|
161
|
+
export interface GpuCommandBufferDescriptor {
|
|
162
|
+
label?: string,
|
|
163
|
+
}
|
|
164
|
+
export interface GpuCommandEncoderDescriptor {
|
|
165
|
+
label?: string,
|
|
166
|
+
}
|
|
107
167
|
/**
|
|
108
168
|
* # Variants
|
|
109
169
|
*
|
|
110
|
-
* ## `"
|
|
170
|
+
* ## `"never"`
|
|
111
171
|
*
|
|
112
|
-
* ## `"
|
|
172
|
+
* ## `"less"`
|
|
113
173
|
*
|
|
114
|
-
* ## `"
|
|
174
|
+
* ## `"equal"`
|
|
115
175
|
*
|
|
116
|
-
* ## `"
|
|
176
|
+
* ## `"less-equal"`
|
|
117
177
|
*
|
|
118
|
-
* ## `"
|
|
178
|
+
* ## `"greater"`
|
|
119
179
|
*
|
|
120
|
-
* ## `"
|
|
180
|
+
* ## `"not-equal"`
|
|
121
181
|
*
|
|
122
|
-
* ## `"
|
|
182
|
+
* ## `"greater-equal"`
|
|
123
183
|
*
|
|
124
|
-
* ## `"
|
|
184
|
+
* ## `"always"`
|
|
185
|
+
*/
|
|
186
|
+
export type GpuCompareFunction = 'never' | 'less' | 'equal' | 'less-equal' | 'greater' | 'not-equal' | 'greater-equal' | 'always';
|
|
187
|
+
/**
|
|
188
|
+
* # Variants
|
|
125
189
|
*
|
|
126
|
-
* ## `"
|
|
190
|
+
* ## `"error"`
|
|
127
191
|
*
|
|
128
|
-
* ## `"
|
|
192
|
+
* ## `"warning"`
|
|
129
193
|
*
|
|
130
|
-
* ## `"
|
|
194
|
+
* ## `"info"`
|
|
195
|
+
*/
|
|
196
|
+
export type GpuCompilationMessageType = 'error' | 'warning' | 'info';
|
|
197
|
+
/**
|
|
198
|
+
* # Variants
|
|
131
199
|
*
|
|
132
|
-
* ## `"
|
|
200
|
+
* ## `"none"`
|
|
133
201
|
*
|
|
134
|
-
* ## `"
|
|
202
|
+
* ## `"front"`
|
|
135
203
|
*
|
|
136
|
-
* ## `"
|
|
204
|
+
* ## `"back"`
|
|
205
|
+
*/
|
|
206
|
+
export type GpuCullMode = 'none' | 'front' | 'back';
|
|
207
|
+
export type GpuDepthBias = number;
|
|
208
|
+
/**
|
|
209
|
+
* # Variants
|
|
137
210
|
*
|
|
138
|
-
* ## `"
|
|
211
|
+
* ## `"unknown"`
|
|
139
212
|
*
|
|
140
|
-
* ## `"
|
|
213
|
+
* ## `"destroyed"`
|
|
214
|
+
*/
|
|
215
|
+
export type GpuDeviceLostReason = 'unknown' | 'destroyed';
|
|
216
|
+
/**
|
|
217
|
+
* # Variants
|
|
141
218
|
*
|
|
142
|
-
* ## `"
|
|
219
|
+
* ## `"validation"`
|
|
143
220
|
*
|
|
144
|
-
* ## `"
|
|
221
|
+
* ## `"out-of-memory"`
|
|
145
222
|
*
|
|
146
|
-
* ## `"
|
|
223
|
+
* ## `"internal"`
|
|
224
|
+
*/
|
|
225
|
+
export type GpuErrorFilter = 'validation' | 'out-of-memory' | 'internal';
|
|
226
|
+
export type GpuErrorKind = GpuErrorKindValidationError | GpuErrorKindOutOfMemoryError | GpuErrorKindInternalError;
|
|
227
|
+
export interface GpuErrorKindValidationError {
|
|
228
|
+
tag: 'validation-error',
|
|
229
|
+
}
|
|
230
|
+
export interface GpuErrorKindOutOfMemoryError {
|
|
231
|
+
tag: 'out-of-memory-error',
|
|
232
|
+
}
|
|
233
|
+
export interface GpuErrorKindInternalError {
|
|
234
|
+
tag: 'internal-error',
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* # Variants
|
|
147
238
|
*
|
|
148
|
-
* ## `"
|
|
239
|
+
* ## `"core-features-and-limits"`
|
|
149
240
|
*
|
|
150
|
-
* ## `"
|
|
241
|
+
* ## `"depth-clip-control"`
|
|
151
242
|
*
|
|
152
|
-
* ## `"
|
|
243
|
+
* ## `"depth32float-stencil8"`
|
|
153
244
|
*
|
|
154
|
-
* ## `"
|
|
245
|
+
* ## `"texture-compression-bc"`
|
|
155
246
|
*
|
|
156
|
-
* ## `"
|
|
247
|
+
* ## `"texture-compression-bc-sliced3d"`
|
|
157
248
|
*
|
|
158
|
-
* ## `"
|
|
249
|
+
* ## `"texture-compression-etc2"`
|
|
159
250
|
*
|
|
160
|
-
* ## `"
|
|
251
|
+
* ## `"texture-compression-astc"`
|
|
161
252
|
*
|
|
162
|
-
* ## `"
|
|
253
|
+
* ## `"texture-compression-astc-sliced3d"`
|
|
163
254
|
*
|
|
164
|
-
* ## `"
|
|
255
|
+
* ## `"timestamp-query"`
|
|
165
256
|
*
|
|
166
|
-
* ## `"
|
|
257
|
+
* ## `"indirect-first-instance"`
|
|
167
258
|
*
|
|
168
|
-
* ## `"
|
|
259
|
+
* ## `"shader-f16"`
|
|
169
260
|
*
|
|
170
|
-
* ## `"
|
|
261
|
+
* ## `"rg11b10ufloat-renderable"`
|
|
171
262
|
*
|
|
172
|
-
* ## `"
|
|
263
|
+
* ## `"bgra8unorm-storage"`
|
|
173
264
|
*
|
|
174
|
-
* ## `"
|
|
265
|
+
* ## `"float32-filterable"`
|
|
175
266
|
*
|
|
176
|
-
* ## `"
|
|
267
|
+
* ## `"float32-blendable"`
|
|
177
268
|
*
|
|
178
|
-
* ## `"
|
|
269
|
+
* ## `"clip-distances"`
|
|
179
270
|
*
|
|
180
|
-
* ## `"
|
|
271
|
+
* ## `"dual-source-blending"`
|
|
181
272
|
*
|
|
182
|
-
* ## `"
|
|
273
|
+
* ## `"subgroups"`
|
|
183
274
|
*
|
|
184
|
-
* ## `"
|
|
275
|
+
* ## `"texture-formats-tier1"`
|
|
185
276
|
*
|
|
186
|
-
* ## `"
|
|
277
|
+
* ## `"texture-formats-tier2"`
|
|
187
278
|
*
|
|
188
|
-
* ## `"
|
|
279
|
+
* ## `"primitive-index"`
|
|
189
280
|
*
|
|
190
|
-
* ## `"
|
|
281
|
+
* ## `"texture-component-swizzle"`
|
|
282
|
+
*/
|
|
283
|
+
export type GpuFeatureName = 'core-features-and-limits' | 'depth-clip-control' | 'depth32float-stencil8' | 'texture-compression-bc' | 'texture-compression-bc-sliced3d' | 'texture-compression-etc2' | 'texture-compression-astc' | 'texture-compression-astc-sliced3d' | 'timestamp-query' | 'indirect-first-instance' | 'shader-f16' | 'rg11b10ufloat-renderable' | 'bgra8unorm-storage' | 'float32-filterable' | 'float32-blendable' | 'clip-distances' | 'dual-source-blending' | 'subgroups' | 'texture-formats-tier1' | 'texture-formats-tier2' | 'primitive-index' | 'texture-component-swizzle';
|
|
284
|
+
/**
|
|
285
|
+
* # Variants
|
|
191
286
|
*
|
|
192
|
-
* ## `"
|
|
193
|
-
*
|
|
194
|
-
* ## `"depth32float-stencil8"`
|
|
195
|
-
*
|
|
196
|
-
* ## `"bc1-rgba-unorm"`
|
|
197
|
-
*
|
|
198
|
-
* ## `"bc1-rgba-unorm-srgb"`
|
|
199
|
-
*
|
|
200
|
-
* ## `"bc2-rgba-unorm"`
|
|
201
|
-
*
|
|
202
|
-
* ## `"bc2-rgba-unorm-srgb"`
|
|
203
|
-
*
|
|
204
|
-
* ## `"bc3-rgba-unorm"`
|
|
205
|
-
*
|
|
206
|
-
* ## `"bc3-rgba-unorm-srgb"`
|
|
207
|
-
*
|
|
208
|
-
* ## `"bc4-r-unorm"`
|
|
209
|
-
*
|
|
210
|
-
* ## `"bc4-r-snorm"`
|
|
211
|
-
*
|
|
212
|
-
* ## `"bc5-rg-unorm"`
|
|
213
|
-
*
|
|
214
|
-
* ## `"bc5-rg-snorm"`
|
|
215
|
-
*
|
|
216
|
-
* ## `"bc6h-rgb-ufloat"`
|
|
217
|
-
*
|
|
218
|
-
* ## `"bc6h-rgb-float"`
|
|
219
|
-
*
|
|
220
|
-
* ## `"bc7-rgba-unorm"`
|
|
221
|
-
*
|
|
222
|
-
* ## `"bc7-rgba-unorm-srgb"`
|
|
223
|
-
*
|
|
224
|
-
* ## `"etc2-rgb8unorm"`
|
|
225
|
-
*
|
|
226
|
-
* ## `"etc2-rgb8unorm-srgb"`
|
|
227
|
-
*
|
|
228
|
-
* ## `"etc2-rgb8a1unorm"`
|
|
229
|
-
*
|
|
230
|
-
* ## `"etc2-rgb8a1unorm-srgb"`
|
|
231
|
-
*
|
|
232
|
-
* ## `"etc2-rgba8unorm"`
|
|
233
|
-
*
|
|
234
|
-
* ## `"etc2-rgba8unorm-srgb"`
|
|
235
|
-
*
|
|
236
|
-
* ## `"eac-r11unorm"`
|
|
237
|
-
*
|
|
238
|
-
* ## `"eac-r11snorm"`
|
|
239
|
-
*
|
|
240
|
-
* ## `"eac-rg11unorm"`
|
|
241
|
-
*
|
|
242
|
-
* ## `"eac-rg11snorm"`
|
|
243
|
-
*
|
|
244
|
-
* ## `"astc4x4-unorm"`
|
|
245
|
-
*
|
|
246
|
-
* ## `"astc4x4-unorm-srgb"`
|
|
247
|
-
*
|
|
248
|
-
* ## `"astc5x4-unorm"`
|
|
249
|
-
*
|
|
250
|
-
* ## `"astc5x4-unorm-srgb"`
|
|
251
|
-
*
|
|
252
|
-
* ## `"astc5x5-unorm"`
|
|
253
|
-
*
|
|
254
|
-
* ## `"astc5x5-unorm-srgb"`
|
|
255
|
-
*
|
|
256
|
-
* ## `"astc6x5-unorm"`
|
|
257
|
-
*
|
|
258
|
-
* ## `"astc6x5-unorm-srgb"`
|
|
259
|
-
*
|
|
260
|
-
* ## `"astc6x6-unorm"`
|
|
261
|
-
*
|
|
262
|
-
* ## `"astc6x6-unorm-srgb"`
|
|
263
|
-
*
|
|
264
|
-
* ## `"astc8x5-unorm"`
|
|
265
|
-
*
|
|
266
|
-
* ## `"astc8x5-unorm-srgb"`
|
|
267
|
-
*
|
|
268
|
-
* ## `"astc8x6-unorm"`
|
|
269
|
-
*
|
|
270
|
-
* ## `"astc8x6-unorm-srgb"`
|
|
271
|
-
*
|
|
272
|
-
* ## `"astc8x8-unorm"`
|
|
273
|
-
*
|
|
274
|
-
* ## `"astc8x8-unorm-srgb"`
|
|
275
|
-
*
|
|
276
|
-
* ## `"astc10x5-unorm"`
|
|
277
|
-
*
|
|
278
|
-
* ## `"astc10x5-unorm-srgb"`
|
|
279
|
-
*
|
|
280
|
-
* ## `"astc10x6-unorm"`
|
|
281
|
-
*
|
|
282
|
-
* ## `"astc10x6-unorm-srgb"`
|
|
283
|
-
*
|
|
284
|
-
* ## `"astc10x8-unorm"`
|
|
285
|
-
*
|
|
286
|
-
* ## `"astc10x8-unorm-srgb"`
|
|
287
|
-
*
|
|
288
|
-
* ## `"astc10x10-unorm"`
|
|
289
|
-
*
|
|
290
|
-
* ## `"astc10x10-unorm-srgb"`
|
|
291
|
-
*
|
|
292
|
-
* ## `"astc12x10-unorm"`
|
|
287
|
+
* ## `"nearest"`
|
|
293
288
|
*
|
|
294
|
-
* ## `"
|
|
289
|
+
* ## `"linear"`
|
|
290
|
+
*/
|
|
291
|
+
export type GpuFilterMode = 'nearest' | 'linear';
|
|
292
|
+
/**
|
|
293
|
+
* # Variants
|
|
295
294
|
*
|
|
296
|
-
* ## `"
|
|
295
|
+
* ## `"ccw"`
|
|
297
296
|
*
|
|
298
|
-
* ## `"
|
|
297
|
+
* ## `"cw"`
|
|
299
298
|
*/
|
|
300
|
-
export type
|
|
299
|
+
export type GpuFrontFace = 'ccw' | 'cw';
|
|
301
300
|
/**
|
|
302
301
|
* # Variants
|
|
303
302
|
*
|
|
304
|
-
* ## `"
|
|
305
|
-
*
|
|
306
|
-
* ## `"repeat"`
|
|
303
|
+
* ## `"uint16"`
|
|
307
304
|
*
|
|
308
|
-
* ## `"
|
|
305
|
+
* ## `"uint32"`
|
|
309
306
|
*/
|
|
310
|
-
export type
|
|
307
|
+
export type GpuIndexFormat = 'uint16' | 'uint32';
|
|
308
|
+
export type GpuIndex32 = number;
|
|
309
|
+
export type GpuIntegerCoordinate = number;
|
|
310
|
+
export interface GpuExtent3D {
|
|
311
|
+
width: GpuIntegerCoordinate,
|
|
312
|
+
height?: GpuIntegerCoordinate,
|
|
313
|
+
depthOrArrayLayers?: GpuIntegerCoordinate,
|
|
314
|
+
}
|
|
315
|
+
export type GpuIntegerCoordinateOut = number;
|
|
311
316
|
/**
|
|
312
317
|
* # Variants
|
|
313
318
|
*
|
|
314
|
-
* ## `"
|
|
319
|
+
* ## `"load"`
|
|
315
320
|
*
|
|
316
|
-
* ## `"
|
|
321
|
+
* ## `"clear"`
|
|
317
322
|
*/
|
|
318
|
-
export type
|
|
323
|
+
export type GpuLoadOp = 'load' | 'clear';
|
|
324
|
+
export interface GpuMapMode {
|
|
325
|
+
read?: boolean,
|
|
326
|
+
write?: boolean,
|
|
327
|
+
}
|
|
319
328
|
/**
|
|
320
329
|
* # Variants
|
|
321
330
|
*
|
|
@@ -324,50 +333,87 @@ export type GpuFilterMode = 'nearest' | 'linear';
|
|
|
324
333
|
* ## `"linear"`
|
|
325
334
|
*/
|
|
326
335
|
export type GpuMipmapFilterMode = 'nearest' | 'linear';
|
|
336
|
+
export interface GpuOrigin3D {
|
|
337
|
+
x?: GpuIntegerCoordinate,
|
|
338
|
+
y?: GpuIntegerCoordinate,
|
|
339
|
+
z?: GpuIntegerCoordinate,
|
|
340
|
+
}
|
|
341
|
+
export type GpuPipelineConstantValue = number;
|
|
327
342
|
/**
|
|
328
343
|
* # Variants
|
|
329
344
|
*
|
|
330
|
-
* ## `"
|
|
345
|
+
* ## `"validation"`
|
|
331
346
|
*
|
|
332
|
-
* ## `"
|
|
347
|
+
* ## `"internal"`
|
|
348
|
+
*/
|
|
349
|
+
export type GpuPipelineErrorReason = 'validation' | 'internal';
|
|
350
|
+
export type CreatePipelineErrorKind = CreatePipelineErrorKindGpuPipelineError;
|
|
351
|
+
export interface CreatePipelineErrorKindGpuPipelineError {
|
|
352
|
+
tag: 'gpu-pipeline-error',
|
|
353
|
+
val: GpuPipelineErrorReason,
|
|
354
|
+
}
|
|
355
|
+
export interface CreatePipelineError {
|
|
356
|
+
kind: CreatePipelineErrorKind,
|
|
357
|
+
message: string,
|
|
358
|
+
}
|
|
359
|
+
export type GpuLayoutMode = GpuLayoutModeSpecific | GpuLayoutModeAuto;
|
|
360
|
+
export interface GpuLayoutModeSpecific {
|
|
361
|
+
tag: 'specific',
|
|
362
|
+
val: GpuPipelineLayout,
|
|
363
|
+
}
|
|
364
|
+
export interface GpuLayoutModeAuto {
|
|
365
|
+
tag: 'auto',
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* # Variants
|
|
333
369
|
*
|
|
334
|
-
* ## `"
|
|
370
|
+
* ## `"low-power"`
|
|
335
371
|
*
|
|
336
|
-
* ## `"
|
|
372
|
+
* ## `"high-performance"`
|
|
373
|
+
*/
|
|
374
|
+
export type GpuPowerPreference = 'low-power' | 'high-performance';
|
|
375
|
+
/**
|
|
376
|
+
* # Variants
|
|
337
377
|
*
|
|
338
|
-
* ## `"
|
|
378
|
+
* ## `"point-list"`
|
|
339
379
|
*
|
|
340
|
-
* ## `"
|
|
380
|
+
* ## `"line-list"`
|
|
341
381
|
*
|
|
342
|
-
* ## `"
|
|
382
|
+
* ## `"line-strip"`
|
|
343
383
|
*
|
|
344
|
-
* ## `"
|
|
384
|
+
* ## `"triangle-list"`
|
|
385
|
+
*
|
|
386
|
+
* ## `"triangle-strip"`
|
|
345
387
|
*/
|
|
346
|
-
export type
|
|
347
|
-
export interface
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
mipmapFilter?: GpuMipmapFilterMode,
|
|
354
|
-
lodMinClamp?: number,
|
|
355
|
-
lodMaxClamp?: number,
|
|
356
|
-
compare?: GpuCompareFunction,
|
|
357
|
-
maxAnisotropy?: number,
|
|
358
|
-
label?: string,
|
|
388
|
+
export type GpuPrimitiveTopology = 'point-list' | 'line-list' | 'line-strip' | 'triangle-list' | 'triangle-strip';
|
|
389
|
+
export interface GpuPrimitiveState {
|
|
390
|
+
topology?: GpuPrimitiveTopology,
|
|
391
|
+
stripIndexFormat?: GpuIndexFormat,
|
|
392
|
+
frontFace?: GpuFrontFace,
|
|
393
|
+
cullMode?: GpuCullMode,
|
|
394
|
+
unclippedDepth?: boolean,
|
|
359
395
|
}
|
|
360
|
-
export type GpuShaderStageFlags = number;
|
|
361
396
|
/**
|
|
362
397
|
* # Variants
|
|
363
398
|
*
|
|
364
|
-
* ## `"
|
|
365
|
-
*
|
|
366
|
-
* ## `"storage"`
|
|
399
|
+
* ## `"occlusion"`
|
|
367
400
|
*
|
|
368
|
-
* ## `"
|
|
401
|
+
* ## `"timestamp"`
|
|
369
402
|
*/
|
|
370
|
-
export type
|
|
403
|
+
export type GpuQueryType = 'occlusion' | 'timestamp';
|
|
404
|
+
export interface GpuQueueDescriptor {
|
|
405
|
+
label?: string,
|
|
406
|
+
}
|
|
407
|
+
export interface GpuRenderBundleDescriptor {
|
|
408
|
+
label?: string,
|
|
409
|
+
}
|
|
410
|
+
export interface GpuRequestAdapterOptions {
|
|
411
|
+
featureLevel?: string,
|
|
412
|
+
powerPreference?: GpuPowerPreference,
|
|
413
|
+
forceFallbackAdapter?: boolean,
|
|
414
|
+
xrCompatible?: boolean,
|
|
415
|
+
}
|
|
416
|
+
export type GpuSampleMask = number;
|
|
371
417
|
/**
|
|
372
418
|
* # Variants
|
|
373
419
|
*
|
|
@@ -381,25 +427,110 @@ export type GpuSamplerBindingType = 'filtering' | 'non-filtering' | 'comparison'
|
|
|
381
427
|
export interface GpuSamplerBindingLayout {
|
|
382
428
|
type?: GpuSamplerBindingType,
|
|
383
429
|
}
|
|
430
|
+
export interface GpuSamplerDescriptor {
|
|
431
|
+
addressModeU?: GpuAddressMode,
|
|
432
|
+
addressModeV?: GpuAddressMode,
|
|
433
|
+
addressModeW?: GpuAddressMode,
|
|
434
|
+
magFilter?: GpuFilterMode,
|
|
435
|
+
minFilter?: GpuFilterMode,
|
|
436
|
+
mipmapFilter?: GpuMipmapFilterMode,
|
|
437
|
+
lodMinClamp?: number,
|
|
438
|
+
lodMaxClamp?: number,
|
|
439
|
+
compare?: GpuCompareFunction,
|
|
440
|
+
maxAnisotropy?: number,
|
|
441
|
+
label?: string,
|
|
442
|
+
}
|
|
443
|
+
export interface GpuShaderModuleCompilationHint {
|
|
444
|
+
entryPoint: string,
|
|
445
|
+
layout?: GpuLayoutMode,
|
|
446
|
+
}
|
|
447
|
+
export interface GpuShaderModuleDescriptor {
|
|
448
|
+
code: string,
|
|
449
|
+
compilationHints?: Array<GpuShaderModuleCompilationHint>,
|
|
450
|
+
label?: string,
|
|
451
|
+
}
|
|
452
|
+
export interface GpuShaderStage {
|
|
453
|
+
vertex?: boolean,
|
|
454
|
+
fragment?: boolean,
|
|
455
|
+
compute?: boolean,
|
|
456
|
+
}
|
|
457
|
+
export type GpuSignedOffset32 = number;
|
|
458
|
+
export type GpuSize32 = number;
|
|
459
|
+
export interface GpuComputePassTimestampWrites {
|
|
460
|
+
querySet: GpuQuerySet,
|
|
461
|
+
beginningOfPassWriteIndex?: GpuSize32,
|
|
462
|
+
endOfPassWriteIndex?: GpuSize32,
|
|
463
|
+
}
|
|
464
|
+
export interface GpuComputePassDescriptor {
|
|
465
|
+
timestampWrites?: GpuComputePassTimestampWrites,
|
|
466
|
+
label?: string,
|
|
467
|
+
}
|
|
468
|
+
export interface GpuMultisampleState {
|
|
469
|
+
count?: GpuSize32,
|
|
470
|
+
mask?: GpuSampleMask,
|
|
471
|
+
alphaToCoverageEnabled?: boolean,
|
|
472
|
+
}
|
|
473
|
+
export interface GpuPipelineLayoutDescriptor {
|
|
474
|
+
bindGroupLayouts: Array<GpuBindGroupLayout | undefined>,
|
|
475
|
+
immediateSize?: GpuSize32,
|
|
476
|
+
label?: string,
|
|
477
|
+
}
|
|
478
|
+
export interface GpuQuerySetDescriptor {
|
|
479
|
+
type: GpuQueryType,
|
|
480
|
+
count: GpuSize32,
|
|
481
|
+
label?: string,
|
|
482
|
+
}
|
|
483
|
+
export interface GpuRenderPassTimestampWrites {
|
|
484
|
+
querySet: GpuQuerySet,
|
|
485
|
+
beginningOfPassWriteIndex?: GpuSize32,
|
|
486
|
+
endOfPassWriteIndex?: GpuSize32,
|
|
487
|
+
}
|
|
488
|
+
export type GpuSize32Out = number;
|
|
489
|
+
export type GpuSize64 = bigint;
|
|
490
|
+
export interface GpuBufferBinding {
|
|
491
|
+
buffer: GpuBuffer,
|
|
492
|
+
offset?: GpuSize64,
|
|
493
|
+
size?: GpuSize64,
|
|
494
|
+
}
|
|
495
|
+
export interface GpuBufferBindingLayout {
|
|
496
|
+
type?: GpuBufferBindingType,
|
|
497
|
+
hasDynamicOffset?: boolean,
|
|
498
|
+
minBindingSize?: GpuSize64,
|
|
499
|
+
}
|
|
500
|
+
export interface GpuBufferDescriptor {
|
|
501
|
+
size: GpuSize64,
|
|
502
|
+
usage: GpuBufferUsage,
|
|
503
|
+
mappedAtCreation?: boolean,
|
|
504
|
+
label?: string,
|
|
505
|
+
}
|
|
506
|
+
export type GpuSize64Out = bigint;
|
|
384
507
|
/**
|
|
385
508
|
* # Variants
|
|
386
509
|
*
|
|
387
|
-
* ## `"
|
|
510
|
+
* ## `"keep"`
|
|
388
511
|
*
|
|
389
|
-
* ## `"
|
|
512
|
+
* ## `"zero"`
|
|
390
513
|
*
|
|
391
|
-
* ## `"
|
|
514
|
+
* ## `"replace"`
|
|
392
515
|
*
|
|
393
|
-
* ## `"
|
|
516
|
+
* ## `"invert"`
|
|
394
517
|
*
|
|
395
|
-
* ## `"
|
|
518
|
+
* ## `"increment-clamp"`
|
|
519
|
+
*
|
|
520
|
+
* ## `"decrement-clamp"`
|
|
521
|
+
*
|
|
522
|
+
* ## `"increment-wrap"`
|
|
523
|
+
*
|
|
524
|
+
* ## `"decrement-wrap"`
|
|
396
525
|
*/
|
|
397
|
-
export type
|
|
398
|
-
export interface
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
526
|
+
export type GpuStencilOperation = 'keep' | 'zero' | 'replace' | 'invert' | 'increment-clamp' | 'decrement-clamp' | 'increment-wrap' | 'decrement-wrap';
|
|
527
|
+
export interface GpuStencilFaceState {
|
|
528
|
+
compare?: GpuCompareFunction,
|
|
529
|
+
failOp?: GpuStencilOperation,
|
|
530
|
+
depthFailOp?: GpuStencilOperation,
|
|
531
|
+
passOp?: GpuStencilOperation,
|
|
402
532
|
}
|
|
533
|
+
export type GpuStencilValue = number;
|
|
403
534
|
/**
|
|
404
535
|
* # Variants
|
|
405
536
|
*
|
|
@@ -410,395 +541,262 @@ export interface GpuTextureBindingLayout {
|
|
|
410
541
|
* ## `"read-write"`
|
|
411
542
|
*/
|
|
412
543
|
export type GpuStorageTextureAccess = 'write-only' | 'read-only' | 'read-write';
|
|
413
|
-
export interface GpuStorageTextureBindingLayout {
|
|
414
|
-
access?: GpuStorageTextureAccess,
|
|
415
|
-
format: GpuTextureFormat,
|
|
416
|
-
viewDimension?: GpuTextureViewDimension,
|
|
417
|
-
}
|
|
418
|
-
export interface GpuPipelineLayoutDescriptor {
|
|
419
|
-
bindGroupLayouts: Array<GpuBindGroupLayout | undefined>,
|
|
420
|
-
label?: string,
|
|
421
|
-
}
|
|
422
544
|
/**
|
|
423
545
|
* # Variants
|
|
424
546
|
*
|
|
425
|
-
* ## `"
|
|
426
|
-
*
|
|
427
|
-
* ## `"warning"`
|
|
547
|
+
* ## `"store"`
|
|
428
548
|
*
|
|
429
|
-
* ## `"
|
|
549
|
+
* ## `"discard"`
|
|
430
550
|
*/
|
|
431
|
-
export type
|
|
551
|
+
export type GpuStoreOp = 'store' | 'discard';
|
|
552
|
+
export interface GpuTexelCopyBufferInfo {
|
|
553
|
+
buffer: GpuBuffer,
|
|
554
|
+
offset?: GpuSize64,
|
|
555
|
+
bytesPerRow?: GpuSize32,
|
|
556
|
+
rowsPerImage?: GpuSize32,
|
|
557
|
+
}
|
|
558
|
+
export interface GpuTexelCopyBufferLayout {
|
|
559
|
+
offset?: GpuSize64,
|
|
560
|
+
bytesPerRow?: GpuSize32,
|
|
561
|
+
rowsPerImage?: GpuSize32,
|
|
562
|
+
}
|
|
432
563
|
/**
|
|
433
564
|
* # Variants
|
|
434
565
|
*
|
|
435
|
-
* ## `"
|
|
566
|
+
* ## `"all"`
|
|
436
567
|
*
|
|
437
|
-
* ## `"
|
|
568
|
+
* ## `"stencil-only"`
|
|
569
|
+
*
|
|
570
|
+
* ## `"depth-only"`
|
|
438
571
|
*/
|
|
439
|
-
export type
|
|
440
|
-
export
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
export interface GpuLayoutModeAuto {
|
|
446
|
-
tag: 'auto',
|
|
447
|
-
}
|
|
448
|
-
export interface GpuShaderModuleCompilationHint {
|
|
449
|
-
entryPoint: string,
|
|
450
|
-
layout?: GpuLayoutMode,
|
|
451
|
-
}
|
|
452
|
-
export interface GpuShaderModuleDescriptor {
|
|
453
|
-
code: string,
|
|
454
|
-
compilationHints?: Array<GpuShaderModuleCompilationHint>,
|
|
455
|
-
label?: string,
|
|
456
|
-
}
|
|
457
|
-
export interface GpuProgrammableStage {
|
|
458
|
-
module: GpuShaderModule,
|
|
459
|
-
entryPoint?: string,
|
|
460
|
-
constants?: RecordGpuPipelineConstantValue,
|
|
461
|
-
}
|
|
462
|
-
export type GpuPipelineConstantValue = number;
|
|
463
|
-
export interface GpuComputePipelineDescriptor {
|
|
464
|
-
compute: GpuProgrammableStage,
|
|
465
|
-
layout: GpuLayoutMode,
|
|
466
|
-
label?: string,
|
|
572
|
+
export type GpuTextureAspect = 'all' | 'stencil-only' | 'depth-only';
|
|
573
|
+
export interface GpuTexelCopyTextureInfo {
|
|
574
|
+
texture: GpuTexture,
|
|
575
|
+
mipLevel?: GpuIntegerCoordinate,
|
|
576
|
+
origin?: GpuOrigin3D,
|
|
577
|
+
aspect?: GpuTextureAspect,
|
|
467
578
|
}
|
|
468
579
|
/**
|
|
469
580
|
* # Variants
|
|
470
581
|
*
|
|
471
|
-
* ## `"
|
|
472
|
-
*
|
|
473
|
-
* ## `"line-list"`
|
|
474
|
-
*
|
|
475
|
-
* ## `"line-strip"`
|
|
582
|
+
* ## `"d1"`
|
|
476
583
|
*
|
|
477
|
-
* ## `"
|
|
584
|
+
* ## `"d2"`
|
|
478
585
|
*
|
|
479
|
-
* ## `"
|
|
586
|
+
* ## `"d3"`
|
|
480
587
|
*/
|
|
481
|
-
export type
|
|
588
|
+
export type GpuTextureDimension = 'd1' | 'd2' | 'd3';
|
|
482
589
|
/**
|
|
483
590
|
* # Variants
|
|
484
591
|
*
|
|
485
|
-
* ## `"
|
|
592
|
+
* ## `"r8unorm"`
|
|
486
593
|
*
|
|
487
|
-
* ## `"
|
|
488
|
-
*/
|
|
489
|
-
export type GpuFrontFace = 'ccw' | 'cw';
|
|
490
|
-
/**
|
|
491
|
-
* # Variants
|
|
594
|
+
* ## `"r8snorm"`
|
|
492
595
|
*
|
|
493
|
-
* ## `"
|
|
596
|
+
* ## `"r8uint"`
|
|
494
597
|
*
|
|
495
|
-
* ## `"
|
|
598
|
+
* ## `"r8sint"`
|
|
496
599
|
*
|
|
497
|
-
* ## `"
|
|
498
|
-
*/
|
|
499
|
-
export type GpuCullMode = 'none' | 'front' | 'back';
|
|
500
|
-
export type GpuColorWriteFlags = number;
|
|
501
|
-
/**
|
|
502
|
-
* # Variants
|
|
600
|
+
* ## `"r16unorm"`
|
|
503
601
|
*
|
|
504
|
-
* ## `"
|
|
602
|
+
* ## `"r16snorm"`
|
|
505
603
|
*
|
|
506
|
-
* ## `"
|
|
604
|
+
* ## `"r16uint"`
|
|
507
605
|
*
|
|
508
|
-
* ## `"
|
|
606
|
+
* ## `"r16sint"`
|
|
509
607
|
*
|
|
510
|
-
* ## `"
|
|
608
|
+
* ## `"r16float"`
|
|
511
609
|
*
|
|
512
|
-
* ## `"
|
|
610
|
+
* ## `"rg8unorm"`
|
|
513
611
|
*
|
|
514
|
-
* ## `"
|
|
612
|
+
* ## `"rg8snorm"`
|
|
515
613
|
*
|
|
516
|
-
* ## `"
|
|
614
|
+
* ## `"rg8uint"`
|
|
517
615
|
*
|
|
518
|
-
* ## `"
|
|
616
|
+
* ## `"rg8sint"`
|
|
617
|
+
*
|
|
618
|
+
* ## `"r32uint"`
|
|
619
|
+
*
|
|
620
|
+
* ## `"r32sint"`
|
|
621
|
+
*
|
|
622
|
+
* ## `"r32float"`
|
|
623
|
+
*
|
|
624
|
+
* ## `"rg16unorm"`
|
|
519
625
|
*
|
|
520
|
-
* ## `"
|
|
626
|
+
* ## `"rg16snorm"`
|
|
521
627
|
*
|
|
522
|
-
* ## `"
|
|
628
|
+
* ## `"rg16uint"`
|
|
523
629
|
*
|
|
524
|
-
* ## `"
|
|
630
|
+
* ## `"rg16sint"`
|
|
525
631
|
*
|
|
526
|
-
* ## `"
|
|
632
|
+
* ## `"rg16float"`
|
|
527
633
|
*
|
|
528
|
-
* ## `"
|
|
634
|
+
* ## `"rgba8unorm"`
|
|
529
635
|
*
|
|
530
|
-
* ## `"
|
|
636
|
+
* ## `"rgba8unorm-srgb"`
|
|
531
637
|
*
|
|
532
|
-
* ## `"
|
|
638
|
+
* ## `"rgba8snorm"`
|
|
533
639
|
*
|
|
534
|
-
* ## `"
|
|
640
|
+
* ## `"rgba8uint"`
|
|
535
641
|
*
|
|
536
|
-
* ## `"
|
|
537
|
-
*/
|
|
538
|
-
export type GpuBlendFactor = 'zero' | 'one' | 'src' | 'one-minus-src' | 'src-alpha' | 'one-minus-src-alpha' | 'dst' | 'one-minus-dst' | 'dst-alpha' | 'one-minus-dst-alpha' | 'src-alpha-saturated' | 'constant' | 'one-minus-constant' | 'src1' | 'one-minus-src1' | 'src1-alpha' | 'one-minus-src1-alpha';
|
|
539
|
-
/**
|
|
540
|
-
* # Variants
|
|
642
|
+
* ## `"rgba8sint"`
|
|
541
643
|
*
|
|
542
|
-
* ## `"
|
|
644
|
+
* ## `"bgra8unorm"`
|
|
543
645
|
*
|
|
544
|
-
* ## `"
|
|
646
|
+
* ## `"bgra8unorm-srgb"`
|
|
545
647
|
*
|
|
546
|
-
* ## `"
|
|
648
|
+
* ## `"rgb9e5ufloat"`
|
|
547
649
|
*
|
|
548
|
-
* ## `"
|
|
650
|
+
* ## `"rgb10a2uint"`
|
|
549
651
|
*
|
|
550
|
-
* ## `"
|
|
551
|
-
*/
|
|
552
|
-
export type GpuBlendOperation = 'add' | 'subtract' | 'reverse-subtract' | 'min' | 'max';
|
|
553
|
-
export interface GpuBlendComponent {
|
|
554
|
-
operation?: GpuBlendOperation,
|
|
555
|
-
srcFactor?: GpuBlendFactor,
|
|
556
|
-
dstFactor?: GpuBlendFactor,
|
|
557
|
-
}
|
|
558
|
-
export interface GpuBlendState {
|
|
559
|
-
color: GpuBlendComponent,
|
|
560
|
-
alpha: GpuBlendComponent,
|
|
561
|
-
}
|
|
562
|
-
export interface GpuColorTargetState {
|
|
563
|
-
format: GpuTextureFormat,
|
|
564
|
-
blend?: GpuBlendState,
|
|
565
|
-
writeMask?: GpuColorWriteFlags,
|
|
566
|
-
}
|
|
567
|
-
export interface GpuFragmentState {
|
|
568
|
-
targets: Array<GpuColorTargetState | undefined>,
|
|
569
|
-
module: GpuShaderModule,
|
|
570
|
-
entryPoint?: string,
|
|
571
|
-
constants?: RecordGpuPipelineConstantValue,
|
|
572
|
-
}
|
|
573
|
-
/**
|
|
574
|
-
* # Variants
|
|
652
|
+
* ## `"rgb10a2unorm"`
|
|
575
653
|
*
|
|
576
|
-
* ## `"
|
|
654
|
+
* ## `"rg11b10ufloat"`
|
|
577
655
|
*
|
|
578
|
-
* ## `"
|
|
656
|
+
* ## `"rg32uint"`
|
|
579
657
|
*
|
|
580
|
-
* ## `"
|
|
658
|
+
* ## `"rg32sint"`
|
|
581
659
|
*
|
|
582
|
-
* ## `"
|
|
660
|
+
* ## `"rg32float"`
|
|
583
661
|
*
|
|
584
|
-
* ## `"
|
|
662
|
+
* ## `"rgba16unorm"`
|
|
585
663
|
*
|
|
586
|
-
* ## `"
|
|
664
|
+
* ## `"rgba16snorm"`
|
|
587
665
|
*
|
|
588
|
-
* ## `"
|
|
666
|
+
* ## `"rgba16uint"`
|
|
589
667
|
*
|
|
590
|
-
* ## `"
|
|
591
|
-
*/
|
|
592
|
-
export type GpuStencilOperation = 'keep' | 'zero' | 'replace' | 'invert' | 'increment-clamp' | 'decrement-clamp' | 'increment-wrap' | 'decrement-wrap';
|
|
593
|
-
export interface GpuStencilFaceState {
|
|
594
|
-
compare?: GpuCompareFunction,
|
|
595
|
-
failOp?: GpuStencilOperation,
|
|
596
|
-
depthFailOp?: GpuStencilOperation,
|
|
597
|
-
passOp?: GpuStencilOperation,
|
|
598
|
-
}
|
|
599
|
-
/**
|
|
600
|
-
* # Variants
|
|
668
|
+
* ## `"rgba16sint"`
|
|
601
669
|
*
|
|
602
|
-
* ## `"
|
|
670
|
+
* ## `"rgba16float"`
|
|
603
671
|
*
|
|
604
|
-
* ## `"
|
|
605
|
-
*/
|
|
606
|
-
export type GpuIndexFormat = 'uint16' | 'uint32';
|
|
607
|
-
export interface GpuPrimitiveState {
|
|
608
|
-
topology?: GpuPrimitiveTopology,
|
|
609
|
-
stripIndexFormat?: GpuIndexFormat,
|
|
610
|
-
frontFace?: GpuFrontFace,
|
|
611
|
-
cullMode?: GpuCullMode,
|
|
612
|
-
unclippedDepth?: boolean,
|
|
613
|
-
}
|
|
614
|
-
/**
|
|
615
|
-
* # Variants
|
|
672
|
+
* ## `"rgba32uint"`
|
|
616
673
|
*
|
|
617
|
-
* ## `"
|
|
674
|
+
* ## `"rgba32sint"`
|
|
618
675
|
*
|
|
619
|
-
* ## `"
|
|
676
|
+
* ## `"rgba32float"`
|
|
620
677
|
*
|
|
621
|
-
* ## `"
|
|
678
|
+
* ## `"stencil8"`
|
|
622
679
|
*
|
|
623
|
-
* ## `"
|
|
680
|
+
* ## `"depth16unorm"`
|
|
624
681
|
*
|
|
625
|
-
* ## `"
|
|
682
|
+
* ## `"depth24plus"`
|
|
626
683
|
*
|
|
627
|
-
* ## `"
|
|
684
|
+
* ## `"depth24plus-stencil8"`
|
|
628
685
|
*
|
|
629
|
-
* ## `"
|
|
686
|
+
* ## `"depth32float"`
|
|
630
687
|
*
|
|
631
|
-
* ## `"
|
|
688
|
+
* ## `"depth32float-stencil8"`
|
|
632
689
|
*
|
|
633
|
-
* ## `"
|
|
690
|
+
* ## `"bc1-rgba-unorm"`
|
|
634
691
|
*
|
|
635
|
-
* ## `"
|
|
692
|
+
* ## `"bc1-rgba-unorm-srgb"`
|
|
636
693
|
*
|
|
637
|
-
* ## `"
|
|
694
|
+
* ## `"bc2-rgba-unorm"`
|
|
638
695
|
*
|
|
639
|
-
* ## `"
|
|
696
|
+
* ## `"bc2-rgba-unorm-srgb"`
|
|
640
697
|
*
|
|
641
|
-
* ## `"
|
|
698
|
+
* ## `"bc3-rgba-unorm"`
|
|
642
699
|
*
|
|
643
|
-
* ## `"
|
|
700
|
+
* ## `"bc3-rgba-unorm-srgb"`
|
|
644
701
|
*
|
|
645
|
-
* ## `"
|
|
702
|
+
* ## `"bc4-r-unorm"`
|
|
646
703
|
*
|
|
647
|
-
* ## `"
|
|
704
|
+
* ## `"bc4-r-snorm"`
|
|
648
705
|
*
|
|
649
|
-
* ## `"
|
|
706
|
+
* ## `"bc5-rg-unorm"`
|
|
650
707
|
*
|
|
651
|
-
* ## `"
|
|
708
|
+
* ## `"bc5-rg-snorm"`
|
|
652
709
|
*
|
|
653
|
-
* ## `"
|
|
710
|
+
* ## `"bc6h-rgb-ufloat"`
|
|
654
711
|
*
|
|
655
|
-
* ## `"
|
|
712
|
+
* ## `"bc6h-rgb-float"`
|
|
656
713
|
*
|
|
657
|
-
* ## `"
|
|
714
|
+
* ## `"bc7-rgba-unorm"`
|
|
658
715
|
*
|
|
659
|
-
* ## `"
|
|
716
|
+
* ## `"bc7-rgba-unorm-srgb"`
|
|
660
717
|
*
|
|
661
|
-
* ## `"
|
|
718
|
+
* ## `"etc2-rgb8unorm"`
|
|
662
719
|
*
|
|
663
|
-
* ## `"
|
|
720
|
+
* ## `"etc2-rgb8unorm-srgb"`
|
|
664
721
|
*
|
|
665
|
-
* ## `"
|
|
722
|
+
* ## `"etc2-rgb8a1unorm"`
|
|
666
723
|
*
|
|
667
|
-
* ## `"
|
|
724
|
+
* ## `"etc2-rgb8a1unorm-srgb"`
|
|
668
725
|
*
|
|
669
|
-
* ## `"
|
|
726
|
+
* ## `"etc2-rgba8unorm"`
|
|
670
727
|
*
|
|
671
|
-
* ## `"
|
|
728
|
+
* ## `"etc2-rgba8unorm-srgb"`
|
|
672
729
|
*
|
|
673
|
-
* ## `"
|
|
730
|
+
* ## `"eac-r11unorm"`
|
|
674
731
|
*
|
|
675
|
-
* ## `"
|
|
732
|
+
* ## `"eac-r11snorm"`
|
|
676
733
|
*
|
|
677
|
-
* ## `"
|
|
734
|
+
* ## `"eac-rg11unorm"`
|
|
678
735
|
*
|
|
679
|
-
* ## `"
|
|
736
|
+
* ## `"eac-rg11snorm"`
|
|
680
737
|
*
|
|
681
|
-
* ## `"
|
|
738
|
+
* ## `"astc4x4-unorm"`
|
|
682
739
|
*
|
|
683
|
-
* ## `"
|
|
740
|
+
* ## `"astc4x4-unorm-srgb"`
|
|
684
741
|
*
|
|
685
|
-
* ## `"
|
|
742
|
+
* ## `"astc5x4-unorm"`
|
|
686
743
|
*
|
|
687
|
-
* ## `"
|
|
744
|
+
* ## `"astc5x4-unorm-srgb"`
|
|
688
745
|
*
|
|
689
|
-
* ## `"
|
|
746
|
+
* ## `"astc5x5-unorm"`
|
|
690
747
|
*
|
|
691
|
-
* ## `"
|
|
748
|
+
* ## `"astc5x5-unorm-srgb"`
|
|
692
749
|
*
|
|
693
|
-
* ## `"
|
|
750
|
+
* ## `"astc6x5-unorm"`
|
|
694
751
|
*
|
|
695
|
-
* ## `"
|
|
752
|
+
* ## `"astc6x5-unorm-srgb"`
|
|
696
753
|
*
|
|
697
|
-
* ## `"
|
|
698
|
-
*/
|
|
699
|
-
export type GpuVertexFormat = 'uint8' | 'uint8x2' | 'uint8x4' | 'sint8' | 'sint8x2' | 'sint8x4' | 'unorm8' | 'unorm8x2' | 'unorm8x4' | 'snorm8' | 'snorm8x2' | 'snorm8x4' | 'uint16' | 'uint16x2' | 'uint16x4' | 'sint16' | 'sint16x2' | 'sint16x4' | 'unorm16' | 'unorm16x2' | 'unorm16x4' | 'snorm16' | 'snorm16x2' | 'snorm16x4' | 'float16' | 'float16x2' | 'float16x4' | 'float32' | 'float32x2' | 'float32x3' | 'float32x4' | 'uint32' | 'uint32x2' | 'uint32x3' | 'uint32x4' | 'sint32' | 'sint32x2' | 'sint32x3' | 'sint32x4' | 'unorm1010102' | 'unorm8x4-bgra';
|
|
700
|
-
/**
|
|
701
|
-
* # Variants
|
|
754
|
+
* ## `"astc6x6-unorm"`
|
|
702
755
|
*
|
|
703
|
-
* ## `"
|
|
756
|
+
* ## `"astc6x6-unorm-srgb"`
|
|
704
757
|
*
|
|
705
|
-
* ## `"
|
|
706
|
-
*/
|
|
707
|
-
export type GpuVertexStepMode = 'vertex' | 'instance';
|
|
708
|
-
export interface GpuCommandBufferDescriptor {
|
|
709
|
-
label?: string,
|
|
710
|
-
}
|
|
711
|
-
export interface GpuCommandEncoderDescriptor {
|
|
712
|
-
label?: string,
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
* # Variants
|
|
758
|
+
* ## `"astc8x5-unorm"`
|
|
716
759
|
*
|
|
717
|
-
* ## `"
|
|
760
|
+
* ## `"astc8x5-unorm-srgb"`
|
|
718
761
|
*
|
|
719
|
-
* ## `"
|
|
720
|
-
*/
|
|
721
|
-
export type GpuLoadOp = 'load' | 'clear';
|
|
722
|
-
/**
|
|
723
|
-
* # Variants
|
|
762
|
+
* ## `"astc8x6-unorm"`
|
|
724
763
|
*
|
|
725
|
-
* ## `"
|
|
764
|
+
* ## `"astc8x6-unorm-srgb"`
|
|
726
765
|
*
|
|
727
|
-
* ## `"
|
|
728
|
-
*/
|
|
729
|
-
export type GpuStoreOp = 'store' | 'discard';
|
|
730
|
-
export interface GpuRenderBundleDescriptor {
|
|
731
|
-
label?: string,
|
|
732
|
-
}
|
|
733
|
-
export interface GpuQueueDescriptor {
|
|
734
|
-
label?: string,
|
|
735
|
-
}
|
|
736
|
-
export interface GpuDeviceDescriptor {
|
|
737
|
-
requiredFeatures?: Array<GpuFeatureName>,
|
|
738
|
-
requiredLimits?: RecordOptionGpuSize64,
|
|
739
|
-
defaultQueue?: GpuQueueDescriptor,
|
|
740
|
-
label?: string,
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* # Variants
|
|
766
|
+
* ## `"astc8x8-unorm"`
|
|
744
767
|
*
|
|
745
|
-
* ## `"
|
|
768
|
+
* ## `"astc8x8-unorm-srgb"`
|
|
746
769
|
*
|
|
747
|
-
* ## `"
|
|
748
|
-
*/
|
|
749
|
-
export type GpuQueryType = 'occlusion' | 'timestamp';
|
|
750
|
-
/**
|
|
751
|
-
* # Variants
|
|
770
|
+
* ## `"astc10x5-unorm"`
|
|
752
771
|
*
|
|
753
|
-
* ## `"
|
|
772
|
+
* ## `"astc10x5-unorm-srgb"`
|
|
754
773
|
*
|
|
755
|
-
* ## `"
|
|
756
|
-
*/
|
|
757
|
-
export type GpuCanvasAlphaMode = 'opaque' | 'premultiplied';
|
|
758
|
-
/**
|
|
759
|
-
* # Variants
|
|
774
|
+
* ## `"astc10x6-unorm"`
|
|
760
775
|
*
|
|
761
|
-
* ## `"
|
|
776
|
+
* ## `"astc10x6-unorm-srgb"`
|
|
762
777
|
*
|
|
763
|
-
* ## `"
|
|
764
|
-
*/
|
|
765
|
-
export type GpuCanvasToneMappingMode = 'standard' | 'extended';
|
|
766
|
-
export interface GpuCanvasToneMapping {
|
|
767
|
-
mode?: GpuCanvasToneMappingMode,
|
|
768
|
-
}
|
|
769
|
-
/**
|
|
770
|
-
* # Variants
|
|
778
|
+
* ## `"astc10x8-unorm"`
|
|
771
779
|
*
|
|
772
|
-
* ## `"
|
|
780
|
+
* ## `"astc10x8-unorm-srgb"`
|
|
773
781
|
*
|
|
774
|
-
* ## `"
|
|
775
|
-
*/
|
|
776
|
-
export type GpuDeviceLostReason = 'unknown' | 'destroyed';
|
|
777
|
-
/**
|
|
778
|
-
* # Variants
|
|
782
|
+
* ## `"astc10x10-unorm"`
|
|
779
783
|
*
|
|
780
|
-
* ## `"
|
|
784
|
+
* ## `"astc10x10-unorm-srgb"`
|
|
781
785
|
*
|
|
782
|
-
* ## `"
|
|
786
|
+
* ## `"astc12x10-unorm"`
|
|
783
787
|
*
|
|
784
|
-
* ## `"
|
|
788
|
+
* ## `"astc12x10-unorm-srgb"`
|
|
789
|
+
*
|
|
790
|
+
* ## `"astc12x12-unorm"`
|
|
791
|
+
*
|
|
792
|
+
* ## `"astc12x12-unorm-srgb"`
|
|
785
793
|
*/
|
|
786
|
-
export type
|
|
787
|
-
export
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
depthClearValue?: number,
|
|
792
|
-
depthLoadOp?: GpuLoadOp,
|
|
793
|
-
depthStoreOp?: GpuStoreOp,
|
|
794
|
-
depthReadOnly?: boolean,
|
|
795
|
-
stencilClearValue?: GpuStencilValue,
|
|
796
|
-
stencilLoadOp?: GpuLoadOp,
|
|
797
|
-
stencilStoreOp?: GpuStoreOp,
|
|
798
|
-
stencilReadOnly?: boolean,
|
|
794
|
+
export type GpuTextureFormat = 'r8unorm' | 'r8snorm' | 'r8uint' | 'r8sint' | 'r16unorm' | 'r16snorm' | 'r16uint' | 'r16sint' | 'r16float' | 'rg8unorm' | 'rg8snorm' | 'rg8uint' | 'rg8sint' | 'r32uint' | 'r32sint' | 'r32float' | 'rg16unorm' | 'rg16snorm' | 'rg16uint' | 'rg16sint' | 'rg16float' | 'rgba8unorm' | 'rgba8unorm-srgb' | 'rgba8snorm' | 'rgba8uint' | 'rgba8sint' | 'bgra8unorm' | 'bgra8unorm-srgb' | 'rgb9e5ufloat' | 'rgb10a2uint' | 'rgb10a2unorm' | 'rg11b10ufloat' | 'rg32uint' | 'rg32sint' | 'rg32float' | 'rgba16unorm' | 'rgba16snorm' | 'rgba16uint' | 'rgba16sint' | 'rgba16float' | 'rgba32uint' | 'rgba32sint' | 'rgba32float' | 'stencil8' | 'depth16unorm' | 'depth24plus' | 'depth24plus-stencil8' | 'depth32float' | 'depth32float-stencil8' | 'bc1-rgba-unorm' | 'bc1-rgba-unorm-srgb' | 'bc2-rgba-unorm' | 'bc2-rgba-unorm-srgb' | 'bc3-rgba-unorm' | 'bc3-rgba-unorm-srgb' | 'bc4-r-unorm' | 'bc4-r-snorm' | 'bc5-rg-unorm' | 'bc5-rg-snorm' | 'bc6h-rgb-ufloat' | 'bc6h-rgb-float' | 'bc7-rgba-unorm' | 'bc7-rgba-unorm-srgb' | 'etc2-rgb8unorm' | 'etc2-rgb8unorm-srgb' | 'etc2-rgb8a1unorm' | 'etc2-rgb8a1unorm-srgb' | 'etc2-rgba8unorm' | 'etc2-rgba8unorm-srgb' | 'eac-r11unorm' | 'eac-r11snorm' | 'eac-rg11unorm' | 'eac-rg11snorm' | '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';
|
|
795
|
+
export interface GpuColorTargetState {
|
|
796
|
+
format: GpuTextureFormat,
|
|
797
|
+
blend?: GpuBlendState,
|
|
798
|
+
writeMask?: GpuColorWrite,
|
|
799
799
|
}
|
|
800
|
-
export type GpuSampleMask = number;
|
|
801
|
-
export type GpuDepthBias = number;
|
|
802
800
|
export interface GpuDepthStencilState {
|
|
803
801
|
format: GpuTextureFormat,
|
|
804
802
|
depthWriteEnabled?: boolean,
|
|
@@ -811,24 +809,41 @@ export interface GpuDepthStencilState {
|
|
|
811
809
|
depthBiasSlopeScale?: number,
|
|
812
810
|
depthBiasClamp?: number,
|
|
813
811
|
}
|
|
814
|
-
export
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
812
|
+
export interface GpuRenderBundleEncoderDescriptor {
|
|
813
|
+
depthReadOnly?: boolean,
|
|
814
|
+
stencilReadOnly?: boolean,
|
|
815
|
+
colorFormats: Array<GpuTextureFormat | undefined>,
|
|
816
|
+
depthStencilFormat?: GpuTextureFormat,
|
|
817
|
+
sampleCount?: GpuSize32,
|
|
819
818
|
label?: string,
|
|
820
819
|
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
820
|
+
/**
|
|
821
|
+
* # Variants
|
|
822
|
+
*
|
|
823
|
+
* ## `"float"`
|
|
824
|
+
*
|
|
825
|
+
* ## `"unfilterable-float"`
|
|
826
|
+
*
|
|
827
|
+
* ## `"depth"`
|
|
828
|
+
*
|
|
829
|
+
* ## `"sint"`
|
|
830
|
+
*
|
|
831
|
+
* ## `"uint"`
|
|
832
|
+
*/
|
|
833
|
+
export type GpuTextureSampleType = 'float' | 'unfilterable-float' | 'depth' | 'sint' | 'uint';
|
|
834
|
+
export interface GpuTextureUsage {
|
|
835
|
+
copySrc?: boolean,
|
|
836
|
+
copyDst?: boolean,
|
|
837
|
+
textureBinding?: boolean,
|
|
838
|
+
storageBinding?: boolean,
|
|
839
|
+
renderAttachment?: boolean,
|
|
840
|
+
transientAttachment?: boolean,
|
|
841
|
+
}
|
|
842
|
+
export type GpuBindingResource = GpuBindingResourceGpuBuffer | GpuBindingResourceGpuBufferBinding | GpuBindingResourceGpuSampler | GpuBindingResourceGpuTexture | GpuBindingResourceGpuTextureView;
|
|
843
|
+
export interface GpuBindingResourceGpuBuffer {
|
|
844
|
+
tag: 'gpu-buffer',
|
|
845
|
+
val: GpuBuffer,
|
|
830
846
|
}
|
|
831
|
-
export type GpuBindingResource = GpuBindingResourceGpuBufferBinding | GpuBindingResourceGpuSampler | GpuBindingResourceGpuTextureView;
|
|
832
847
|
export interface GpuBindingResourceGpuBufferBinding {
|
|
833
848
|
tag: 'gpu-buffer-binding',
|
|
834
849
|
val: GpuBufferBinding,
|
|
@@ -837,35 +852,14 @@ export interface GpuBindingResourceGpuSampler {
|
|
|
837
852
|
tag: 'gpu-sampler',
|
|
838
853
|
val: GpuSampler,
|
|
839
854
|
}
|
|
855
|
+
export interface GpuBindingResourceGpuTexture {
|
|
856
|
+
tag: 'gpu-texture',
|
|
857
|
+
val: GpuTexture,
|
|
858
|
+
}
|
|
840
859
|
export interface GpuBindingResourceGpuTextureView {
|
|
841
860
|
tag: 'gpu-texture-view',
|
|
842
861
|
val: GpuTextureView,
|
|
843
862
|
}
|
|
844
|
-
export type GpuIntegerCoordinate = number;
|
|
845
|
-
export interface GpuTextureViewDescriptor {
|
|
846
|
-
format?: GpuTextureFormat,
|
|
847
|
-
dimension?: GpuTextureViewDimension,
|
|
848
|
-
usage?: GpuTextureUsageFlags,
|
|
849
|
-
aspect?: GpuTextureAspect,
|
|
850
|
-
baseMipLevel?: GpuIntegerCoordinate,
|
|
851
|
-
mipLevelCount?: GpuIntegerCoordinate,
|
|
852
|
-
baseArrayLayer?: GpuIntegerCoordinate,
|
|
853
|
-
arrayLayerCount?: GpuIntegerCoordinate,
|
|
854
|
-
label?: string,
|
|
855
|
-
}
|
|
856
|
-
export type GpuIndex32 = number;
|
|
857
|
-
export interface GpuBindGroupLayoutEntry {
|
|
858
|
-
binding: GpuIndex32,
|
|
859
|
-
visibility: GpuShaderStageFlags,
|
|
860
|
-
buffer?: GpuBufferBindingLayout,
|
|
861
|
-
sampler?: GpuSamplerBindingLayout,
|
|
862
|
-
texture?: GpuTextureBindingLayout,
|
|
863
|
-
storageTexture?: GpuStorageTextureBindingLayout,
|
|
864
|
-
}
|
|
865
|
-
export interface GpuBindGroupLayoutDescriptor {
|
|
866
|
-
entries: Array<GpuBindGroupLayoutEntry>,
|
|
867
|
-
label?: string,
|
|
868
|
-
}
|
|
869
863
|
export interface GpuBindGroupEntry {
|
|
870
864
|
binding: GpuIndex32,
|
|
871
865
|
resource: GpuBindingResource,
|
|
@@ -875,127 +869,219 @@ export interface GpuBindGroupDescriptor {
|
|
|
875
869
|
entries: Array<GpuBindGroupEntry>,
|
|
876
870
|
label?: string,
|
|
877
871
|
}
|
|
878
|
-
export interface
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
stepMode?: GpuVertexStepMode,
|
|
886
|
-
attributes: Array<GpuVertexAttribute>,
|
|
887
|
-
}
|
|
888
|
-
export interface GpuVertexState {
|
|
889
|
-
buffers?: Array<GpuVertexBufferLayout | undefined>,
|
|
890
|
-
module: GpuShaderModule,
|
|
891
|
-
entryPoint?: string,
|
|
892
|
-
constants?: RecordGpuPipelineConstantValue,
|
|
872
|
+
export interface GpuRenderPassColorAttachment {
|
|
873
|
+
view: GpuTextureView,
|
|
874
|
+
depthSlice?: GpuIntegerCoordinate,
|
|
875
|
+
resolveTarget?: GpuTextureView,
|
|
876
|
+
clearValue?: GpuColor,
|
|
877
|
+
loadOp: GpuLoadOp,
|
|
878
|
+
storeOp: GpuStoreOp,
|
|
893
879
|
}
|
|
894
|
-
export
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
880
|
+
export interface GpuRenderPassDepthStencilAttachment {
|
|
881
|
+
view: GpuTextureView,
|
|
882
|
+
depthClearValue?: number,
|
|
883
|
+
depthLoadOp?: GpuLoadOp,
|
|
884
|
+
depthStoreOp?: GpuStoreOp,
|
|
885
|
+
depthReadOnly?: boolean,
|
|
886
|
+
stencilClearValue?: GpuStencilValue,
|
|
887
|
+
stencilLoadOp?: GpuLoadOp,
|
|
888
|
+
stencilStoreOp?: GpuStoreOp,
|
|
889
|
+
stencilReadOnly?: boolean,
|
|
899
890
|
}
|
|
900
|
-
export interface
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
layout: GpuLayoutMode,
|
|
891
|
+
export interface GpuRenderPassDescriptor {
|
|
892
|
+
colorAttachments: Array<GpuRenderPassColorAttachment | undefined>,
|
|
893
|
+
depthStencilAttachment?: GpuRenderPassDepthStencilAttachment,
|
|
894
|
+
occlusionQuerySet?: GpuQuerySet,
|
|
895
|
+
timestampWrites?: GpuRenderPassTimestampWrites,
|
|
896
|
+
maxDrawCount?: GpuSize64,
|
|
907
897
|
label?: string,
|
|
908
898
|
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
899
|
+
/**
|
|
900
|
+
* # Variants
|
|
901
|
+
*
|
|
902
|
+
* ## `"d1"`
|
|
903
|
+
*
|
|
904
|
+
* ## `"d2"`
|
|
905
|
+
*
|
|
906
|
+
* ## `"d2-array"`
|
|
907
|
+
*
|
|
908
|
+
* ## `"cube"`
|
|
909
|
+
*
|
|
910
|
+
* ## `"cube-array"`
|
|
911
|
+
*
|
|
912
|
+
* ## `"d3"`
|
|
913
|
+
*/
|
|
914
|
+
export type GpuTextureViewDimension = 'd1' | 'd2' | 'd2-array' | 'cube' | 'cube-array' | 'd3';
|
|
915
|
+
export interface GpuStorageTextureBindingLayout {
|
|
916
|
+
access?: GpuStorageTextureAccess,
|
|
917
|
+
format: GpuTextureFormat,
|
|
918
|
+
viewDimension?: GpuTextureViewDimension,
|
|
913
919
|
}
|
|
914
|
-
export interface
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
rowsPerImage?: GpuSize32,
|
|
920
|
+
export interface GpuTextureBindingLayout {
|
|
921
|
+
sampleType?: GpuTextureSampleType,
|
|
922
|
+
viewDimension?: GpuTextureViewDimension,
|
|
923
|
+
multisampled?: boolean,
|
|
919
924
|
}
|
|
920
|
-
export interface
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
925
|
+
export interface GpuBindGroupLayoutEntry {
|
|
926
|
+
binding: GpuIndex32,
|
|
927
|
+
visibility: GpuShaderStage,
|
|
928
|
+
buffer?: GpuBufferBindingLayout,
|
|
929
|
+
sampler?: GpuSamplerBindingLayout,
|
|
930
|
+
texture?: GpuTextureBindingLayout,
|
|
931
|
+
storageTexture?: GpuStorageTextureBindingLayout,
|
|
924
932
|
}
|
|
925
|
-
export interface
|
|
926
|
-
|
|
933
|
+
export interface GpuBindGroupLayoutDescriptor {
|
|
934
|
+
entries: Array<GpuBindGroupLayoutEntry>,
|
|
927
935
|
label?: string,
|
|
928
936
|
}
|
|
929
|
-
export interface
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
endOfPassWriteIndex?: GpuSize32,
|
|
933
|
-
}
|
|
934
|
-
export interface GpuRenderBundleEncoderDescriptor {
|
|
935
|
-
depthReadOnly?: boolean,
|
|
936
|
-
stencilReadOnly?: boolean,
|
|
937
|
-
colorFormats: Array<GpuTextureFormat | undefined>,
|
|
938
|
-
depthStencilFormat?: GpuTextureFormat,
|
|
937
|
+
export interface GpuTextureDescriptor {
|
|
938
|
+
size: GpuExtent3D,
|
|
939
|
+
mipLevelCount?: GpuIntegerCoordinate,
|
|
939
940
|
sampleCount?: GpuSize32,
|
|
941
|
+
dimension?: GpuTextureDimension,
|
|
942
|
+
format: GpuTextureFormat,
|
|
943
|
+
usage: GpuTextureUsage,
|
|
944
|
+
viewFormats?: Array<GpuTextureFormat>,
|
|
945
|
+
textureBindingViewDimension?: GpuTextureViewDimension,
|
|
940
946
|
label?: string,
|
|
941
947
|
}
|
|
942
|
-
export interface
|
|
943
|
-
|
|
944
|
-
|
|
948
|
+
export interface GpuTextureViewDescriptor {
|
|
949
|
+
format?: GpuTextureFormat,
|
|
950
|
+
dimension?: GpuTextureViewDimension,
|
|
951
|
+
usage?: GpuTextureUsage,
|
|
952
|
+
aspect?: GpuTextureAspect,
|
|
953
|
+
baseMipLevel?: GpuIntegerCoordinate,
|
|
954
|
+
mipLevelCount?: GpuIntegerCoordinate,
|
|
955
|
+
baseArrayLayer?: GpuIntegerCoordinate,
|
|
956
|
+
arrayLayerCount?: GpuIntegerCoordinate,
|
|
957
|
+
swizzle?: string,
|
|
945
958
|
label?: string,
|
|
946
959
|
}
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
960
|
+
/**
|
|
961
|
+
* # Variants
|
|
962
|
+
*
|
|
963
|
+
* ## `"uint8"`
|
|
964
|
+
*
|
|
965
|
+
* ## `"uint8x2"`
|
|
966
|
+
*
|
|
967
|
+
* ## `"uint8x4"`
|
|
968
|
+
*
|
|
969
|
+
* ## `"sint8"`
|
|
970
|
+
*
|
|
971
|
+
* ## `"sint8x2"`
|
|
972
|
+
*
|
|
973
|
+
* ## `"sint8x4"`
|
|
974
|
+
*
|
|
975
|
+
* ## `"unorm8"`
|
|
976
|
+
*
|
|
977
|
+
* ## `"unorm8x2"`
|
|
978
|
+
*
|
|
979
|
+
* ## `"unorm8x4"`
|
|
980
|
+
*
|
|
981
|
+
* ## `"snorm8"`
|
|
982
|
+
*
|
|
983
|
+
* ## `"snorm8x2"`
|
|
984
|
+
*
|
|
985
|
+
* ## `"snorm8x4"`
|
|
986
|
+
*
|
|
987
|
+
* ## `"uint16"`
|
|
988
|
+
*
|
|
989
|
+
* ## `"uint16x2"`
|
|
990
|
+
*
|
|
991
|
+
* ## `"uint16x4"`
|
|
992
|
+
*
|
|
993
|
+
* ## `"sint16"`
|
|
994
|
+
*
|
|
995
|
+
* ## `"sint16x2"`
|
|
996
|
+
*
|
|
997
|
+
* ## `"sint16x4"`
|
|
998
|
+
*
|
|
999
|
+
* ## `"unorm16"`
|
|
1000
|
+
*
|
|
1001
|
+
* ## `"unorm16x2"`
|
|
1002
|
+
*
|
|
1003
|
+
* ## `"unorm16x4"`
|
|
1004
|
+
*
|
|
1005
|
+
* ## `"snorm16"`
|
|
1006
|
+
*
|
|
1007
|
+
* ## `"snorm16x2"`
|
|
1008
|
+
*
|
|
1009
|
+
* ## `"snorm16x4"`
|
|
1010
|
+
*
|
|
1011
|
+
* ## `"float16"`
|
|
1012
|
+
*
|
|
1013
|
+
* ## `"float16x2"`
|
|
1014
|
+
*
|
|
1015
|
+
* ## `"float16x4"`
|
|
1016
|
+
*
|
|
1017
|
+
* ## `"float32"`
|
|
1018
|
+
*
|
|
1019
|
+
* ## `"float32x2"`
|
|
1020
|
+
*
|
|
1021
|
+
* ## `"float32x3"`
|
|
1022
|
+
*
|
|
1023
|
+
* ## `"float32x4"`
|
|
1024
|
+
*
|
|
1025
|
+
* ## `"uint32"`
|
|
1026
|
+
*
|
|
1027
|
+
* ## `"uint32x2"`
|
|
1028
|
+
*
|
|
1029
|
+
* ## `"uint32x3"`
|
|
1030
|
+
*
|
|
1031
|
+
* ## `"uint32x4"`
|
|
1032
|
+
*
|
|
1033
|
+
* ## `"sint32"`
|
|
1034
|
+
*
|
|
1035
|
+
* ## `"sint32x2"`
|
|
1036
|
+
*
|
|
1037
|
+
* ## `"sint32x3"`
|
|
1038
|
+
*
|
|
1039
|
+
* ## `"sint32x4"`
|
|
1040
|
+
*
|
|
1041
|
+
* ## `"unorm1010102"`
|
|
1042
|
+
*
|
|
1043
|
+
* ## `"unorm8x4-bgra"`
|
|
1044
|
+
*/
|
|
1045
|
+
export type GpuVertexFormat = 'uint8' | 'uint8x2' | 'uint8x4' | 'sint8' | 'sint8x2' | 'sint8x4' | 'unorm8' | 'unorm8x2' | 'unorm8x4' | 'snorm8' | 'snorm8x2' | 'snorm8x4' | 'uint16' | 'uint16x2' | 'uint16x4' | 'sint16' | 'sint16x2' | 'sint16x4' | 'unorm16' | 'unorm16x2' | 'unorm16x4' | 'snorm16' | 'snorm16x2' | 'snorm16x4' | 'float16' | 'float16x2' | 'float16x4' | 'float32' | 'float32x2' | 'float32x3' | 'float32x4' | 'uint32' | 'uint32x2' | 'uint32x3' | 'uint32x4' | 'sint32' | 'sint32x2' | 'sint32x3' | 'sint32x4' | 'unorm1010102' | 'unorm8x4-bgra';
|
|
1046
|
+
export interface GpuVertexAttribute {
|
|
1047
|
+
format: GpuVertexFormat,
|
|
1048
|
+
offset: GpuSize64,
|
|
1049
|
+
shaderLocation: GpuIndex32,
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* # Variants
|
|
1053
|
+
*
|
|
1054
|
+
* ## `"vertex"`
|
|
1055
|
+
*
|
|
1056
|
+
* ## `"instance"`
|
|
1057
|
+
*/
|
|
1058
|
+
export type GpuVertexStepMode = 'vertex' | 'instance';
|
|
1059
|
+
export interface GpuVertexBufferLayout {
|
|
1060
|
+
arrayStride: GpuSize64,
|
|
1061
|
+
stepMode?: GpuVertexStepMode,
|
|
1062
|
+
attributes: Array<GpuVertexAttribute>,
|
|
957
1063
|
}
|
|
958
|
-
export
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
resolveTarget?: GpuTextureView,
|
|
962
|
-
clearValue?: GpuColor,
|
|
963
|
-
loadOp: GpuLoadOp,
|
|
964
|
-
storeOp: GpuStoreOp,
|
|
1064
|
+
export type MapAsyncErrorKind = MapAsyncErrorKindOperationError | MapAsyncErrorKindRangeError | MapAsyncErrorKindAbortError;
|
|
1065
|
+
export interface MapAsyncErrorKindOperationError {
|
|
1066
|
+
tag: 'operation-error',
|
|
965
1067
|
}
|
|
966
|
-
export interface
|
|
967
|
-
|
|
968
|
-
depthStencilAttachment?: GpuRenderPassDepthStencilAttachment,
|
|
969
|
-
occlusionQuerySet?: GpuQuerySet,
|
|
970
|
-
timestampWrites?: GpuRenderPassTimestampWrites,
|
|
971
|
-
maxDrawCount?: GpuSize64,
|
|
972
|
-
label?: string,
|
|
1068
|
+
export interface MapAsyncErrorKindRangeError {
|
|
1069
|
+
tag: 'range-error',
|
|
973
1070
|
}
|
|
974
|
-
export interface
|
|
975
|
-
|
|
976
|
-
y?: GpuIntegerCoordinate,
|
|
977
|
-
z?: GpuIntegerCoordinate,
|
|
1071
|
+
export interface MapAsyncErrorKindAbortError {
|
|
1072
|
+
tag: 'abort-error',
|
|
978
1073
|
}
|
|
979
|
-
export interface
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
origin?: GpuOrigin3D,
|
|
983
|
-
aspect?: GpuTextureAspect,
|
|
1074
|
+
export interface MapAsyncError {
|
|
1075
|
+
kind: MapAsyncErrorKind,
|
|
1076
|
+
message: string,
|
|
984
1077
|
}
|
|
985
|
-
export
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
depthOrArrayLayers?: GpuIntegerCoordinate,
|
|
1078
|
+
export type PopErrorScopeErrorKind = PopErrorScopeErrorKindOperationError;
|
|
1079
|
+
export interface PopErrorScopeErrorKindOperationError {
|
|
1080
|
+
tag: 'operation-error',
|
|
989
1081
|
}
|
|
990
|
-
export interface
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
sampleCount?: GpuSize32,
|
|
994
|
-
dimension?: GpuTextureDimension,
|
|
995
|
-
format: GpuTextureFormat,
|
|
996
|
-
usage: GpuTextureUsageFlags,
|
|
997
|
-
viewFormats?: Array<GpuTextureFormat>,
|
|
998
|
-
label?: string,
|
|
1082
|
+
export interface PopErrorScopeError {
|
|
1083
|
+
kind: PopErrorScopeErrorKind,
|
|
1084
|
+
message: string,
|
|
999
1085
|
}
|
|
1000
1086
|
/**
|
|
1001
1087
|
* # Variants
|
|
@@ -1008,38 +1094,57 @@ export type PredefinedColorSpace = 'srgb' | 'display-p3';
|
|
|
1008
1094
|
export interface GpuCanvasConfiguration {
|
|
1009
1095
|
device: GpuDevice,
|
|
1010
1096
|
format: GpuTextureFormat,
|
|
1011
|
-
usage?:
|
|
1097
|
+
usage?: GpuTextureUsage,
|
|
1012
1098
|
viewFormats?: Array<GpuTextureFormat>,
|
|
1013
1099
|
colorSpace?: PredefinedColorSpace,
|
|
1014
1100
|
toneMapping?: GpuCanvasToneMapping,
|
|
1015
1101
|
alphaMode?: GpuCanvasAlphaMode,
|
|
1016
1102
|
}
|
|
1017
|
-
export interface GpuCopyExternalImageDestInfo {
|
|
1018
|
-
colorSpace?: PredefinedColorSpace,
|
|
1019
|
-
premultipliedAlpha?: boolean,
|
|
1020
|
-
texture: GpuTexture,
|
|
1021
|
-
mipLevel?: GpuIntegerCoordinate,
|
|
1022
|
-
origin?: GpuOrigin3D,
|
|
1023
|
-
aspect?: GpuTextureAspect,
|
|
1024
|
-
}
|
|
1025
1103
|
export interface GpuCanvasConfigurationOwned {
|
|
1026
1104
|
device: GpuDevice,
|
|
1027
1105
|
format: GpuTextureFormat,
|
|
1028
|
-
usage?:
|
|
1106
|
+
usage?: GpuTextureUsage,
|
|
1029
1107
|
viewFormats?: Array<GpuTextureFormat>,
|
|
1030
1108
|
colorSpace?: PredefinedColorSpace,
|
|
1031
1109
|
toneMapping?: GpuCanvasToneMapping,
|
|
1032
1110
|
alphaMode?: GpuCanvasAlphaMode,
|
|
1033
1111
|
}
|
|
1034
|
-
export
|
|
1035
|
-
|
|
1036
|
-
|
|
1112
|
+
export interface GpuFragmentState {
|
|
1113
|
+
targets: Array<GpuColorTargetState | undefined>,
|
|
1114
|
+
module: GpuShaderModule,
|
|
1115
|
+
entryPoint?: string,
|
|
1116
|
+
constants?: RecordGpuPipelineConstantValue,
|
|
1037
1117
|
}
|
|
1038
|
-
export interface
|
|
1039
|
-
|
|
1118
|
+
export interface GpuProgrammableStage {
|
|
1119
|
+
module: GpuShaderModule,
|
|
1120
|
+
entryPoint?: string,
|
|
1121
|
+
constants?: RecordGpuPipelineConstantValue,
|
|
1040
1122
|
}
|
|
1041
|
-
export interface
|
|
1042
|
-
|
|
1123
|
+
export interface GpuComputePipelineDescriptor {
|
|
1124
|
+
compute: GpuProgrammableStage,
|
|
1125
|
+
layout: GpuLayoutMode,
|
|
1126
|
+
label?: string,
|
|
1127
|
+
}
|
|
1128
|
+
export interface GpuVertexState {
|
|
1129
|
+
buffers?: Array<GpuVertexBufferLayout | undefined>,
|
|
1130
|
+
module: GpuShaderModule,
|
|
1131
|
+
entryPoint?: string,
|
|
1132
|
+
constants?: RecordGpuPipelineConstantValue,
|
|
1133
|
+
}
|
|
1134
|
+
export interface GpuRenderPipelineDescriptor {
|
|
1135
|
+
vertex: GpuVertexState,
|
|
1136
|
+
primitive?: GpuPrimitiveState,
|
|
1137
|
+
depthStencil?: GpuDepthStencilState,
|
|
1138
|
+
multisample?: GpuMultisampleState,
|
|
1139
|
+
fragment?: GpuFragmentState,
|
|
1140
|
+
layout: GpuLayoutMode,
|
|
1141
|
+
label?: string,
|
|
1142
|
+
}
|
|
1143
|
+
export interface GpuDeviceDescriptor {
|
|
1144
|
+
requiredFeatures?: Array<GpuFeatureName>,
|
|
1145
|
+
requiredLimits?: RecordOptionGpuSize64,
|
|
1146
|
+
defaultQueue?: GpuQueueDescriptor,
|
|
1147
|
+
label?: string,
|
|
1043
1148
|
}
|
|
1044
1149
|
export type RequestDeviceErrorKind = RequestDeviceErrorKindTypeError | RequestDeviceErrorKindOperationError;
|
|
1045
1150
|
export interface RequestDeviceErrorKindTypeError {
|
|
@@ -1052,57 +1157,12 @@ export interface RequestDeviceError {
|
|
|
1052
1157
|
kind: RequestDeviceErrorKind,
|
|
1053
1158
|
message: string,
|
|
1054
1159
|
}
|
|
1055
|
-
export type
|
|
1056
|
-
export interface
|
|
1057
|
-
tag: 'gpu-pipeline-error',
|
|
1058
|
-
val: GpuPipelineErrorReason,
|
|
1059
|
-
}
|
|
1060
|
-
export interface CreatePipelineError {
|
|
1061
|
-
kind: CreatePipelineErrorKind,
|
|
1062
|
-
message: string,
|
|
1063
|
-
}
|
|
1064
|
-
export type CreateQuerySetErrorKind = CreateQuerySetErrorKindTypeError;
|
|
1065
|
-
export interface CreateQuerySetErrorKindTypeError {
|
|
1066
|
-
tag: 'type-error',
|
|
1067
|
-
}
|
|
1068
|
-
export interface CreateQuerySetError {
|
|
1069
|
-
kind: CreateQuerySetErrorKind,
|
|
1070
|
-
message: string,
|
|
1071
|
-
}
|
|
1072
|
-
export type PopErrorScopeErrorKind = PopErrorScopeErrorKindOperationError;
|
|
1073
|
-
export interface PopErrorScopeErrorKindOperationError {
|
|
1074
|
-
tag: 'operation-error',
|
|
1075
|
-
}
|
|
1076
|
-
export interface PopErrorScopeError {
|
|
1077
|
-
kind: PopErrorScopeErrorKind,
|
|
1078
|
-
message: string,
|
|
1079
|
-
}
|
|
1080
|
-
export type MapAsyncErrorKind = MapAsyncErrorKindOperationError | MapAsyncErrorKindRangeError | MapAsyncErrorKindAbortError;
|
|
1081
|
-
export interface MapAsyncErrorKindOperationError {
|
|
1082
|
-
tag: 'operation-error',
|
|
1083
|
-
}
|
|
1084
|
-
export interface MapAsyncErrorKindRangeError {
|
|
1085
|
-
tag: 'range-error',
|
|
1086
|
-
}
|
|
1087
|
-
export interface MapAsyncErrorKindAbortError {
|
|
1088
|
-
tag: 'abort-error',
|
|
1089
|
-
}
|
|
1090
|
-
export interface MapAsyncError {
|
|
1091
|
-
kind: MapAsyncErrorKind,
|
|
1092
|
-
message: string,
|
|
1093
|
-
}
|
|
1094
|
-
export type GetMappedRangeErrorKind = GetMappedRangeErrorKindOperationError | GetMappedRangeErrorKindRangeError | GetMappedRangeErrorKindTypeError;
|
|
1095
|
-
export interface GetMappedRangeErrorKindOperationError {
|
|
1096
|
-
tag: 'operation-error',
|
|
1097
|
-
}
|
|
1098
|
-
export interface GetMappedRangeErrorKindRangeError {
|
|
1160
|
+
export type SetBindGroupErrorKind = SetBindGroupErrorKindRangeError;
|
|
1161
|
+
export interface SetBindGroupErrorKindRangeError {
|
|
1099
1162
|
tag: 'range-error',
|
|
1100
1163
|
}
|
|
1101
|
-
export interface
|
|
1102
|
-
|
|
1103
|
-
}
|
|
1104
|
-
export interface GetMappedRangeError {
|
|
1105
|
-
kind: GetMappedRangeErrorKind,
|
|
1164
|
+
export interface SetBindGroupError {
|
|
1165
|
+
kind: SetBindGroupErrorKind,
|
|
1106
1166
|
message: string,
|
|
1107
1167
|
}
|
|
1108
1168
|
export type UnmapErrorKind = UnmapErrorKindAbortError;
|
|
@@ -1113,14 +1173,6 @@ export interface UnmapError {
|
|
|
1113
1173
|
kind: UnmapErrorKind,
|
|
1114
1174
|
message: string,
|
|
1115
1175
|
}
|
|
1116
|
-
export type SetBindGroupErrorKind = SetBindGroupErrorKindRangeError;
|
|
1117
|
-
export interface SetBindGroupErrorKindRangeError {
|
|
1118
|
-
tag: 'range-error',
|
|
1119
|
-
}
|
|
1120
|
-
export interface SetBindGroupError {
|
|
1121
|
-
kind: SetBindGroupErrorKind,
|
|
1122
|
-
message: string,
|
|
1123
|
-
}
|
|
1124
1176
|
export type WriteBufferErrorKind = WriteBufferErrorKindOperationError;
|
|
1125
1177
|
export interface WriteBufferErrorKindOperationError {
|
|
1126
1178
|
tag: 'operation-error',
|
|
@@ -1136,7 +1188,7 @@ export class Gpu {
|
|
|
1136
1188
|
* This type does not have a public constructor.
|
|
1137
1189
|
*/
|
|
1138
1190
|
private constructor();
|
|
1139
|
-
requestAdapter(options: GpuRequestAdapterOptions | undefined): GpuAdapter | undefined
|
|
1191
|
+
requestAdapter(options: GpuRequestAdapterOptions | undefined): Promise<GpuAdapter | undefined>;
|
|
1140
1192
|
getPreferredCanvasFormat(): GpuTextureFormat;
|
|
1141
1193
|
wgslLanguageFeatures(): WgslLanguageFeatures;
|
|
1142
1194
|
}
|
|
@@ -1149,8 +1201,7 @@ export class GpuAdapter {
|
|
|
1149
1201
|
features(): GpuSupportedFeatures;
|
|
1150
1202
|
limits(): GpuSupportedLimits;
|
|
1151
1203
|
info(): GpuAdapterInfo;
|
|
1152
|
-
|
|
1153
|
-
requestDevice(descriptor: GpuDeviceDescriptor | undefined): GpuDevice;
|
|
1204
|
+
requestDevice(descriptor: GpuDeviceDescriptor | undefined): Promise<GpuDevice>;
|
|
1154
1205
|
}
|
|
1155
1206
|
|
|
1156
1207
|
export class GpuAdapterInfo {
|
|
@@ -1164,6 +1215,7 @@ export class GpuAdapterInfo {
|
|
|
1164
1215
|
description(): string;
|
|
1165
1216
|
subgroupMinSize(): number;
|
|
1166
1217
|
subgroupMaxSize(): number;
|
|
1218
|
+
isFallbackAdapter(): boolean;
|
|
1167
1219
|
}
|
|
1168
1220
|
|
|
1169
1221
|
export class GpuBindGroup {
|
|
@@ -1190,9 +1242,9 @@ export class GpuBuffer {
|
|
|
1190
1242
|
*/
|
|
1191
1243
|
private constructor();
|
|
1192
1244
|
size(): GpuSize64Out;
|
|
1193
|
-
usage():
|
|
1245
|
+
usage(): GpuBufferUsage;
|
|
1194
1246
|
mapState(): GpuBufferMapState;
|
|
1195
|
-
mapAsync(mode:
|
|
1247
|
+
mapAsync(mode: GpuMapMode, offset: GpuSize64 | undefined, size: GpuSize64 | undefined): Promise<void>;
|
|
1196
1248
|
getMappedRangeGetWithCopy(offset: GpuSize64 | undefined, size: GpuSize64 | undefined): Uint8Array;
|
|
1197
1249
|
unmap(): void;
|
|
1198
1250
|
destroy(): void;
|
|
@@ -1201,23 +1253,6 @@ export class GpuBuffer {
|
|
|
1201
1253
|
getMappedRangeSetWithCopy(data: Uint8Array, offset: GpuSize64 | undefined, size: GpuSize64 | undefined): void;
|
|
1202
1254
|
}
|
|
1203
1255
|
|
|
1204
|
-
export class GpuBufferUsage {
|
|
1205
|
-
/**
|
|
1206
|
-
* This type does not have a public constructor.
|
|
1207
|
-
*/
|
|
1208
|
-
private constructor();
|
|
1209
|
-
static mapRead(): GpuFlagsConstant;
|
|
1210
|
-
static mapWrite(): GpuFlagsConstant;
|
|
1211
|
-
static copySrc(): GpuFlagsConstant;
|
|
1212
|
-
static copyDst(): GpuFlagsConstant;
|
|
1213
|
-
static index(): GpuFlagsConstant;
|
|
1214
|
-
static vertex(): GpuFlagsConstant;
|
|
1215
|
-
static uniform(): GpuFlagsConstant;
|
|
1216
|
-
static storage(): GpuFlagsConstant;
|
|
1217
|
-
static indirect(): GpuFlagsConstant;
|
|
1218
|
-
static queryResolve(): GpuFlagsConstant;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
1256
|
export class GpuCanvasContext {
|
|
1222
1257
|
/**
|
|
1223
1258
|
* This type does not have a public constructor.
|
|
@@ -1229,18 +1264,6 @@ export class GpuCanvasContext {
|
|
|
1229
1264
|
getCurrentTexture(): GpuTexture;
|
|
1230
1265
|
}
|
|
1231
1266
|
|
|
1232
|
-
export class GpuColorWrite {
|
|
1233
|
-
/**
|
|
1234
|
-
* This type does not have a public constructor.
|
|
1235
|
-
*/
|
|
1236
|
-
private constructor();
|
|
1237
|
-
static red(): GpuFlagsConstant;
|
|
1238
|
-
static green(): GpuFlagsConstant;
|
|
1239
|
-
static blue(): GpuFlagsConstant;
|
|
1240
|
-
static alpha(): GpuFlagsConstant;
|
|
1241
|
-
static all(): GpuFlagsConstant;
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
1267
|
export class GpuCommandBuffer {
|
|
1245
1268
|
/**
|
|
1246
1269
|
* This type does not have a public constructor.
|
|
@@ -1257,7 +1280,7 @@ export class GpuCommandEncoder {
|
|
|
1257
1280
|
private constructor();
|
|
1258
1281
|
beginRenderPass(descriptor: GpuRenderPassDescriptor): GpuRenderPassEncoder;
|
|
1259
1282
|
beginComputePass(descriptor: GpuComputePassDescriptor | undefined): GpuComputePassEncoder;
|
|
1260
|
-
copyBufferToBuffer(source: GpuBuffer, sourceOffset: GpuSize64, destination: GpuBuffer, destinationOffset: GpuSize64, size: GpuSize64): void;
|
|
1283
|
+
copyBufferToBuffer(source: GpuBuffer, sourceOffset: GpuSize64 | undefined, destination: GpuBuffer, destinationOffset: GpuSize64 | undefined, size: GpuSize64 | undefined): void;
|
|
1261
1284
|
copyBufferToTexture(source: GpuTexelCopyBufferInfo, destination: GpuTexelCopyTextureInfo, copySize: GpuExtent3D): void;
|
|
1262
1285
|
copyTextureToBuffer(source: GpuTexelCopyTextureInfo, destination: GpuTexelCopyBufferInfo, copySize: GpuExtent3D): void;
|
|
1263
1286
|
copyTextureToTexture(source: GpuTexelCopyTextureInfo, destination: GpuTexelCopyTextureInfo, copySize: GpuExtent3D): void;
|
|
@@ -1307,6 +1330,7 @@ export class GpuComputePassEncoder {
|
|
|
1307
1330
|
popDebugGroup(): void;
|
|
1308
1331
|
insertDebugMarker(markerLabel: string): void;
|
|
1309
1332
|
setBindGroup(index: GpuIndex32, bindGroup: GpuBindGroup | undefined, dynamicOffsetsData: Uint32Array | undefined, dynamicOffsetsDataStart: GpuSize64 | undefined, dynamicOffsetsDataLength: GpuSize32 | undefined): void;
|
|
1333
|
+
setImmediates(rangeOffset: GpuSize32, data: Uint8Array, dataOffset: GpuSize64 | undefined, dataSize: GpuSize64 | undefined): void;
|
|
1310
1334
|
}
|
|
1311
1335
|
|
|
1312
1336
|
export class GpuComputePipeline {
|
|
@@ -1338,18 +1362,17 @@ export class GpuDevice {
|
|
|
1338
1362
|
createShaderModule(descriptor: GpuShaderModuleDescriptor): GpuShaderModule;
|
|
1339
1363
|
createComputePipeline(descriptor: GpuComputePipelineDescriptor): GpuComputePipeline;
|
|
1340
1364
|
createRenderPipeline(descriptor: GpuRenderPipelineDescriptor): GpuRenderPipeline;
|
|
1341
|
-
createComputePipelineAsync(descriptor: GpuComputePipelineDescriptor): GpuComputePipeline
|
|
1342
|
-
createRenderPipelineAsync(descriptor: GpuRenderPipelineDescriptor): GpuRenderPipeline
|
|
1365
|
+
createComputePipelineAsync(descriptor: GpuComputePipelineDescriptor): Promise<GpuComputePipeline>;
|
|
1366
|
+
createRenderPipelineAsync(descriptor: GpuRenderPipelineDescriptor): Promise<GpuRenderPipeline>;
|
|
1343
1367
|
createCommandEncoder(descriptor: GpuCommandEncoderDescriptor | undefined): GpuCommandEncoder;
|
|
1344
1368
|
createRenderBundleEncoder(descriptor: GpuRenderBundleEncoderDescriptor): GpuRenderBundleEncoder;
|
|
1345
1369
|
createQuerySet(descriptor: GpuQuerySetDescriptor): GpuQuerySet;
|
|
1346
1370
|
label(): string;
|
|
1347
1371
|
setLabel(label: string): void;
|
|
1348
|
-
lost(): GpuDeviceLostInfo
|
|
1372
|
+
lost(): PromiseLike<GpuDeviceLostInfo>;
|
|
1349
1373
|
pushErrorScope(filter: GpuErrorFilter): void;
|
|
1350
|
-
popErrorScope(): GpuError | undefined
|
|
1351
|
-
|
|
1352
|
-
connectGraphicsContext(context: Context): void;
|
|
1374
|
+
popErrorScope(): Promise<GpuError | undefined>;
|
|
1375
|
+
onUncapturedError(): AsyncIterable<GpuError>;
|
|
1353
1376
|
}
|
|
1354
1377
|
|
|
1355
1378
|
export class GpuDeviceLostInfo {
|
|
@@ -1370,15 +1393,6 @@ export class GpuError {
|
|
|
1370
1393
|
kind(): GpuErrorKind;
|
|
1371
1394
|
}
|
|
1372
1395
|
|
|
1373
|
-
export class GpuMapMode {
|
|
1374
|
-
/**
|
|
1375
|
-
* This type does not have a public constructor.
|
|
1376
|
-
*/
|
|
1377
|
-
private constructor();
|
|
1378
|
-
static read(): GpuFlagsConstant;
|
|
1379
|
-
static write(): GpuFlagsConstant;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
1396
|
export class GpuPipelineLayout {
|
|
1383
1397
|
/**
|
|
1384
1398
|
* This type does not have a public constructor.
|
|
@@ -1406,7 +1420,7 @@ export class GpuQueue {
|
|
|
1406
1420
|
*/
|
|
1407
1421
|
private constructor();
|
|
1408
1422
|
submit(commandBuffers: Array<GpuCommandBuffer>): void;
|
|
1409
|
-
onSubmittedWorkDone(): void
|
|
1423
|
+
onSubmittedWorkDone(): Promise<void>;
|
|
1410
1424
|
writeBufferWithCopy(buffer: GpuBuffer, bufferOffset: GpuSize64, data: Uint8Array, dataOffset: GpuSize64 | undefined, size: GpuSize64 | undefined): void;
|
|
1411
1425
|
writeTextureWithCopy(destination: GpuTexelCopyTextureInfo, data: Uint8Array, dataLayout: GpuTexelCopyBufferLayout, size: GpuExtent3D): void;
|
|
1412
1426
|
label(): string;
|
|
@@ -1434,6 +1448,7 @@ export class GpuRenderBundleEncoder {
|
|
|
1434
1448
|
popDebugGroup(): void;
|
|
1435
1449
|
insertDebugMarker(markerLabel: string): void;
|
|
1436
1450
|
setBindGroup(index: GpuIndex32, bindGroup: GpuBindGroup | undefined, dynamicOffsetsData: Uint32Array | undefined, dynamicOffsetsDataStart: GpuSize64 | undefined, dynamicOffsetsDataLength: GpuSize32 | undefined): void;
|
|
1451
|
+
setImmediates(rangeOffset: GpuSize32, data: Uint8Array, dataOffset: GpuSize64 | undefined, dataSize: GpuSize64 | undefined): void;
|
|
1437
1452
|
setPipeline(pipeline: GpuRenderPipeline): void;
|
|
1438
1453
|
setIndexBuffer(buffer: GpuBuffer, indexFormat: GpuIndexFormat, offset: GpuSize64 | undefined, size: GpuSize64 | undefined): void;
|
|
1439
1454
|
setVertexBuffer(slot: GpuIndex32, buffer: GpuBuffer | undefined, offset: GpuSize64 | undefined, size: GpuSize64 | undefined): void;
|
|
@@ -1462,6 +1477,7 @@ export class GpuRenderPassEncoder {
|
|
|
1462
1477
|
popDebugGroup(): void;
|
|
1463
1478
|
insertDebugMarker(markerLabel: string): void;
|
|
1464
1479
|
setBindGroup(index: GpuIndex32, bindGroup: GpuBindGroup | undefined, dynamicOffsetsData: Uint32Array | undefined, dynamicOffsetsDataStart: GpuSize64 | undefined, dynamicOffsetsDataLength: GpuSize32 | undefined): void;
|
|
1480
|
+
setImmediates(rangeOffset: GpuSize32, data: Uint8Array, dataOffset: GpuSize64 | undefined, dataSize: GpuSize64 | undefined): void;
|
|
1465
1481
|
setPipeline(pipeline: GpuRenderPipeline): void;
|
|
1466
1482
|
setIndexBuffer(buffer: GpuBuffer, indexFormat: GpuIndexFormat, offset: GpuSize64 | undefined, size: GpuSize64 | undefined): void;
|
|
1467
1483
|
setVertexBuffer(slot: GpuIndex32, buffer: GpuBuffer | undefined, offset: GpuSize64 | undefined, size: GpuSize64 | undefined): void;
|
|
@@ -1495,21 +1511,11 @@ export class GpuShaderModule {
|
|
|
1495
1511
|
* This type does not have a public constructor.
|
|
1496
1512
|
*/
|
|
1497
1513
|
private constructor();
|
|
1498
|
-
getCompilationInfo(): GpuCompilationInfo
|
|
1514
|
+
getCompilationInfo(): Promise<GpuCompilationInfo>;
|
|
1499
1515
|
label(): string;
|
|
1500
1516
|
setLabel(label: string): void;
|
|
1501
1517
|
}
|
|
1502
1518
|
|
|
1503
|
-
export class GpuShaderStage {
|
|
1504
|
-
/**
|
|
1505
|
-
* This type does not have a public constructor.
|
|
1506
|
-
*/
|
|
1507
|
-
private constructor();
|
|
1508
|
-
static vertex(): GpuFlagsConstant;
|
|
1509
|
-
static fragment(): GpuFlagsConstant;
|
|
1510
|
-
static compute(): GpuFlagsConstant;
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
1519
|
export class GpuSupportedFeatures {
|
|
1514
1520
|
/**
|
|
1515
1521
|
* This type does not have a public constructor.
|
|
@@ -1529,13 +1535,18 @@ export class GpuSupportedLimits {
|
|
|
1529
1535
|
maxTextureArrayLayers(): number;
|
|
1530
1536
|
maxBindGroups(): number;
|
|
1531
1537
|
maxBindGroupsPlusVertexBuffers(): number;
|
|
1538
|
+
maxImmediateSize(): number;
|
|
1532
1539
|
maxBindingsPerBindGroup(): number;
|
|
1533
1540
|
maxDynamicUniformBuffersPerPipelineLayout(): number;
|
|
1534
1541
|
maxDynamicStorageBuffersPerPipelineLayout(): number;
|
|
1535
1542
|
maxSampledTexturesPerShaderStage(): number;
|
|
1536
1543
|
maxSamplersPerShaderStage(): number;
|
|
1537
1544
|
maxStorageBuffersPerShaderStage(): number;
|
|
1545
|
+
maxStorageBuffersInVertexStage(): number;
|
|
1546
|
+
maxStorageBuffersInFragmentStage(): number;
|
|
1538
1547
|
maxStorageTexturesPerShaderStage(): number;
|
|
1548
|
+
maxStorageTexturesInVertexStage(): number;
|
|
1549
|
+
maxStorageTexturesInFragmentStage(): number;
|
|
1539
1550
|
maxUniformBuffersPerShaderStage(): number;
|
|
1540
1551
|
maxUniformBufferBindingSize(): bigint;
|
|
1541
1552
|
maxStorageBufferBindingSize(): bigint;
|
|
@@ -1570,22 +1581,10 @@ export class GpuTexture {
|
|
|
1570
1581
|
sampleCount(): GpuSize32Out;
|
|
1571
1582
|
dimension(): GpuTextureDimension;
|
|
1572
1583
|
format(): GpuTextureFormat;
|
|
1573
|
-
usage():
|
|
1584
|
+
usage(): GpuTextureUsage;
|
|
1585
|
+
textureBindingViewDimension(): GpuTextureViewDimension | undefined;
|
|
1574
1586
|
label(): string;
|
|
1575
1587
|
setLabel(label: string): void;
|
|
1576
|
-
static fromGraphicsBuffer(buffer: AbstractBuffer): GpuTexture;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
export class GpuTextureUsage {
|
|
1580
|
-
/**
|
|
1581
|
-
* This type does not have a public constructor.
|
|
1582
|
-
*/
|
|
1583
|
-
private constructor();
|
|
1584
|
-
static copySrc(): GpuFlagsConstant;
|
|
1585
|
-
static copyDst(): GpuFlagsConstant;
|
|
1586
|
-
static textureBinding(): GpuFlagsConstant;
|
|
1587
|
-
static storageBinding(): GpuFlagsConstant;
|
|
1588
|
-
static renderAttachment(): GpuFlagsConstant;
|
|
1589
1588
|
}
|
|
1590
1589
|
|
|
1591
1590
|
export class GpuTextureView {
|