@luma.gl/webgpu 9.1.9 → 9.2.0-alpha.2
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/dist/adapter/helpers/accessor-to-format.js +1 -0
- package/dist/adapter/helpers/accessor-to-format.js.map +1 -1
- package/dist/adapter/helpers/get-bind-group.d.ts +3 -1
- package/dist/adapter/helpers/get-bind-group.d.ts.map +1 -1
- package/dist/adapter/helpers/get-bind-group.js +28 -10
- package/dist/adapter/helpers/get-bind-group.js.map +1 -1
- package/dist/adapter/helpers/get-vertex-buffer-layout.js +5 -5
- package/dist/adapter/helpers/get-vertex-buffer-layout.js.map +1 -1
- package/dist/adapter/helpers/webgpu-parameters.d.ts.map +1 -1
- package/dist/adapter/helpers/webgpu-parameters.js +89 -75
- package/dist/adapter/helpers/webgpu-parameters.js.map +1 -1
- package/dist/adapter/resources/webgpu-buffer.d.ts +13 -16
- package/dist/adapter/resources/webgpu-buffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-buffer.js +132 -93
- package/dist/adapter/resources/webgpu-buffer.js.map +1 -1
- package/dist/adapter/resources/webgpu-command-buffer.d.ts +10 -0
- package/dist/adapter/resources/webgpu-command-buffer.d.ts.map +1 -0
- package/dist/adapter/resources/webgpu-command-buffer.js +18 -0
- package/dist/adapter/resources/webgpu-command-buffer.js.map +1 -0
- package/dist/adapter/resources/webgpu-command-encoder.d.ts +12 -5
- package/dist/adapter/resources/webgpu-command-encoder.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-command-encoder.js +28 -5
- package/dist/adapter/resources/webgpu-command-encoder.js.map +1 -1
- package/dist/adapter/resources/webgpu-compute-pass.js +1 -1
- package/dist/adapter/resources/webgpu-compute-pass.js.map +1 -1
- package/dist/adapter/resources/webgpu-compute-pipeline.d.ts +2 -2
- package/dist/adapter/resources/webgpu-compute-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-compute-pipeline.js.map +1 -1
- package/dist/adapter/resources/webgpu-external-texture.d.ts +2 -2
- package/dist/adapter/resources/webgpu-external-texture.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-external-texture.js.map +1 -1
- package/dist/adapter/resources/webgpu-framebuffer.d.ts +3 -2
- package/dist/adapter/resources/webgpu-framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-framebuffer.js +1 -0
- package/dist/adapter/resources/webgpu-framebuffer.js.map +1 -1
- package/dist/adapter/resources/webgpu-pipeline-layout.d.ts +2 -2
- package/dist/adapter/resources/webgpu-pipeline-layout.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-pipeline-layout.js +5 -2
- package/dist/adapter/resources/webgpu-pipeline-layout.js.map +1 -1
- package/dist/adapter/resources/webgpu-render-pass.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-render-pass.js +11 -6
- package/dist/adapter/resources/webgpu-render-pass.js.map +1 -1
- package/dist/adapter/resources/webgpu-render-pipeline.d.ts +5 -4
- package/dist/adapter/resources/webgpu-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-render-pipeline.js +33 -20
- package/dist/adapter/resources/webgpu-render-pipeline.js.map +1 -1
- package/dist/adapter/resources/webgpu-sampler.js +1 -1
- package/dist/adapter/resources/webgpu-sampler.js.map +1 -1
- package/dist/adapter/resources/webgpu-shader.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-shader.js +7 -8
- package/dist/adapter/resources/webgpu-shader.js.map +1 -1
- package/dist/adapter/resources/webgpu-texture-view.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-texture-view.js +15 -10
- package/dist/adapter/resources/webgpu-texture-view.js.map +1 -1
- package/dist/adapter/resources/webgpu-texture.d.ts +4 -37
- package/dist/adapter/resources/webgpu-texture.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-texture.js +97 -126
- package/dist/adapter/resources/webgpu-texture.js.map +1 -1
- package/dist/adapter/resources/webgpu-vertex-array.d.ts +2 -2
- package/dist/adapter/resources/webgpu-vertex-array.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-vertex-array.js +2 -2
- package/dist/adapter/resources/webgpu-vertex-array.js.map +1 -1
- package/dist/adapter/webgpu-adapter.d.ts +2 -3
- package/dist/adapter/webgpu-adapter.d.ts.map +1 -1
- package/dist/adapter/webgpu-adapter.js +54 -43
- package/dist/adapter/webgpu-adapter.js.map +1 -1
- package/dist/adapter/webgpu-canvas-context.d.ts +7 -15
- package/dist/adapter/webgpu-canvas-context.d.ts.map +1 -1
- package/dist/adapter/webgpu-canvas-context.js +50 -72
- package/dist/adapter/webgpu-canvas-context.js.map +1 -1
- package/dist/adapter/webgpu-device.d.ts +16 -27
- package/dist/adapter/webgpu-device.d.ts.map +1 -1
- package/dist/adapter/webgpu-device.js +48 -65
- package/dist/adapter/webgpu-device.js.map +1 -1
- package/dist/dist.dev.js +1919 -1520
- package/dist/dist.min.js +6 -5
- package/dist/index.cjs +1749 -1397
- package/dist/index.cjs.map +4 -4
- package/package.json +3 -3
- package/src/adapter/helpers/get-bind-group.ts +31 -11
- package/src/adapter/helpers/get-vertex-buffer-layout.ts +5 -5
- package/src/adapter/helpers/webgpu-parameters.ts +114 -102
- package/src/adapter/resources/webgpu-buffer.ts +163 -102
- package/src/adapter/resources/webgpu-command-buffer.ts +24 -0
- package/src/adapter/resources/webgpu-command-encoder.ts +34 -4
- package/src/adapter/resources/webgpu-compute-pass.ts +1 -1
- package/src/adapter/resources/webgpu-compute-pipeline.ts +2 -2
- package/src/adapter/resources/webgpu-external-texture.ts +2 -2
- package/src/adapter/resources/webgpu-framebuffer.ts +3 -2
- package/src/adapter/resources/webgpu-pipeline-layout.ts +8 -3
- package/src/adapter/resources/webgpu-render-pass.ts +11 -6
- package/src/adapter/resources/webgpu-render-pipeline.ts +39 -24
- package/src/adapter/resources/webgpu-sampler.ts +1 -1
- package/src/adapter/resources/webgpu-shader.ts +11 -8
- package/src/adapter/resources/webgpu-texture-view.ts +14 -8
- package/src/adapter/resources/webgpu-texture.ts +106 -186
- package/src/adapter/resources/webgpu-vertex-array.ts +2 -2
- package/src/adapter/webgpu-adapter.ts +72 -58
- package/src/adapter/webgpu-canvas-context.ts +62 -82
- package/src/adapter/webgpu-device.ts +66 -105
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import { CanvasContext, log } from '@luma.gl/core';
|
|
5
|
-
import { getWebGPUTextureFormat } from "./helpers/convert-texture-format.js";
|
|
4
|
+
import { CanvasContext, Texture, log } from '@luma.gl/core';
|
|
6
5
|
import { WebGPUFramebuffer } from "./resources/webgpu-framebuffer.js";
|
|
7
6
|
/**
|
|
8
7
|
* Holds a WebGPU Canvas Context
|
|
@@ -11,109 +10,88 @@ import { WebGPUFramebuffer } from "./resources/webgpu-framebuffer.js";
|
|
|
11
10
|
*/
|
|
12
11
|
export class WebGPUCanvasContext extends CanvasContext {
|
|
13
12
|
device;
|
|
14
|
-
|
|
15
|
-
/** Format of returned textures: "bgra8unorm", "rgba8unorm", "rgba16float". */
|
|
16
|
-
format = navigator.gpu.getPreferredCanvasFormat();
|
|
17
|
-
/** Default stencil format for depth textures */
|
|
18
|
-
depthStencilFormat = 'depth24plus';
|
|
13
|
+
handle;
|
|
19
14
|
depthStencilAttachment = null;
|
|
20
15
|
get [Symbol.toStringTag]() {
|
|
21
16
|
return 'WebGPUCanvasContext';
|
|
22
17
|
}
|
|
23
18
|
constructor(device, adapter, props) {
|
|
24
19
|
super(props);
|
|
20
|
+
const context = this.canvas.getContext('webgpu');
|
|
21
|
+
if (!context) {
|
|
22
|
+
throw new Error(`${this}: Failed to create WebGPU canvas context`);
|
|
23
|
+
}
|
|
25
24
|
this.device = device;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.height = -1;
|
|
25
|
+
this.handle = context;
|
|
26
|
+
// Base class constructor cannot access derived methods/fields, so we need to call these functions in the subclass constructor
|
|
29
27
|
this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);
|
|
30
|
-
|
|
31
|
-
this.gpuCanvasContext = this.canvas.getContext('webgpu');
|
|
32
|
-
// TODO this has been replaced
|
|
33
|
-
// this.format = this.gpuCanvasContext.getPreferredFormat(adapter);
|
|
34
|
-
this.format = 'bgra8unorm';
|
|
28
|
+
this._updateDevice();
|
|
35
29
|
}
|
|
36
30
|
/** Destroy any textures produced while configured and remove the context configuration. */
|
|
37
31
|
destroy() {
|
|
38
|
-
this.
|
|
32
|
+
this.handle.unconfigure();
|
|
33
|
+
super.destroy();
|
|
39
34
|
}
|
|
40
35
|
/** Update framebuffer with properly resized "swap chain" texture views */
|
|
41
|
-
getCurrentFramebuffer(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// Wrap the current canvas context texture in a luma.gl texture
|
|
45
|
-
// const currentColorAttachment = this.device.createTexture({
|
|
46
|
-
// id: 'default-render-target',
|
|
47
|
-
// handle: this.gpuCanvasContext.getCurrentTexture(),
|
|
48
|
-
// format: this.format,
|
|
49
|
-
// width: this.width,
|
|
50
|
-
// height: this.height
|
|
51
|
-
// });
|
|
36
|
+
getCurrentFramebuffer(options = {
|
|
37
|
+
depthStencilFormat: 'depth24plus'
|
|
38
|
+
}) {
|
|
52
39
|
// Wrap the current canvas context texture in a luma.gl texture
|
|
53
40
|
const currentColorAttachment = this.getCurrentTexture();
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
// TODO - temporary debug code
|
|
42
|
+
if (currentColorAttachment.width !== this.drawingBufferWidth ||
|
|
43
|
+
currentColorAttachment.height !== this.drawingBufferHeight) {
|
|
44
|
+
const [oldWidth, oldHeight] = this.getDrawingBufferSize();
|
|
45
|
+
this.drawingBufferWidth = currentColorAttachment.width;
|
|
46
|
+
this.drawingBufferHeight = currentColorAttachment.height;
|
|
47
|
+
log.log(1, `${this}: Resized to compensate for initial canvas size mismatch ${oldWidth}x${oldHeight} => ${this.drawingBufferWidth}x${this.drawingBufferHeight}px`)();
|
|
48
|
+
}
|
|
56
49
|
// Resize the depth stencil attachment
|
|
57
|
-
|
|
50
|
+
if (options?.depthStencilFormat) {
|
|
51
|
+
this._createDepthStencilAttachment(options?.depthStencilFormat);
|
|
52
|
+
}
|
|
58
53
|
return new WebGPUFramebuffer(this.device, {
|
|
59
54
|
colorAttachments: [currentColorAttachment],
|
|
60
55
|
depthStencilAttachment: this.depthStencilAttachment
|
|
61
56
|
});
|
|
62
57
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const sizeChanged = newWidth !== oldWidth || newHeight !== oldHeight;
|
|
69
|
-
if (sizeChanged) {
|
|
70
|
-
this.width = newWidth;
|
|
71
|
-
this.height = newHeight;
|
|
72
|
-
if (this.depthStencilAttachment) {
|
|
73
|
-
this.depthStencilAttachment.destroy();
|
|
74
|
-
this.depthStencilAttachment = null;
|
|
75
|
-
}
|
|
76
|
-
// Reconfigure the canvas size.
|
|
77
|
-
// https://www.w3.org/TR/webgpu/#canvas-configuration
|
|
78
|
-
this.gpuCanvasContext.configure({
|
|
79
|
-
device: this.device.handle,
|
|
80
|
-
format: getWebGPUTextureFormat(this.format),
|
|
81
|
-
// Can be used to define e.g. -srgb views
|
|
82
|
-
// viewFormats: [...]
|
|
83
|
-
colorSpace: this.props.colorSpace,
|
|
84
|
-
alphaMode: this.props.alphaMode
|
|
85
|
-
});
|
|
86
|
-
log.log(1, `${this} Resized ${oldWidth}x${oldHeight} => ${newWidth}x${newHeight}px`)();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
resize(options) {
|
|
90
|
-
this.update();
|
|
91
|
-
if (!this.device.handle)
|
|
92
|
-
return;
|
|
93
|
-
// Resize browser context .
|
|
94
|
-
if (this.canvas) {
|
|
95
|
-
const devicePixelRatio = this.getDevicePixelRatio(options?.useDevicePixels);
|
|
96
|
-
this.setDevicePixelRatio(devicePixelRatio, options);
|
|
97
|
-
return;
|
|
58
|
+
// IMPLEMENTATION OF ABSTRACT METHODS
|
|
59
|
+
_updateDevice() {
|
|
60
|
+
if (this.depthStencilAttachment) {
|
|
61
|
+
this.depthStencilAttachment.destroy();
|
|
62
|
+
this.depthStencilAttachment = null;
|
|
98
63
|
}
|
|
64
|
+
// Reconfigure the canvas size.
|
|
65
|
+
// https://www.w3.org/TR/webgpu/#canvas-configuration
|
|
66
|
+
this.handle.configure({
|
|
67
|
+
device: this.device.handle,
|
|
68
|
+
format: this.device.preferredColorFormat,
|
|
69
|
+
// Can be used to define e.g. -srgb views
|
|
70
|
+
// viewFormats: [...]
|
|
71
|
+
colorSpace: this.props.colorSpace,
|
|
72
|
+
alphaMode: this.props.alphaMode
|
|
73
|
+
});
|
|
99
74
|
}
|
|
100
75
|
/** Wrap the current canvas context texture in a luma.gl texture */
|
|
101
76
|
getCurrentTexture() {
|
|
77
|
+
const handle = this.handle.getCurrentTexture();
|
|
102
78
|
return this.device.createTexture({
|
|
103
79
|
id: `${this.id}#color-texture`,
|
|
104
|
-
handle
|
|
105
|
-
format: this.
|
|
80
|
+
handle,
|
|
81
|
+
format: this.device.preferredColorFormat,
|
|
82
|
+
width: handle.width,
|
|
83
|
+
height: handle.height
|
|
106
84
|
});
|
|
107
85
|
}
|
|
108
86
|
/** We build render targets on demand (i.e. not when size changes but when about to render) */
|
|
109
|
-
_createDepthStencilAttachment() {
|
|
87
|
+
_createDepthStencilAttachment(depthStencilFormat) {
|
|
110
88
|
if (!this.depthStencilAttachment) {
|
|
111
89
|
this.depthStencilAttachment = this.device.createTexture({
|
|
112
90
|
id: `${this.id}#depth-stencil-texture`,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
91
|
+
usage: Texture.RENDER_ATTACHMENT,
|
|
92
|
+
format: depthStencilFormat,
|
|
93
|
+
width: this.drawingBufferWidth,
|
|
94
|
+
height: this.drawingBufferHeight
|
|
117
95
|
});
|
|
118
96
|
}
|
|
119
97
|
return this.depthStencilAttachment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu-canvas-context.js","sourceRoot":"","sources":["../../src/adapter/webgpu-canvas-context.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"webgpu-canvas-context.js","sourceRoot":"","sources":["../../src/adapter/webgpu-canvas-context.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AAMpC,OAAO,EAAC,aAAa,EAAE,OAAO,EAAE,GAAG,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,iBAAiB,EAAC,0CAAuC;AAGjE;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IAC3C,MAAM,CAAe;IACrB,MAAM,CAAmB;IAE1B,sBAAsB,GAAyB,IAAI,CAAC;IAE5D,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IAED,YAAY,MAAoB,EAAE,OAAmB,EAAE,KAAyB;QAC9E,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,0CAA0C,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QAEtB,8HAA8H;QAC9H,IAAI,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;QACzD,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAED,2FAA2F;IAClF,OAAO;QACd,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QAC1B,KAAK,CAAC,OAAO,EAAE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AM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;YAC1B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB;YACxC,yCAAyC;YACzC,qBAAqB;YACrB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU;YACjC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;SAChC,CAAC,CAAC;IACL,CAAC;IAED,mEAAmE;IACnE,iBAAiB;QACf,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;YAC/B,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,gBAAgB;YAC9B,MAAM;YACN,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB;YACxC,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC,CAAC;IACL,CAAC;IAED,8FAA8F;IAC9F,6BAA6B,CAAC,kBAA6C;QACzE,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC;YACjC,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;gBACtD,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,wBAAwB;gBACtC,KAAK,EAAE,OAAO,CAAC,iBAAiB;gBAChC,MAAM,EAAE,kBAAkB;gBAC1B,KAAK,EAAE,IAAI,CAAC,kBAAkB;gBAC9B,MAAM,EAAE,IAAI,CAAC,mBAAmB;aACjC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeviceInfo, DeviceLimits, DeviceTextureFormatCapabilities, CanvasContextProps, BufferProps, SamplerProps, ShaderProps,
|
|
1
|
+
import type { DeviceInfo, DeviceLimits, DeviceTextureFormatCapabilities, VertexFormat, CanvasContextProps, BufferProps, SamplerProps, ShaderProps, TextureProps, ExternalTextureProps, FramebufferProps, RenderPipelineProps, ComputePipelineProps, VertexArrayProps, TransformFeedback, TransformFeedbackProps, QuerySet, QuerySetProps, DeviceProps, CommandEncoderProps, PipelineLayoutProps } from '@luma.gl/core';
|
|
2
2
|
import { Device, DeviceFeatures } from '@luma.gl/core';
|
|
3
3
|
import { WebGPUBuffer } from "./resources/webgpu-buffer.js";
|
|
4
4
|
import { WebGPUTexture } from "./resources/webgpu-texture.js";
|
|
@@ -8,19 +8,21 @@ import { WebGPUShader } from "./resources/webgpu-shader.js";
|
|
|
8
8
|
import { WebGPURenderPipeline } from "./resources/webgpu-render-pipeline.js";
|
|
9
9
|
import { WebGPUFramebuffer } from "./resources/webgpu-framebuffer.js";
|
|
10
10
|
import { WebGPUComputePipeline } from "./resources/webgpu-compute-pipeline.js";
|
|
11
|
-
import { WebGPURenderPass } from "./resources/webgpu-render-pass.js";
|
|
12
|
-
import { WebGPUComputePass } from "./resources/webgpu-compute-pass.js";
|
|
13
11
|
import { WebGPUVertexArray } from "./resources/webgpu-vertex-array.js";
|
|
14
12
|
import { WebGPUCanvasContext } from "./webgpu-canvas-context.js";
|
|
13
|
+
import { WebGPUCommandEncoder } from "./resources/webgpu-command-encoder.js";
|
|
14
|
+
import { WebGPUCommandBuffer } from "./resources/webgpu-command-buffer.js";
|
|
15
15
|
import { WebGPUPipelineLayout } from "./resources/webgpu-pipeline-layout.js";
|
|
16
16
|
/** WebGPU Device implementation */
|
|
17
17
|
export declare class WebGPUDevice extends Device {
|
|
18
|
-
/** type of this device */
|
|
19
|
-
readonly type = "webgpu";
|
|
20
18
|
/** The underlying WebGPU device */
|
|
21
19
|
readonly handle: GPUDevice;
|
|
22
20
|
readonly adapter: GPUAdapter;
|
|
23
21
|
readonly adapterInfo: GPUAdapterInfo;
|
|
22
|
+
/** type of this device */
|
|
23
|
+
readonly type = "webgpu";
|
|
24
|
+
readonly preferredColorFormat: "rgba8unorm" | "bgra8unorm";
|
|
25
|
+
readonly preferredDepthFormat = "depth24plus";
|
|
24
26
|
readonly features: DeviceFeatures;
|
|
25
27
|
readonly info: DeviceInfo;
|
|
26
28
|
readonly limits: DeviceLimits;
|
|
@@ -30,11 +32,14 @@ export declare class WebGPUDevice extends Device {
|
|
|
30
32
|
}>;
|
|
31
33
|
canvasContext: WebGPUCanvasContext | null;
|
|
32
34
|
private _isLost;
|
|
33
|
-
commandEncoder:
|
|
34
|
-
|
|
35
|
+
commandEncoder: WebGPUCommandEncoder;
|
|
36
|
+
get [Symbol.toStringTag](): string;
|
|
37
|
+
toString(): string;
|
|
35
38
|
constructor(props: DeviceProps, device: GPUDevice, adapter: GPUAdapter, adapterInfo: GPUAdapterInfo);
|
|
36
39
|
destroy(): void;
|
|
37
40
|
get isLost(): boolean;
|
|
41
|
+
isVertexFormatSupported(format: VertexFormat): boolean;
|
|
42
|
+
getTextureByteAlignment(): number;
|
|
38
43
|
createBuffer(props: BufferProps | ArrayBuffer | ArrayBufferView): WebGPUBuffer;
|
|
39
44
|
createTexture(props: TextureProps): WebGPUTexture;
|
|
40
45
|
createExternalTexture(props: ExternalTextureProps): WebGPUExternalTexture;
|
|
@@ -44,32 +49,16 @@ export declare class WebGPUDevice extends Device {
|
|
|
44
49
|
createFramebuffer(props: FramebufferProps): WebGPUFramebuffer;
|
|
45
50
|
createComputePipeline(props: ComputePipelineProps): WebGPUComputePipeline;
|
|
46
51
|
createVertexArray(props: VertexArrayProps): WebGPUVertexArray;
|
|
47
|
-
|
|
48
|
-
* Allows a render pass to begin against a canvas context
|
|
49
|
-
* @todo need to support a "Framebuffer" equivalent (aka preconfigured RenderPassDescriptors?).
|
|
50
|
-
*/
|
|
51
|
-
beginRenderPass(props: RenderPassProps): WebGPURenderPass;
|
|
52
|
-
beginComputePass(props: ComputePassProps): WebGPUComputePass;
|
|
52
|
+
createCommandEncoder(props?: CommandEncoderProps): WebGPUCommandEncoder;
|
|
53
53
|
createTransformFeedback(props: TransformFeedbackProps): TransformFeedback;
|
|
54
54
|
createQuerySet(props: QuerySetProps): QuerySet;
|
|
55
55
|
createCanvasContext(props: CanvasContextProps): WebGPUCanvasContext;
|
|
56
56
|
createPipelineLayout(props: PipelineLayoutProps): WebGPUPipelineLayout;
|
|
57
|
-
submit(): void;
|
|
57
|
+
submit(commandBuffer?: WebGPUCommandBuffer): void;
|
|
58
|
+
pushErrorScope(scope: 'validation' | 'out-of-memory'): void;
|
|
59
|
+
popErrorScope(handler: (error: GPUError) => void): void;
|
|
58
60
|
protected _getInfo(): DeviceInfo;
|
|
59
61
|
protected _getFeatures(): DeviceFeatures;
|
|
60
62
|
_getDeviceSpecificTextureFormatCapabilities(capabilities: DeviceTextureFormatCapabilities): DeviceTextureFormatCapabilities;
|
|
61
|
-
copyExternalImageToTexture(options: {
|
|
62
|
-
texture: Texture;
|
|
63
|
-
mipLevel?: number;
|
|
64
|
-
aspect?: 'all' | 'stencil-only' | 'depth-only';
|
|
65
|
-
colorSpace?: 'display-p3' | 'srgb';
|
|
66
|
-
premultipliedAlpha?: boolean;
|
|
67
|
-
source: ImageBitmap | HTMLVideoElement | HTMLCanvasElement | OffscreenCanvas;
|
|
68
|
-
sourceX?: number;
|
|
69
|
-
sourceY?: number;
|
|
70
|
-
width?: number;
|
|
71
|
-
height?: number;
|
|
72
|
-
depth?: number;
|
|
73
|
-
}): void;
|
|
74
63
|
}
|
|
75
64
|
//# sourceMappingURL=webgpu-device.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu-device.d.ts","sourceRoot":"","sources":["../../src/adapter/webgpu-device.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EAEZ,+BAA+B,EAC/B,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"webgpu-device.d.ts","sourceRoot":"","sources":["../../src/adapter/webgpu-device.ts"],"names":[],"mappings":"AAOA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AAC,EAAE,mBAAmB,GAAG,oBAAoB;IAMhF,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,iBAAiB;IAIhE,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ;IAIvD,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,GAAG,mBAAmB;IAInE,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,oBAAoB;IAItE,MAAM,CAAC,aAAa,CAAC,EAAE,mBAAmB,GAAG,IAAI;IAiBjD,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,eAAe,GAAG,IAAI;IAI3D,aAAa,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAUvD,SAAS,CAAC,QAAQ,IAAI,UAAU;IA2BhC,SAAS,CAAC,YAAY,IAAI,cAAc;IAiC/B,2CAA2C,CAClD,YAAY,EAAE,+BAA+B,GAC5C,+BAA+B;CAOnC"}
|
|
@@ -10,31 +10,36 @@ import { WebGPUShader } from "./resources/webgpu-shader.js";
|
|
|
10
10
|
import { WebGPURenderPipeline } from "./resources/webgpu-render-pipeline.js";
|
|
11
11
|
import { WebGPUFramebuffer } from "./resources/webgpu-framebuffer.js";
|
|
12
12
|
import { WebGPUComputePipeline } from "./resources/webgpu-compute-pipeline.js";
|
|
13
|
-
import { WebGPURenderPass } from "./resources/webgpu-render-pass.js";
|
|
14
|
-
import { WebGPUComputePass } from "./resources/webgpu-compute-pass.js";
|
|
15
|
-
// import {WebGPUCommandEncoder} from './resources/webgpu-command-encoder';
|
|
16
13
|
import { WebGPUVertexArray } from "./resources/webgpu-vertex-array.js";
|
|
17
14
|
import { WebGPUCanvasContext } from "./webgpu-canvas-context.js";
|
|
15
|
+
import { WebGPUCommandEncoder } from "./resources/webgpu-command-encoder.js";
|
|
18
16
|
import { WebGPUQuerySet } from "./resources/webgpu-query-set.js";
|
|
19
17
|
import { WebGPUPipelineLayout } from "./resources/webgpu-pipeline-layout.js";
|
|
20
18
|
/** WebGPU Device implementation */
|
|
21
19
|
export class WebGPUDevice extends Device {
|
|
22
|
-
/** type of this device */
|
|
23
|
-
type = 'webgpu';
|
|
24
20
|
/** The underlying WebGPU device */
|
|
25
21
|
handle;
|
|
26
22
|
/* The underlying WebGPU adapter */
|
|
27
23
|
adapter;
|
|
28
24
|
/* The underlying WebGPU adapter's info */
|
|
29
25
|
adapterInfo;
|
|
26
|
+
/** type of this device */
|
|
27
|
+
type = 'webgpu';
|
|
28
|
+
preferredColorFormat = navigator.gpu.getPreferredCanvasFormat();
|
|
29
|
+
preferredDepthFormat = 'depth24plus';
|
|
30
30
|
features;
|
|
31
31
|
info;
|
|
32
32
|
limits;
|
|
33
33
|
lost;
|
|
34
34
|
canvasContext = null;
|
|
35
35
|
_isLost = false;
|
|
36
|
-
commandEncoder
|
|
37
|
-
|
|
36
|
+
commandEncoder;
|
|
37
|
+
get [Symbol.toStringTag]() {
|
|
38
|
+
return 'WebGPUDevice';
|
|
39
|
+
}
|
|
40
|
+
toString() {
|
|
41
|
+
return `WebGPUDevice(${this.id})`;
|
|
42
|
+
}
|
|
38
43
|
constructor(props, device, adapter, adapterInfo) {
|
|
39
44
|
super({ ...props, id: props.id || 'webgpu-device' });
|
|
40
45
|
this.handle = device;
|
|
@@ -45,14 +50,11 @@ export class WebGPUDevice extends Device {
|
|
|
45
50
|
this.limits = this.handle.limits;
|
|
46
51
|
// Listen for uncaptured WebGPU errors
|
|
47
52
|
device.addEventListener('uncapturederror', (event) => {
|
|
53
|
+
event.preventDefault();
|
|
48
54
|
// TODO is this the right way to make sure the error is an Error instance?
|
|
49
55
|
const errorMessage = event instanceof GPUUncapturedErrorEvent ? event.error.message : 'Unknown WebGPU error';
|
|
50
|
-
this.reportError(new Error(errorMessage));
|
|
51
|
-
|
|
52
|
-
// eslint-disable-next-line no-debugger
|
|
53
|
-
debugger;
|
|
54
|
-
}
|
|
55
|
-
event.preventDefault();
|
|
56
|
+
this.reportError(new Error(errorMessage), this)();
|
|
57
|
+
this.debug();
|
|
56
58
|
});
|
|
57
59
|
// "Context" loss handling
|
|
58
60
|
this.lost = new Promise(async (resolve) => {
|
|
@@ -65,6 +67,7 @@ export class WebGPUDevice extends Device {
|
|
|
65
67
|
if (canvasContextProps) {
|
|
66
68
|
this.canvasContext = new WebGPUCanvasContext(this, this.adapter, canvasContextProps);
|
|
67
69
|
}
|
|
70
|
+
this.commandEncoder = this.createCommandEncoder({});
|
|
68
71
|
}
|
|
69
72
|
// TODO
|
|
70
73
|
// Load the glslang module now so that it is available synchronously when compiling shaders
|
|
@@ -76,6 +79,13 @@ export class WebGPUDevice extends Device {
|
|
|
76
79
|
get isLost() {
|
|
77
80
|
return this._isLost;
|
|
78
81
|
}
|
|
82
|
+
isVertexFormatSupported(format) {
|
|
83
|
+
const info = this.getVertexFormatInfo(format);
|
|
84
|
+
return !info.webglOnly;
|
|
85
|
+
}
|
|
86
|
+
getTextureByteAlignment() {
|
|
87
|
+
return 1;
|
|
88
|
+
}
|
|
79
89
|
createBuffer(props) {
|
|
80
90
|
const newProps = this._normalizeBufferProps(props);
|
|
81
91
|
return new WebGPUBuffer(this, newProps);
|
|
@@ -104,22 +114,10 @@ export class WebGPUDevice extends Device {
|
|
|
104
114
|
createVertexArray(props) {
|
|
105
115
|
return new WebGPUVertexArray(this, props);
|
|
106
116
|
}
|
|
117
|
+
createCommandEncoder(props) {
|
|
118
|
+
return new WebGPUCommandEncoder(this, props);
|
|
119
|
+
}
|
|
107
120
|
// WebGPU specifics
|
|
108
|
-
/**
|
|
109
|
-
* Allows a render pass to begin against a canvas context
|
|
110
|
-
* @todo need to support a "Framebuffer" equivalent (aka preconfigured RenderPassDescriptors?).
|
|
111
|
-
*/
|
|
112
|
-
beginRenderPass(props) {
|
|
113
|
-
this.commandEncoder = this.commandEncoder || this.handle.createCommandEncoder();
|
|
114
|
-
return new WebGPURenderPass(this, props);
|
|
115
|
-
}
|
|
116
|
-
beginComputePass(props) {
|
|
117
|
-
this.commandEncoder = this.commandEncoder || this.handle.createCommandEncoder();
|
|
118
|
-
return new WebGPUComputePass(this, props);
|
|
119
|
-
}
|
|
120
|
-
// createCommandEncoder(props: CommandEncoderProps): WebGPUCommandEncoder {
|
|
121
|
-
// return new WebGPUCommandEncoder(this, props);
|
|
122
|
-
// }
|
|
123
121
|
createTransformFeedback(props) {
|
|
124
122
|
throw new Error('Transform feedback not supported in WebGPU');
|
|
125
123
|
}
|
|
@@ -132,17 +130,29 @@ export class WebGPUDevice extends Device {
|
|
|
132
130
|
createPipelineLayout(props) {
|
|
133
131
|
return new WebGPUPipelineLayout(this, props);
|
|
134
132
|
}
|
|
135
|
-
submit() {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
this.
|
|
139
|
-
this.
|
|
140
|
-
this.handle.popErrorScope().then((error) => {
|
|
141
|
-
if (error) {
|
|
142
|
-
this.reportError(new Error(`WebGPU command submission failed: ${error.message}`));
|
|
143
|
-
}
|
|
144
|
-
});
|
|
133
|
+
submit(commandBuffer) {
|
|
134
|
+
if (!commandBuffer) {
|
|
135
|
+
commandBuffer = this.commandEncoder.finish();
|
|
136
|
+
this.commandEncoder.destroy();
|
|
137
|
+
this.commandEncoder = this.createCommandEncoder({ id: `${this.id}-default-encoder` });
|
|
145
138
|
}
|
|
139
|
+
this.pushErrorScope('validation');
|
|
140
|
+
this.handle.queue.submit([commandBuffer.handle]);
|
|
141
|
+
this.popErrorScope((error) => {
|
|
142
|
+
this.reportError(new Error(`${this} command submission: ${error.message}`), this)();
|
|
143
|
+
this.debug();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
// WebGPU specific
|
|
147
|
+
pushErrorScope(scope) {
|
|
148
|
+
this.handle.pushErrorScope(scope);
|
|
149
|
+
}
|
|
150
|
+
popErrorScope(handler) {
|
|
151
|
+
this.handle.popErrorScope().then((error) => {
|
|
152
|
+
if (error) {
|
|
153
|
+
handler(error);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
146
156
|
}
|
|
147
157
|
// PRIVATE METHODS
|
|
148
158
|
_getInfo() {
|
|
@@ -203,32 +213,5 @@ export class WebGPUDevice extends Device {
|
|
|
203
213
|
}
|
|
204
214
|
return capabilities;
|
|
205
215
|
}
|
|
206
|
-
// DEPRECATED METHODS
|
|
207
|
-
// @deprecated
|
|
208
|
-
copyExternalImageToTexture(options) {
|
|
209
|
-
const { source, sourceX = 0, sourceY = 0, texture, mipLevel = 0, aspect = 'all', colorSpace = 'display-p3', premultipliedAlpha = false,
|
|
210
|
-
// destinationX,
|
|
211
|
-
// destinationY,
|
|
212
|
-
// desitnationZ,
|
|
213
|
-
width = texture.width, height = texture.height, depth = 1 } = options;
|
|
214
|
-
const webGpuTexture = texture;
|
|
215
|
-
this.handle?.queue.copyExternalImageToTexture(
|
|
216
|
-
// source: GPUImageCopyExternalImage
|
|
217
|
-
{
|
|
218
|
-
source,
|
|
219
|
-
origin: [sourceX, sourceY]
|
|
220
|
-
},
|
|
221
|
-
// destination: GPUImageCopyTextureTagged
|
|
222
|
-
{
|
|
223
|
-
texture: webGpuTexture.handle,
|
|
224
|
-
origin: [0, 0, 0], // [x, y, z],
|
|
225
|
-
mipLevel,
|
|
226
|
-
aspect,
|
|
227
|
-
colorSpace,
|
|
228
|
-
premultipliedAlpha
|
|
229
|
-
},
|
|
230
|
-
// copySize: GPUExtent3D
|
|
231
|
-
[width, height, depth]);
|
|
232
|
-
}
|
|
233
216
|
}
|
|
234
217
|
//# sourceMappingURL=webgpu-device.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu-device.js","sourceRoot":"","sources":["../../src/adapter/webgpu-device.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"webgpu-device.js","sourceRoot":"","sources":["../../src/adapter/webgpu-device.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,oCAAoC;AA6BpC,OAAO,EAAC,MAAM,EAAE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