@wasi-gfx/js-webgpu 0.2.0 → 0.4.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.
Files changed (64) hide show
  1. package/README.md +3 -3
  2. package/dist/canvas.d.ts +3 -3
  3. package/dist/canvas.js +36 -23
  4. package/dist/globals.js +12 -10
  5. package/dist/webgpu.d.ts +68 -12
  6. package/dist/webgpu.js +340 -48
  7. package/package.json +12 -6
  8. package/types/interfaces/wasi-cli-run.d.ts +2 -2
  9. package/types/interfaces/wasi-cli-stdout.d.ts +14 -3
  10. package/types/interfaces/wasi-cli-types.d.ts +15 -0
  11. package/types/interfaces/wasi-gfx-frame-buffer-frame-buffer.d.ts +13 -0
  12. package/types/interfaces/wasi-gfx-surface-surface-frame-buffer.d.ts +12 -0
  13. package/types/interfaces/wasi-gfx-surface-surface-webgpu.d.ts +29 -0
  14. package/types/interfaces/{wasi-surface-surface.d.ts → wasi-gfx-surface-surface.d.ts} +8 -18
  15. package/types/interfaces/wasi-webgpu-webgpu.d.ts +809 -810
  16. package/types/wit.d.ts +9 -10
  17. package/wit/deps/wasi-cli-0.3.0/package.wit +256 -0
  18. package/wit/deps/wasi-clocks-0.3.0/package.wit +43 -0
  19. package/wit/deps/wasi-filesystem-0.3.0/package.wit +149 -0
  20. package/wit/deps/wasi-gfx-frame-buffer-0.2.0/package.wit +13 -0
  21. package/wit/deps/{surface/surface.wit → wasi-gfx-surface-0.2.0/package.wit} +69 -44
  22. package/wit/deps/wasi-random-0.3.0/package.wit +18 -0
  23. package/wit/deps/wasi-sockets-0.3.0/package.wit +116 -0
  24. package/wit/deps/{webgpu/webgpu.wit → wasi-webgpu-0.3.0-rc.2/package.wit} +1007 -836
  25. package/wit/world.wit +8 -7
  26. package/types/interfaces/wasi-frame-buffer-frame-buffer.d.ts +0 -21
  27. package/types/interfaces/wasi-graphics-context-graphics-context.d.ts +0 -17
  28. package/types/interfaces/wasi-io-error.d.ts +0 -18
  29. package/types/interfaces/wasi-io-poll.d.ts +0 -43
  30. package/types/interfaces/wasi-io-streams.d.ts +0 -240
  31. package/wit/deps/cli/command.wit +0 -7
  32. package/wit/deps/cli/environment.wit +0 -18
  33. package/wit/deps/cli/exit.wit +0 -4
  34. package/wit/deps/cli/imports.wit +0 -20
  35. package/wit/deps/cli/run.wit +0 -4
  36. package/wit/deps/cli/stdio.wit +0 -17
  37. package/wit/deps/cli/terminal.wit +0 -49
  38. package/wit/deps/clocks/monotonic-clock.wit +0 -45
  39. package/wit/deps/clocks/wall-clock.wit +0 -42
  40. package/wit/deps/clocks/world.wit +0 -6
  41. package/wit/deps/filesystem/preopens.wit +0 -8
  42. package/wit/deps/filesystem/types.wit +0 -634
  43. package/wit/deps/filesystem/world.wit +0 -6
  44. package/wit/deps/frame-buffer/frame-buffer.wit +0 -23
  45. package/wit/deps/graphics-context/graphics-context.wit +0 -18
  46. package/wit/deps/io/error.wit +0 -34
  47. package/wit/deps/io/poll.wit +0 -41
  48. package/wit/deps/io/streams.wit +0 -262
  49. package/wit/deps/io/world.wit +0 -6
  50. package/wit/deps/random/insecure-seed.wit +0 -25
  51. package/wit/deps/random/insecure.wit +0 -22
  52. package/wit/deps/random/random.wit +0 -26
  53. package/wit/deps/random/world.wit +0 -7
  54. package/wit/deps/sockets/instance-network.wit +0 -9
  55. package/wit/deps/sockets/ip-name-lookup.wit +0 -51
  56. package/wit/deps/sockets/network.wit +0 -145
  57. package/wit/deps/sockets/tcp-create-socket.wit +0 -27
  58. package/wit/deps/sockets/tcp.wit +0 -353
  59. package/wit/deps/sockets/udp-create-socket.wit +0 -27
  60. package/wit/deps/sockets/udp.wit +0 -266
  61. package/wit/deps/sockets/world.wit +0 -11
  62. package/wit/deps/webgpu/imports.wit +0 -5
  63. package/wit/deps.lock +0 -51
  64. package/wit/deps.toml +0 -18
