@luma.gl/webgpu 9.0.0-beta.4 → 9.0.0-beta.5
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 +99 -1
- package/dist/adapter/helpers/convert-texture-format.js +5 -5
- package/dist/adapter/helpers/generate-mipmaps.js +76 -82
- package/dist/adapter/helpers/get-bind-group.js +54 -41
- package/dist/adapter/helpers/get-vertex-buffer-layout.js +110 -80
- package/dist/adapter/helpers/webgpu-parameters.js +182 -125
- package/dist/adapter/resources/webgpu-buffer.js +110 -62
- package/dist/adapter/resources/webgpu-command-encoder.js +73 -49
- package/dist/adapter/resources/webgpu-compute-pass.js +54 -41
- package/dist/adapter/resources/webgpu-compute-pipeline.js +24 -19
- package/dist/adapter/resources/webgpu-external-texture.js +29 -19
- package/dist/adapter/resources/webgpu-framebuffer.js +11 -7
- package/dist/adapter/resources/webgpu-query.js +42 -1
- package/dist/adapter/resources/webgpu-render-pass.js +115 -105
- package/dist/adapter/resources/webgpu-render-pipeline.js +148 -83
- package/dist/adapter/resources/webgpu-sampler.js +18 -15
- package/dist/adapter/resources/webgpu-shader.js +55 -45
- package/dist/adapter/resources/webgpu-texture.js +129 -109
- package/dist/adapter/resources/webgpu-vertex-array.d.ts +4 -1
- package/dist/adapter/resources/webgpu-vertex-array.d.ts.map +1 -1
- package/dist/adapter/resources/webgpu-vertex-array.js +64 -41
- package/dist/adapter/webgpu-canvas-context.d.ts.map +1 -1
- package/dist/adapter/webgpu-canvas-context.js +100 -69
- package/dist/adapter/webgpu-device.d.ts.map +1 -1
- package/dist/adapter/webgpu-device.js +257 -230
- package/dist/adapter/webgpu-types.js +0 -2
- package/dist/dist.dev.js +661 -2178
- package/dist/glsl/glsllang.js +9 -6
- package/dist/index.cjs +58 -239
- package/dist/index.cjs.map +7 -0
- package/dist/index.js +9 -6
- package/dist.min.js +1 -22
- package/package.json +9 -7
- package/src/adapter/resources/webgpu-vertex-array.ts +5 -2
- package/src/adapter/webgpu-canvas-context.ts +1 -0
- package/src/adapter/webgpu-device.ts +16 -36
- package/dist/adapter/helpers/accessor-to-format.js.map +0 -1
- package/dist/adapter/helpers/convert-texture-format.js.map +0 -1
- package/dist/adapter/helpers/generate-mipmaps.js.map +0 -1
- package/dist/adapter/helpers/get-bind-group.js.map +0 -1
- package/dist/adapter/helpers/get-vertex-buffer-layout.js.map +0 -1
- package/dist/adapter/helpers/webgpu-parameters.js.map +0 -1
- package/dist/adapter/resources/webgpu-buffer.js.map +0 -1
- package/dist/adapter/resources/webgpu-command-encoder.js.map +0 -1
- package/dist/adapter/resources/webgpu-compute-pass.js.map +0 -1
- package/dist/adapter/resources/webgpu-compute-pipeline.js.map +0 -1
- package/dist/adapter/resources/webgpu-external-texture.js.map +0 -1
- package/dist/adapter/resources/webgpu-framebuffer.js.map +0 -1
- package/dist/adapter/resources/webgpu-query.js.map +0 -1
- package/dist/adapter/resources/webgpu-render-pass.js.map +0 -1
- package/dist/adapter/resources/webgpu-render-pipeline.js.map +0 -1
- package/dist/adapter/resources/webgpu-sampler.js.map +0 -1
- package/dist/adapter/resources/webgpu-shader.js.map +0 -1
- package/dist/adapter/resources/webgpu-texture.js.map +0 -1
- package/dist/adapter/resources/webgpu-vertex-array.js.map +0 -1
- package/dist/adapter/webgpu-canvas-context.js.map +0 -1
- package/dist/adapter/webgpu-device.js.map +0 -1
- package/dist/adapter/webgpu-types.js.map +0 -1
- package/dist/glsl/glsllang.js.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,45 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
// luma.gl, MIT license
|
|
2
|
+
// Copyright (c) vis.gl contributors
|
|
2
3
|
import { VertexArray, log } from '@luma.gl/core';
|
|
3
4
|
import { getBrowser } from '@probe.gl/env';
|
|
4
|
-
|
|
5
|
+
/** VertexArrayObject wrapper */
|
|
5
6
|
export class WebGPUVertexArray extends VertexArray {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
7
|
+
get [Symbol.toStringTag]() {
|
|
8
|
+
return 'WebGPUVertexArray';
|
|
9
|
+
}
|
|
10
|
+
device;
|
|
11
|
+
/** Vertex Array is a helper class under WebGPU */
|
|
12
|
+
handle;
|
|
13
|
+
/**
|
|
14
|
+
* Attribute 0 can not be disable on most desktop OpenGL based browsers
|
|
15
|
+
* TODO is this even an issue for WebGPU?
|
|
16
|
+
*/
|
|
17
|
+
static isConstantAttributeZeroSupported(device) {
|
|
18
|
+
return getBrowser() === 'Chrome';
|
|
19
|
+
}
|
|
20
|
+
// Create a VertexArray
|
|
21
|
+
constructor(device, props) {
|
|
22
|
+
super(device, props);
|
|
23
|
+
this.device = device;
|
|
24
|
+
}
|
|
25
|
+
destroy() { }
|
|
26
|
+
/**
|
|
27
|
+
* Set an elements buffer, for indexed rendering.
|
|
28
|
+
* Must be a Buffer bound to buffer with usage bit Buffer.INDEX set.
|
|
29
|
+
*/
|
|
30
|
+
setIndexBuffer(buffer) {
|
|
31
|
+
// assert(!elementBuffer || elementBuffer.glTarget === GL.ELEMENT_ARRAY_BUFFER, ERR_ELEMENTS);
|
|
32
|
+
this.indexBuffer = buffer;
|
|
33
|
+
}
|
|
34
|
+
/** Set a bufferSlot in vertex attributes array to a buffer, enables the bufferSlot, sets divisor */
|
|
35
|
+
setBuffer(bufferSlot, buffer) {
|
|
36
|
+
// Sanity check target
|
|
37
|
+
// if (buffer.glUsage === GL.ELEMENT_ARRAY_BUFFER) {
|
|
38
|
+
// throw new Error('Use setIndexBuffer');
|
|
39
|
+
// }
|
|
40
|
+
this.attributes[bufferSlot] = buffer;
|
|
41
|
+
}
|
|
42
|
+
/** Set a location in vertex attributes array to a constant value, disables the location */
|
|
43
|
+
setConstant(location, value) {
|
|
44
|
+
log.warn(`${this.id} constant attributes not supported on WebGPU`);
|
|
45
|
+
}
|
|
46
|
+
bindBeforeRender(renderPass, firstIndex, indexCount) {
|
|
47
|
+
const webgpuRenderPass = renderPass;
|
|
48
|
+
const webgpuIndexBuffer = this.indexBuffer;
|
|
49
|
+
if (webgpuIndexBuffer?.handle) {
|
|
50
|
+
// Note we can't unset an index buffer
|
|
51
|
+
log.warn('setting index buffer', webgpuIndexBuffer?.handle, webgpuIndexBuffer?.indexType)();
|
|
52
|
+
webgpuRenderPass.handle.setIndexBuffer(webgpuIndexBuffer?.handle, webgpuIndexBuffer?.indexType);
|
|
53
|
+
}
|
|
54
|
+
for (let location = 0; location < this.maxVertexAttributes; location++) {
|
|
55
|
+
const webgpuBuffer = this.attributes[location];
|
|
56
|
+
if (webgpuBuffer?.handle) {
|
|
57
|
+
log.warn(`setting vertex buffer ${location}`, webgpuBuffer?.handle)();
|
|
58
|
+
webgpuRenderPass.handle.setVertexBuffer(location, webgpuBuffer?.handle);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// TODO - emit warnings/errors/throw if constants have been set on this vertex array
|
|
62
|
+
}
|
|
63
|
+
unbindAfterRender(renderPass) {
|
|
64
|
+
// On WebGPU we don't need to unbind.
|
|
65
|
+
// In fact we can't easily do it. setIndexBuffer/setVertexBuffer don't accept null.
|
|
66
|
+
// Unbinding presumably happens automatically when the render pass is ended.
|
|
67
|
+
}
|
|
44
68
|
}
|
|
45
|
-
//# sourceMappingURL=webgpu-vertex-array.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgpu-canvas-context.d.ts","sourceRoot":"","sources":["../../src/adapter/webgpu-canvas-context.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,aAAa,EAAM,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAEzD;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,aAAa;IACpD,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,8EAA8E;
|
|
1
|
+
{"version":3,"file":"webgpu-canvas-context.d.ts","sourceRoot":"","sources":["../../src/adapter/webgpu-canvas-context.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAC,aAAa,EAAM,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAEzD;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,aAAa;IACpD,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,8EAA8E;IAE9E,QAAQ,CAAC,MAAM,EAAE,aAAa,CAA4C;IAC1E,gDAAgD;IAChD,kBAAkB,EAAE,aAAa,CAAiB;IAElD,OAAO,CAAC,sBAAsB,CAAwB;gBAE1C,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB;IAehF,2FAA2F;IAC3F,OAAO,IAAI,IAAI;IAIf,0EAA0E;IAC1E,qBAAqB,IAAI,iBAAiB;IA2B1C,sDAAsD;IACtD,MAAM;IA6BN,MAAM,CAAC,OAAO,CAAC,EAAE;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;KAAC,GAAG,IAAI;IAI7F,mEAAmE;IACnE,iBAAiB,IAAI,aAAa;IAOlC,8FAA8F;IAC9F,6BAA6B;CAY9B"}
|
|
@@ -1,74 +1,105 @@
|
|
|
1
1
|
import { CanvasContext, log } from '@luma.gl/core';
|
|
2
|
-
import { getWebGPUTextureFormat } from
|
|
3
|
-
import { WebGPUFramebuffer } from
|
|
2
|
+
import { getWebGPUTextureFormat } from './helpers/convert-texture-format';
|
|
3
|
+
import { WebGPUFramebuffer } from './resources/webgpu-framebuffer';
|
|
4
|
+
/**
|
|
5
|
+
* Holds a WebGPU Canvas Context
|
|
6
|
+
* The primary job of the CanvasContext is to generate textures for rendering into the current canvas
|
|
7
|
+
* It also manages canvas sizing calculations and resizing.
|
|
8
|
+
*/
|
|
4
9
|
export class WebGPUCanvasContext extends CanvasContext {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.width = currentColorAttachment.width;
|
|
26
|
-
this.height = currentColorAttachment.height;
|
|
27
|
-
this._createDepthStencilAttachment();
|
|
28
|
-
return new WebGPUFramebuffer(this.device, {
|
|
29
|
-
colorAttachments: [currentColorAttachment],
|
|
30
|
-
depthStencilAttachment: this.depthStencilAttachment
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
update() {
|
|
34
|
-
const [width, height] = this.getPixelSize();
|
|
35
|
-
const sizeChanged = width !== this.width || height !== this.height;
|
|
36
|
-
if (sizeChanged) {
|
|
37
|
-
this.width = width;
|
|
38
|
-
this.height = height;
|
|
39
|
-
if (this.depthStencilAttachment) {
|
|
40
|
-
this.depthStencilAttachment.destroy();
|
|
41
|
-
this.depthStencilAttachment = null;
|
|
42
|
-
}
|
|
43
|
-
this.gpuCanvasContext.configure({
|
|
44
|
-
device: this.device.handle,
|
|
45
|
-
format: getWebGPUTextureFormat(this.format),
|
|
46
|
-
colorSpace: this.props.colorSpace,
|
|
47
|
-
alphaMode: this.props.alphaMode
|
|
48
|
-
});
|
|
49
|
-
log.log(1, `Resized to ${this.width}x${this.height}px`)();
|
|
10
|
+
device;
|
|
11
|
+
gpuCanvasContext;
|
|
12
|
+
/** Format of returned textures: "bgra8unorm", "rgba8unorm", "rgba16float". */
|
|
13
|
+
// @ts-ignore - TODO - fix this
|
|
14
|
+
format = navigator.gpu.getPreferredCanvasFormat();
|
|
15
|
+
/** Default stencil format for depth textures */
|
|
16
|
+
depthStencilFormat = 'depth24plus';
|
|
17
|
+
depthStencilAttachment = null;
|
|
18
|
+
constructor(device, adapter, props) {
|
|
19
|
+
super(props);
|
|
20
|
+
this.device = device;
|
|
21
|
+
// TODO - hack to trigger resize?
|
|
22
|
+
this.width = -1;
|
|
23
|
+
this.height = -1;
|
|
24
|
+
this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);
|
|
25
|
+
// @ts-ignore TODO - we don't handle OffscreenRenderingContext.
|
|
26
|
+
this.gpuCanvasContext = this.canvas.getContext('webgpu');
|
|
27
|
+
// TODO this has been replaced
|
|
28
|
+
// this.format = this.gpuCanvasContext.getPreferredFormat(adapter);
|
|
29
|
+
this.format = 'bgra8unorm';
|
|
50
30
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
31
|
+
/** Destroy any textures produced while configured and remove the context configuration. */
|
|
32
|
+
destroy() {
|
|
33
|
+
this.gpuCanvasContext.unconfigure();
|
|
34
|
+
}
|
|
35
|
+
/** Update framebuffer with properly resized "swap chain" texture views */
|
|
36
|
+
getCurrentFramebuffer() {
|
|
37
|
+
// Ensure the canvas context size is updated
|
|
38
|
+
this.update();
|
|
39
|
+
// Wrap the current canvas context texture in a luma.gl texture
|
|
40
|
+
// const currentColorAttachment = this.device.createTexture({
|
|
41
|
+
// id: 'default-render-target',
|
|
42
|
+
// handle: this.gpuCanvasContext.getCurrentTexture(),
|
|
43
|
+
// format: this.format,
|
|
44
|
+
// width: this.width,
|
|
45
|
+
// height: this.height
|
|
46
|
+
// });
|
|
47
|
+
// Wrap the current canvas context texture in a luma.gl texture
|
|
48
|
+
const currentColorAttachment = this.getCurrentTexture();
|
|
49
|
+
this.width = currentColorAttachment.width;
|
|
50
|
+
this.height = currentColorAttachment.height;
|
|
51
|
+
// Resize the depth stencil attachment
|
|
52
|
+
this._createDepthStencilAttachment();
|
|
53
|
+
return new WebGPUFramebuffer(this.device, {
|
|
54
|
+
colorAttachments: [currentColorAttachment],
|
|
55
|
+
depthStencilAttachment: this.depthStencilAttachment
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/** Resizes and updates render targets if necessary */
|
|
59
|
+
update() {
|
|
60
|
+
const [width, height] = this.getPixelSize();
|
|
61
|
+
const sizeChanged = width !== this.width || height !== this.height;
|
|
62
|
+
if (sizeChanged) {
|
|
63
|
+
this.width = width;
|
|
64
|
+
this.height = height;
|
|
65
|
+
if (this.depthStencilAttachment) {
|
|
66
|
+
this.depthStencilAttachment.destroy();
|
|
67
|
+
this.depthStencilAttachment = null;
|
|
68
|
+
}
|
|
69
|
+
// Reconfigure the canvas size.
|
|
70
|
+
// https://www.w3.org/TR/webgpu/#canvas-configuration
|
|
71
|
+
this.gpuCanvasContext.configure({
|
|
72
|
+
device: this.device.handle,
|
|
73
|
+
format: getWebGPUTextureFormat(this.format),
|
|
74
|
+
// Can be used to define e.g. -srgb views
|
|
75
|
+
// viewFormats: [...]
|
|
76
|
+
colorSpace: this.props.colorSpace,
|
|
77
|
+
alphaMode: this.props.alphaMode
|
|
78
|
+
});
|
|
79
|
+
log.log(1, `Resized to ${this.width}x${this.height}px`)();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
resize(options) {
|
|
83
|
+
this.update();
|
|
84
|
+
}
|
|
85
|
+
/** Wrap the current canvas context texture in a luma.gl texture */
|
|
86
|
+
getCurrentTexture() {
|
|
87
|
+
return this.device._createTexture({
|
|
88
|
+
id: `${this.id}#color-texture`,
|
|
89
|
+
handle: this.gpuCanvasContext.getCurrentTexture()
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/** We build render targets on demand (i.e. not when size changes but when about to render) */
|
|
93
|
+
_createDepthStencilAttachment() {
|
|
94
|
+
if (!this.depthStencilAttachment) {
|
|
95
|
+
this.depthStencilAttachment = this.device.createTexture({
|
|
96
|
+
id: `${this.id}#depth-stencil-texture`,
|
|
97
|
+
format: this.depthStencilFormat,
|
|
98
|
+
width: this.width,
|
|
99
|
+
height: this.height,
|
|
100
|
+
usage: GPUTextureUsage.RENDER_ATTACHMENT
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return this.depthStencilAttachment;
|
|
70
104
|
}
|
|
71
|
-
return this.depthStencilAttachment;
|
|
72
|
-
}
|
|
73
105
|
}
|
|
74
|
-
//# sourceMappingURL=webgpu-canvas-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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