@@ -1,321 +1,330 @@
1
- /** @module Interface wasi:webgpu/webgpu@0.0.1 **/
1
+ /** @module Interface wasi:webgpu/webgpu@0.3.0-rc.2 **/
2
2
  export function getGpu(): Gpu;
3
- export type Pollable = import('./wasi-io-poll.js').Pollable;
4
- export type Context = import('./wasi-graphics-context-graphics-context.js').Context;
5
- export type AbstractBuffer = import('./wasi-graphics-context-graphics-context.js').AbstractBuffer;
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
- * ## `"low-power"`
28
+ * ## `"clamp-to-edge"`
10
29
  *
11
- * ## `"high-performance"`
30
+ * ## `"repeat"`
31
+ *
32
+ * ## `"mirror-repeat"`
12
33
  */
13
- export type GpuPowerPreference = 'low-power' | 'high-performance';
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
- * ## `"depth-clip-control"`
38
+ * ## `"zero"`
24
39
  *
25
- * ## `"depth32float-stencil8"`
40
+ * ## `"one"`
26
41
  *
27
- * ## `"texture-compression-bc"`
42
+ * ## `"src"`
28
43
  *
29
- * ## `"texture-compression-bc-sliced3d"`
44
+ * ## `"one-minus-src"`
30
45
  *
31
- * ## `"texture-compression-etc2"`
46
+ * ## `"src-alpha"`
32
47
  *
33
- * ## `"texture-compression-astc"`
48
+ * ## `"one-minus-src-alpha"`
34
49
  *
35
- * ## `"texture-compression-astc-sliced3d"`
50
+ * ## `"dst"`
36
51
  *
37
- * ## `"timestamp-query"`
52
+ * ## `"one-minus-dst"`
38
53
  *
39
- * ## `"indirect-first-instance"`
54
+ * ## `"dst-alpha"`
40
55
  *
41
- * ## `"shader-f16"`
56
+ * ## `"one-minus-dst-alpha"`
42
57
  *
43
- * ## `"rg11b10ufloat-renderable"`
58
+ * ## `"src-alpha-saturated"`
44
59
  *
45
- * ## `"bgra8unorm-storage"`
60
+ * ## `"constant"`
46
61
  *
47
- * ## `"float32-filterable"`
62
+ * ## `"one-minus-constant"`
48
63
  *
49
- * ## `"float32-blendable"`
64
+ * ## `"src1"`
50
65
  *
51
- * ## `"clip-distances"`
66
+ * ## `"one-minus-src1"`
52
67
  *
53
- * ## `"dual-source-blending"`
68
+ * ## `"src1-alpha"`
54
69
  *
55
- * ## `"subgroups"`
70
+ * ## `"one-minus-src1-alpha"`
56
71
  */
57
- export type GpuFeatureName = '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';
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
- * ## `"unmapped"`
76
+ * ## `"add"`
62
77
  *
63
- * ## `"pending"`
78
+ * ## `"subtract"`
64
79
  *
65
- * ## `"mapped"`
80
+ * ## `"reverse-subtract"`
81
+ *
82
+ * ## `"min"`
83
+ *
84
+ * ## `"max"`
66
85
  */
67
- export type GpuBufferMapState = 'unmapped' | 'pending' | 'mapped';
68
- export type GpuBufferUsageFlags = number;
69
- export type GpuMapModeFlags = number;
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
- * ## `"d1"`
99
+ * ## `"uniform"`
74
100
  *
75
- * ## `"d2"`
101
+ * ## `"storage"`
76
102
  *
77
- * ## `"d3"`
103
+ * ## `"read-only-storage"`
78
104
  */
79
- export type GpuTextureDimension = 'd1' | 'd2' | 'd3';
80
- export type GpuTextureUsageFlags = number;
105
+ export type GpuBufferBindingType = 'uniform' | 'storage' | 'read-only-storage';
106
+ export type GpuBufferDynamicOffset = number;
81
107
  /**
82
108
  * # Variants
83
109
  *
84
- * ## `"d1"`
85
- *
86
- * ## `"d2"`
110
+ * ## `"unmapped"`
87
111
  *
88
- * ## `"d2-array"`
112
+ * ## `"pending"`
89
113
  *
90
- * ## `"cube"`
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
- * ## `"cube-array"`
132
+ * ## `"opaque"`
93
133
  *
94
- * ## `"d3"`
134
+ * ## `"premultiplied"`
95
135
  */
96
- export type GpuTextureViewDimension = 'd1' | 'd2' | 'd2-array' | 'cube' | 'cube-array' | 'd3';
136
+ export type GpuCanvasAlphaMode = 'opaque' | 'premultiplied';
97
137
  /**
98
138
  * # Variants
99
139
  *
100
- * ## `"all"`
101
- *
102
- * ## `"stencil-only"`
140
+ * ## `"standard"`
103
141
  *
104
- * ## `"depth-only"`
142
+ * ## `"extended"`
105
143
  */
106
- export type GpuTextureAspect = 'all' | 'stencil-only' | 'depth-only';
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
- * ## `"r8unorm"`
170
+ * ## `"never"`
111
171
  *
112
- * ## `"r8snorm"`
172
+ * ## `"less"`
113
173
  *
114
- * ## `"r8uint"`
174
+ * ## `"equal"`
115
175
  *
116
- * ## `"r8sint"`
176
+ * ## `"less-equal"`
117
177
  *
118
- * ## `"r16uint"`
178
+ * ## `"greater"`
119
179
  *
120
- * ## `"r16sint"`
180
+ * ## `"not-equal"`
121
181
  *
122
- * ## `"r16float"`
182
+ * ## `"greater-equal"`
123
183
  *
124
- * ## `"rg8unorm"`
184
+ * ## `"always"`
185
+ */
186
+ export type GpuCompareFunction = 'never' | 'less' | 'equal' | 'less-equal' | 'greater' | 'not-equal' | 'greater-equal' | 'always';
187
+ /**
188
+ * # Variants
125
189
  *
126
- * ## `"rg8snorm"`
190
+ * ## `"error"`
127
191
  *
128
- * ## `"rg8uint"`
192
+ * ## `"warning"`
129
193
  *
130
- * ## `"rg8sint"`
194
+ * ## `"info"`
195
+ */
196
+ export type GpuCompilationMessageType = 'error' | 'warning' | 'info';
197
+ /**
198
+ * # Variants
131
199
  *
132
- * ## `"r32uint"`
200
+ * ## `"none"`
133
201
  *
134
- * ## `"r32sint"`
202
+ * ## `"front"`
135
203
  *
136
- * ## `"r32float"`
204
+ * ## `"back"`
205
+ */
206
+ export type GpuCullMode = 'none' | 'front' | 'back';
207
+ export type GpuDepthBias = number;
208
+ /**
209
+ * # Variants
137
210
  *
138
- * ## `"rg16uint"`
211
+ * ## `"unknown"`
139
212
  *
140
- * ## `"rg16sint"`
213
+ * ## `"destroyed"`
214
+ */
215
+ export type GpuDeviceLostReason = 'unknown' | 'destroyed';
216
+ /**
217
+ * # Variants
141
218
  *
142
- * ## `"rg16float"`
219
+ * ## `"validation"`
143
220
  *
144
- * ## `"rgba8unorm"`
221
+ * ## `"out-of-memory"`
145
222
  *
146
- * ## `"rgba8unorm-srgb"`
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
- * ## `"rgba8snorm"`
239
+ * ## `"core-features-and-limits"`
149
240
  *
150
- * ## `"rgba8uint"`
241
+ * ## `"depth-clip-control"`
151
242
  *
152
- * ## `"rgba8sint"`
243
+ * ## `"depth32float-stencil8"`
153
244
  *
154
- * ## `"bgra8unorm"`
245
+ * ## `"texture-compression-bc"`
155
246
  *
156
- * ## `"bgra8unorm-srgb"`
247
+ * ## `"texture-compression-bc-sliced3d"`
157
248
  *
158
- * ## `"rgb9e5ufloat"`
249
+ * ## `"texture-compression-etc2"`
159
250
  *
160
- * ## `"rgb10a2uint"`
251
+ * ## `"texture-compression-astc"`
161
252
  *
162
- * ## `"rgb10a2unorm"`
253
+ * ## `"texture-compression-astc-sliced3d"`
163
254
  *
164
- * ## `"rg11b10ufloat"`
255
+ * ## `"timestamp-query"`
165
256
  *
166
- * ## `"rg32uint"`
257
+ * ## `"indirect-first-instance"`
167
258
  *
168
- * ## `"rg32sint"`
259
+ * ## `"shader-f16"`
169
260
  *
170
- * ## `"rg32float"`
261
+ * ## `"rg11b10ufloat-renderable"`
171
262
  *
172
- * ## `"rgba16uint"`
263
+ * ## `"bgra8unorm-storage"`
173
264
  *
174
- * ## `"rgba16sint"`
265
+ * ## `"float32-filterable"`
175
266
  *
176
- * ## `"rgba16float"`
267
+ * ## `"float32-blendable"`
177
268
  *
178
- * ## `"rgba32uint"`
269
+ * ## `"clip-distances"`
179
270
  *
180
- * ## `"rgba32sint"`
271
+ * ## `"dual-source-blending"`
181
272
  *
182
- * ## `"rgba32float"`
273
+ * ## `"subgroups"`
183
274
  *
184
- * ## `"stencil8"`
275
+ * ## `"texture-formats-tier1"`
185
276
  *
186
- * ## `"depth16unorm"`
277
+ * ## `"texture-formats-tier2"`
187
278
  *
188
- * ## `"depth24plus"`
279
+ * ## `"primitive-index"`
189
280
  *
190
- * ## `"depth24plus-stencil8"`
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
- * ## `"depth32float"`
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
- * ## `"astc12x10-unorm-srgb"`
289
+ * ## `"linear"`
290
+ */
291
+ export type GpuFilterMode = 'nearest' | 'linear';
292
+ /**
293
+ * # Variants
295
294
  *
296
- * ## `"astc12x12-unorm"`
295
+ * ## `"ccw"`
297
296
  *
298
- * ## `"astc12x12-unorm-srgb"`
297
+ * ## `"cw"`
299
298
  */
300
- export type GpuTextureFormat = 'r8unorm' | 'r8snorm' | 'r8uint' | 'r8sint' | 'r16uint' | 'r16sint' | 'r16float' | 'rg8unorm' | 'rg8snorm' | 'rg8uint' | 'rg8sint' | 'r32uint' | 'r32sint' | 'r32float' | 'rg16uint' | 'rg16sint' | 'rg16float' | 'rgba8unorm' | 'rgba8unorm-srgb' | 'rgba8snorm' | 'rgba8uint' | 'rgba8sint' | 'bgra8unorm' | 'bgra8unorm-srgb' | 'rgb9e5ufloat' | 'rgb10a2uint' | 'rgb10a2unorm' | 'rg11b10ufloat' | 'rg32uint' | 'rg32sint' | 'rg32float' | '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';
299
+ export type GpuFrontFace = 'ccw' | 'cw';
301
300
  /**
302
301
  * # Variants
303
302
  *
304
- * ## `"clamp-to-edge"`
305
- *
306
- * ## `"repeat"`
303
+ * ## `"uint16"`
307
304
  *
308
- * ## `"mirror-repeat"`
305
+ * ## `"uint32"`
309
306
  */
310
- export type GpuAddressMode = 'clamp-to-edge' | 'repeat' | 'mirror-repeat';
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
- * ## `"nearest"`
319
+ * ## `"load"`
315
320
  *
316
- * ## `"linear"`
321
+ * ## `"clear"`
317
322
  */
318
- export type GpuFilterMode = 'nearest' | 'linear';
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
- * ## `"never"`
345
+ * ## `"validation"`
331
346
  *
332
- * ## `"less"`
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
- * ## `"equal"`
370
+ * ## `"low-power"`
335
371
  *
336
- * ## `"less-equal"`
372
+ * ## `"high-performance"`
373
+ */
374
+ export type GpuPowerPreference = 'low-power' | 'high-performance';
375
+ /**
376
+ * # Variants
337
377
  *
338
- * ## `"greater"`
378
+ * ## `"point-list"`
339
379
  *
340
- * ## `"not-equal"`
380
+ * ## `"line-list"`
341
381
  *
342
- * ## `"greater-equal"`
382
+ * ## `"line-strip"`
343
383
  *
344
- * ## `"always"`
384
+ * ## `"triangle-list"`
385
+ *
386
+ * ## `"triangle-strip"`
345
387
  */
346
- export type GpuCompareFunction = 'never' | 'less' | 'equal' | 'less-equal' | 'greater' | 'not-equal' | 'greater-equal' | 'always';
347
- export interface GpuSamplerDescriptor {
348
- addressModeU?: GpuAddressMode,
349
- addressModeV?: GpuAddressMode,
350
- addressModeW?: GpuAddressMode,
351
- magFilter?: GpuFilterMode,
352
- minFilter?: GpuFilterMode,
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
- * ## `"uniform"`
365
- *
366
- * ## `"storage"`
399
+ * ## `"occlusion"`
367
400
  *
368
- * ## `"read-only-storage"`
401
+ * ## `"timestamp"`
369
402
  */
370
- export type GpuBufferBindingType = 'uniform' | 'storage' | 'read-only-storage';
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
- * ## `"float"`
510
+ * ## `"keep"`
388
511
  *
389
- * ## `"unfilterable-float"`
512
+ * ## `"zero"`
390
513
  *
391
- * ## `"depth"`
514
+ * ## `"replace"`
392
515
  *
393
- * ## `"sint"`
516
+ * ## `"invert"`
394
517
  *
395
- * ## `"uint"`
518
+ * ## `"increment-clamp"`
519
+ *
520
+ * ## `"decrement-clamp"`
521
+ *
522
+ * ## `"increment-wrap"`
523
+ *
524
+ * ## `"decrement-wrap"`
396
525
  */
397
- export type GpuTextureSampleType = 'float' | 'unfilterable-float' | 'depth' | 'sint' | 'uint';
398
- export interface GpuTextureBindingLayout {
399
- sampleType?: GpuTextureSampleType,
400
- viewDimension?: GpuTextureViewDimension,
401
- multisampled?: boolean,
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
- * ## `"error"`
426
- *
427
- * ## `"warning"`
547
+ * ## `"store"`
428
548
  *
429
- * ## `"info"`
549
+ * ## `"discard"`
430
550
  */
431
- export type GpuCompilationMessageType = 'error' | 'warning' | 'info';
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
- * ## `"validation"`
566
+ * ## `"all"`
436
567
  *
437
- * ## `"internal"`
568
+ * ## `"stencil-only"`
569
+ *
570
+ * ## `"depth-only"`
438
571
  */
439
- export type GpuPipelineErrorReason = 'validation' | 'internal';
440
- export type GpuLayoutMode = GpuLayoutModeSpecific | GpuLayoutModeAuto;
441
- export interface GpuLayoutModeSpecific {
442
- tag: 'specific',
443
- val: GpuPipelineLayout,
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
- * ## `"point-list"`
472
- *
473
- * ## `"line-list"`
474
- *
475
- * ## `"line-strip"`
582
+ * ## `"d1"`
476
583
  *
477
- * ## `"triangle-list"`
584
+ * ## `"d2"`
478
585
  *
479
- * ## `"triangle-strip"`
586
+ * ## `"d3"`
480
587
  */
481
- export type GpuPrimitiveTopology = 'point-list' | 'line-list' | 'line-strip' | 'triangle-list' | 'triangle-strip';
588
+ export type GpuTextureDimension = 'd1' | 'd2' | 'd3';
482
589
  /**
483
590
  * # Variants
484
591
  *
485
- * ## `"ccw"`
592
+ * ## `"r8unorm"`
486
593
  *
487
- * ## `"cw"`
488
- */
489
- export type GpuFrontFace = 'ccw' | 'cw';
490
- /**
491
- * # Variants
594
+ * ## `"r8snorm"`
492
595
  *
493
- * ## `"none"`
596
+ * ## `"r8uint"`
494
597
  *
495
- * ## `"front"`
598
+ * ## `"r8sint"`
496
599
  *
497
- * ## `"back"`
498
- */
499
- export type GpuCullMode = 'none' | 'front' | 'back';
500
- export type GpuColorWriteFlags = number;
501
- /**
502
- * # Variants
600
+ * ## `"r16unorm"`
503
601
  *
504
- * ## `"zero"`
602
+ * ## `"r16snorm"`
505
603
  *
506
- * ## `"one"`
604
+ * ## `"r16uint"`
507
605
  *
508
- * ## `"src"`
606
+ * ## `"r16sint"`
509
607
  *
510
- * ## `"one-minus-src"`
608
+ * ## `"r16float"`
511
609
  *
512
- * ## `"src-alpha"`
610
+ * ## `"rg8unorm"`
513
611
  *
514
- * ## `"one-minus-src-alpha"`
612
+ * ## `"rg8snorm"`
515
613
  *
516
- * ## `"dst"`
614
+ * ## `"rg8uint"`
517
615
  *
518
- * ## `"one-minus-dst"`
616
+ * ## `"rg8sint"`
617
+ *
618
+ * ## `"r32uint"`
619
+ *
620
+ * ## `"r32sint"`
621
+ *
622
+ * ## `"r32float"`
623
+ *
624
+ * ## `"rg16unorm"`
519
625
  *
520
- * ## `"dst-alpha"`
626
+ * ## `"rg16snorm"`
521
627
  *
522
- * ## `"one-minus-dst-alpha"`
628
+ * ## `"rg16uint"`
523
629
  *
524
- * ## `"src-alpha-saturated"`
630
+ * ## `"rg16sint"`
525
631
  *
526
- * ## `"constant"`
632
+ * ## `"rg16float"`
527
633
  *
528
- * ## `"one-minus-constant"`
634
+ * ## `"rgba8unorm"`
529
635
  *
530
- * ## `"src1"`
636
+ * ## `"rgba8unorm-srgb"`
531
637
  *
532
- * ## `"one-minus-src1"`
638
+ * ## `"rgba8snorm"`
533
639
  *
534
- * ## `"src1-alpha"`
640
+ * ## `"rgba8uint"`
535
641
  *
536
- * ## `"one-minus-src1-alpha"`
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
- * ## `"add"`
644
+ * ## `"bgra8unorm"`
543
645
  *
544
- * ## `"subtract"`
646
+ * ## `"bgra8unorm-srgb"`
545
647
  *
546
- * ## `"reverse-subtract"`
648
+ * ## `"rgb9e5ufloat"`
547
649
  *
548
- * ## `"min"`
650
+ * ## `"rgb10a2uint"`
549
651
  *
550
- * ## `"max"`
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
- * ## `"keep"`
654
+ * ## `"rg11b10ufloat"`
577
655
  *
578
- * ## `"zero"`
656
+ * ## `"rg32uint"`
579
657
  *
580
- * ## `"replace"`
658
+ * ## `"rg32sint"`
581
659
  *
582
- * ## `"invert"`
660
+ * ## `"rg32float"`
583
661
  *
584
- * ## `"increment-clamp"`
662
+ * ## `"rgba16unorm"`
585
663
  *
586
- * ## `"decrement-clamp"`
664
+ * ## `"rgba16snorm"`
587
665
  *
588
- * ## `"increment-wrap"`
666
+ * ## `"rgba16uint"`
589
667
  *
590
- * ## `"decrement-wrap"`
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
- * ## `"uint16"`
670
+ * ## `"rgba16float"`
603
671
  *
604
- * ## `"uint32"`
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
- * ## `"uint8"`
674
+ * ## `"rgba32sint"`
618
675
  *
619
- * ## `"uint8x2"`
676
+ * ## `"rgba32float"`
620
677
  *
621
- * ## `"uint8x4"`
678
+ * ## `"stencil8"`
622
679
  *
623
- * ## `"sint8"`
680
+ * ## `"depth16unorm"`
624
681
  *
625
- * ## `"sint8x2"`
682
+ * ## `"depth24plus"`
626
683
  *
627
- * ## `"sint8x4"`
684
+ * ## `"depth24plus-stencil8"`
628
685
  *
629
- * ## `"unorm8"`
686
+ * ## `"depth32float"`
630
687
  *
631
- * ## `"unorm8x2"`
688
+ * ## `"depth32float-stencil8"`
632
689
  *
633
- * ## `"unorm8x4"`
690
+ * ## `"bc1-rgba-unorm"`
634
691
  *
635
- * ## `"snorm8"`
692
+ * ## `"bc1-rgba-unorm-srgb"`
636
693
  *
637
- * ## `"snorm8x2"`
694
+ * ## `"bc2-rgba-unorm"`
638
695
  *
639
- * ## `"snorm8x4"`
696
+ * ## `"bc2-rgba-unorm-srgb"`
640
697
  *
641
- * ## `"uint16"`
698
+ * ## `"bc3-rgba-unorm"`
642
699
  *
643
- * ## `"uint16x2"`
700
+ * ## `"bc3-rgba-unorm-srgb"`
644
701
  *
645
- * ## `"uint16x4"`
702
+ * ## `"bc4-r-unorm"`
646
703
  *
647
- * ## `"sint16"`
704
+ * ## `"bc4-r-snorm"`
648
705
  *
649
- * ## `"sint16x2"`
706
+ * ## `"bc5-rg-unorm"`
650
707
  *
651
- * ## `"sint16x4"`
708
+ * ## `"bc5-rg-snorm"`
652
709
  *
653
- * ## `"unorm16"`
710
+ * ## `"bc6h-rgb-ufloat"`
654
711
  *
655
- * ## `"unorm16x2"`
712
+ * ## `"bc6h-rgb-float"`
656
713
  *
657
- * ## `"unorm16x4"`
714
+ * ## `"bc7-rgba-unorm"`
658
715
  *
659
- * ## `"snorm16"`
716
+ * ## `"bc7-rgba-unorm-srgb"`
660
717
  *
661
- * ## `"snorm16x2"`
718
+ * ## `"etc2-rgb8unorm"`
662
719
  *
663
- * ## `"snorm16x4"`
720
+ * ## `"etc2-rgb8unorm-srgb"`
664
721
  *
665
- * ## `"float16"`
722
+ * ## `"etc2-rgb8a1unorm"`
666
723
  *
667
- * ## `"float16x2"`
724
+ * ## `"etc2-rgb8a1unorm-srgb"`
668
725
  *
669
- * ## `"float16x4"`
726
+ * ## `"etc2-rgba8unorm"`
670
727
  *
671
- * ## `"float32"`
728
+ * ## `"etc2-rgba8unorm-srgb"`
672
729
  *
673
- * ## `"float32x2"`
730
+ * ## `"eac-r11unorm"`
674
731
  *
675
- * ## `"float32x3"`
732
+ * ## `"eac-r11snorm"`
676
733
  *
677
- * ## `"float32x4"`
734
+ * ## `"eac-rg11unorm"`
678
735
  *
679
- * ## `"uint32"`
736
+ * ## `"eac-rg11snorm"`
680
737
  *
681
- * ## `"uint32x2"`
738
+ * ## `"astc4x4-unorm"`
682
739
  *
683
- * ## `"uint32x3"`
740
+ * ## `"astc4x4-unorm-srgb"`
684
741
  *
685
- * ## `"uint32x4"`
742
+ * ## `"astc5x4-unorm"`
686
743
  *
687
- * ## `"sint32"`
744
+ * ## `"astc5x4-unorm-srgb"`
688
745
  *
689
- * ## `"sint32x2"`
746
+ * ## `"astc5x5-unorm"`
690
747
  *
691
- * ## `"sint32x3"`
748
+ * ## `"astc5x5-unorm-srgb"`
692
749
  *
693
- * ## `"sint32x4"`
750
+ * ## `"astc6x5-unorm"`
694
751
  *
695
- * ## `"unorm1010102"`
752
+ * ## `"astc6x5-unorm-srgb"`
696
753
  *
697
- * ## `"unorm8x4-bgra"`
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
- * ## `"vertex"`
756
+ * ## `"astc6x6-unorm-srgb"`
704
757
  *
705
- * ## `"instance"`
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
- * ## `"load"`
760
+ * ## `"astc8x5-unorm-srgb"`
718
761
  *
719
- * ## `"clear"`
720
- */
721
- export type GpuLoadOp = 'load' | 'clear';
722
- /**
723
- * # Variants
762
+ * ## `"astc8x6-unorm"`
724
763
  *
725
- * ## `"store"`
764
+ * ## `"astc8x6-unorm-srgb"`
726
765
  *
727
- * ## `"discard"`
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
- * ## `"occlusion"`
768
+ * ## `"astc8x8-unorm-srgb"`
746
769
  *
747
- * ## `"timestamp"`
748
- */
749
- export type GpuQueryType = 'occlusion' | 'timestamp';
750
- /**
751
- * # Variants
770
+ * ## `"astc10x5-unorm"`
752
771
  *
753
- * ## `"opaque"`
772
+ * ## `"astc10x5-unorm-srgb"`
754
773
  *
755
- * ## `"premultiplied"`
756
- */
757
- export type GpuCanvasAlphaMode = 'opaque' | 'premultiplied';
758
- /**
759
- * # Variants
774
+ * ## `"astc10x6-unorm"`
760
775
  *
761
- * ## `"standard"`
776
+ * ## `"astc10x6-unorm-srgb"`
762
777
  *
763
- * ## `"extended"`
764
- */
765
- export type GpuCanvasToneMappingMode = 'standard' | 'extended';
766
- export interface GpuCanvasToneMapping {
767
- mode?: GpuCanvasToneMappingMode,
768
- }
769
- /**
770
- * # Variants
778
+ * ## `"astc10x8-unorm"`
771
779
  *
772
- * ## `"unknown"`
780
+ * ## `"astc10x8-unorm-srgb"`
773
781
  *
774
- * ## `"destroyed"`
775
- */
776
- export type GpuDeviceLostReason = 'unknown' | 'destroyed';
777
- /**
778
- * # Variants
782
+ * ## `"astc10x10-unorm"`
779
783
  *
780
- * ## `"validation"`
784
+ * ## `"astc10x10-unorm-srgb"`
781
785
  *
782
- * ## `"out-of-memory"`
786
+ * ## `"astc12x10-unorm"`
783
787
  *
784
- * ## `"internal"`
788
+ * ## `"astc12x10-unorm-srgb"`
789
+ *
790
+ * ## `"astc12x12-unorm"`
791
+ *
792
+ * ## `"astc12x12-unorm-srgb"`
785
793
  */
786
- export type GpuErrorFilter = 'validation' | 'out-of-memory' | 'internal';
787
- export type GpuBufferDynamicOffset = number;
788
- export type GpuStencilValue = number;
789
- export interface GpuRenderPassDepthStencilAttachment {
790
- view: GpuTextureView,
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 type GpuSize64 = bigint;
815
- export interface GpuBufferDescriptor {
816
- size: GpuSize64,
817
- usage: GpuBufferUsageFlags,
818
- mappedAtCreation?: boolean,
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
- export interface GpuBufferBindingLayout {
822
- type?: GpuBufferBindingType,
823
- hasDynamicOffset?: boolean,
824
- minBindingSize?: GpuSize64,
825
- }
826
- export interface GpuBufferBinding {
827
- buffer: GpuBuffer,
828
- offset?: GpuSize64,
829
- size?: GpuSize64,
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 GpuVertexAttribute {
879
- format: GpuVertexFormat,
880
- offset: GpuSize64,
881
- shaderLocation: GpuIndex32,
882
- }
883
- export interface GpuVertexBufferLayout {
884
- arrayStride: GpuSize64,
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 type GpuSize32 = number;
895
- export interface GpuMultisampleState {
896
- count?: GpuSize32,
897
- mask?: GpuSampleMask,
898
- alphaToCoverageEnabled?: boolean,
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 GpuRenderPipelineDescriptor {
901
- vertex: GpuVertexState,
902
- primitive?: GpuPrimitiveState,
903
- depthStencil?: GpuDepthStencilState,
904
- multisample?: GpuMultisampleState,
905
- fragment?: GpuFragmentState,
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
- export interface GpuTexelCopyBufferLayout {
910
- offset?: GpuSize64,
911
- bytesPerRow?: GpuSize32,
912
- rowsPerImage?: GpuSize32,
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 GpuTexelCopyBufferInfo {
915
- buffer: GpuBuffer,
916
- offset?: GpuSize64,
917
- bytesPerRow?: GpuSize32,
918
- rowsPerImage?: GpuSize32,
920
+ export interface GpuTextureBindingLayout {
921
+ sampleType?: GpuTextureSampleType,
922
+ viewDimension?: GpuTextureViewDimension,
923
+ multisampled?: boolean,
919
924
  }
920
- export interface GpuComputePassTimestampWrites {
921
- querySet: GpuQuerySet,
922
- beginningOfPassWriteIndex?: GpuSize32,
923
- endOfPassWriteIndex?: GpuSize32,
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 GpuComputePassDescriptor {
926
- timestampWrites?: GpuComputePassTimestampWrites,
933
+ export interface GpuBindGroupLayoutDescriptor {
934
+ entries: Array<GpuBindGroupLayoutEntry>,
927
935
  label?: string,
928
936
  }
929
- export interface GpuRenderPassTimestampWrites {
930
- querySet: GpuQuerySet,
931
- beginningOfPassWriteIndex?: GpuSize32,
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 GpuQuerySetDescriptor {
943
- type: GpuQueryType,
944
- count: GpuSize32,
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
- export type GpuSignedOffset32 = number;
948
- export type GpuSize64Out = bigint;
949
- export type GpuIntegerCoordinateOut = number;
950
- export type GpuSize32Out = number;
951
- export type GpuFlagsConstant = number;
952
- export interface GpuColor {
953
- r: number,
954
- g: number,
955
- b: number,
956
- a: number,
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 interface GpuRenderPassColorAttachment {
959
- view: GpuTextureView,
960
- depthSlice?: GpuIntegerCoordinate,
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 GpuRenderPassDescriptor {
967
- colorAttachments: Array<GpuRenderPassColorAttachment | undefined>,
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 GpuOrigin3D {
975
- x?: GpuIntegerCoordinate,
976
- y?: GpuIntegerCoordinate,
977
- z?: GpuIntegerCoordinate,
1071
+ export interface MapAsyncErrorKindAbortError {
1072
+ tag: 'abort-error',
978
1073
  }
979
- export interface GpuTexelCopyTextureInfo {
980
- texture: GpuTexture,
981
- mipLevel?: GpuIntegerCoordinate,
982
- origin?: GpuOrigin3D,
983
- aspect?: GpuTextureAspect,
1074
+ export interface MapAsyncError {
1075
+ kind: MapAsyncErrorKind,
1076
+ message: string,
984
1077
  }
985
- export interface GpuExtent3D {
986
- width: GpuIntegerCoordinate,
987
- height?: GpuIntegerCoordinate,
988
- depthOrArrayLayers?: GpuIntegerCoordinate,
1078
+ export type PopErrorScopeErrorKind = PopErrorScopeErrorKindOperationError;
1079
+ export interface PopErrorScopeErrorKindOperationError {
1080
+ tag: 'operation-error',
989
1081
  }
990
- export interface GpuTextureDescriptor {
991
- size: GpuExtent3D,
992
- mipLevelCount?: GpuIntegerCoordinate,
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?: GpuTextureUsageFlags,
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?: GpuTextureUsageFlags,
1106
+ usage?: GpuTextureUsage,
1029
1107
  viewFormats?: Array<GpuTextureFormat>,
1030
1108
  colorSpace?: PredefinedColorSpace,
1031
1109
  toneMapping?: GpuCanvasToneMapping,
1032
1110
  alphaMode?: GpuCanvasAlphaMode,
1033
1111
  }
1034
- export type GpuErrorKind = GpuErrorKindValidationError | GpuErrorKindOutOfMemoryError | GpuErrorKindInternalError;
1035
- export interface GpuErrorKindValidationError {
1036
- tag: 'validation-error',
1112
+ export interface GpuFragmentState {
1113
+ targets: Array<GpuColorTargetState | undefined>,
1114
+ module: GpuShaderModule,
1115
+ entryPoint?: string,
1116
+ constants?: RecordGpuPipelineConstantValue,
1037
1117
  }
1038
- export interface GpuErrorKindOutOfMemoryError {
1039
- tag: 'out-of-memory-error',
1118
+ export interface GpuProgrammableStage {
1119
+ module: GpuShaderModule,
1120
+ entryPoint?: string,
1121
+ constants?: RecordGpuPipelineConstantValue,
1040
1122
  }
1041
- export interface GpuErrorKindInternalError {
1042
- tag: 'internal-error',
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 CreatePipelineErrorKind = CreatePipelineErrorKindGpuPipelineError;
1056
- export interface CreatePipelineErrorKindGpuPipelineError {
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 GetMappedRangeErrorKindTypeError {
1102
- tag: 'type-error',
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
- isFallbackAdapter(): boolean;
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(): GpuFlagsConstant;
1245
+ usage(): GpuBufferUsage;
1194
1246
  mapState(): GpuBufferMapState;
1195
- mapAsync(mode: GpuMapModeFlags, offset: GpuSize64 | undefined, size: GpuSize64 | undefined): void;
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
- onuncapturederrorSubscribe(): Pollable;
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(): GpuFlagsConstant;
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 {