@luma.gl/webgl 9.0.0-beta.6 → 9.0.0-beta.7
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/converters/device-parameters.d.ts.map +1 -1
- package/dist/adapter/converters/device-parameters.js +81 -84
- package/dist/adapter/converters/sampler-parameters.js +17 -17
- package/dist/adapter/converters/shader-formats.js +12 -12
- package/dist/adapter/converters/texture-formats.d.ts +10 -8
- package/dist/adapter/converters/texture-formats.d.ts.map +1 -1
- package/dist/adapter/converters/texture-formats.js +175 -168
- package/dist/adapter/converters/vertex-formats.js +20 -20
- package/dist/adapter/device-helpers/webgl-device-features.d.ts +2 -1
- package/dist/adapter/device-helpers/webgl-device-features.d.ts.map +1 -1
- package/dist/adapter/device-helpers/webgl-device-features.js +14 -2
- package/dist/adapter/device-helpers/webgl-device-info.js +5 -5
- package/dist/adapter/device-helpers/webgl-device-limits.js +10 -10
- package/dist/adapter/helpers/decode-webgl-types.js +45 -45
- package/dist/adapter/helpers/get-shader-layout.js +29 -29
- package/dist/adapter/helpers/set-uniform.js +40 -40
- package/dist/adapter/helpers/webgl-topology-utils.js +38 -38
- package/dist/adapter/objects/webgl-renderbuffer.js +6 -6
- package/dist/adapter/objects/webgl-resource.js +1 -2
- package/dist/adapter/resources/webgl-buffer.js +14 -14
- package/dist/adapter/resources/webgl-command-buffer.js +25 -25
- package/dist/adapter/resources/webgl-external-texture.js +3 -3
- package/dist/adapter/resources/webgl-framebuffer.d.ts +2 -4
- package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-framebuffer.js +41 -36
- package/dist/adapter/resources/webgl-query-set.js +6 -6
- package/dist/adapter/resources/webgl-render-pass.js +5 -5
- package/dist/adapter/resources/webgl-render-pipeline.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-render-pipeline.js +19 -13
- package/dist/adapter/resources/webgl-sampler.js +2 -2
- package/dist/adapter/resources/webgl-shader.js +4 -4
- package/dist/adapter/resources/webgl-texture.d.ts +2 -1
- package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-texture.js +29 -27
- package/dist/adapter/resources/webgl-transform-feedback.js +8 -8
- package/dist/adapter/resources/webgl-vertex-array.d.ts +1 -1
- package/dist/adapter/resources/webgl-vertex-array.js +5 -5
- package/dist/adapter/webgl-device.d.ts +6 -3
- package/dist/adapter/webgl-device.d.ts.map +1 -1
- package/dist/adapter/webgl-device.js +22 -17
- package/dist/classic/accessor.js +4 -4
- package/dist/classic/clear.js +2 -2
- package/dist/classic/copy-and-blit.js +15 -16
- package/dist/classic/format-utils.d.ts +2 -2
- package/dist/classic/format-utils.js +14 -14
- package/dist/classic/typed-array-utils.js +18 -18
- package/dist/context/parameters/unified-parameter-api.d.ts +3 -4
- package/dist/context/parameters/unified-parameter-api.d.ts.map +1 -1
- package/dist/context/parameters/unified-parameter-api.js +4 -9
- package/dist/context/parameters/webgl-parameter-tables.d.ts +2 -13
- package/dist/context/parameters/webgl-parameter-tables.d.ts.map +1 -1
- package/dist/context/parameters/webgl-parameter-tables.js +292 -298
- package/dist/context/state-tracker/with-parameters.d.ts +1 -2
- package/dist/context/state-tracker/with-parameters.d.ts.map +1 -1
- package/dist/context/state-tracker/with-parameters.js +2 -5
- package/dist/dist.dev.js +877 -840
- package/dist/index.cjs +1253 -1188
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist.min.js +6 -6
- package/package.json +4 -4
- package/src/adapter/converters/device-parameters.ts +9 -11
- package/src/adapter/converters/texture-formats.ts +64 -61
- package/src/adapter/device-helpers/webgl-device-features.ts +22 -2
- package/src/adapter/objects/webgl-renderbuffer.ts +1 -1
- package/src/adapter/objects/webgl-resource.ts +1 -1
- package/src/adapter/resources/webgl-external-texture.ts +3 -3
- package/src/adapter/resources/webgl-framebuffer.ts +29 -26
- package/src/adapter/resources/webgl-render-pass.ts +3 -3
- package/src/adapter/resources/webgl-render-pipeline.ts +13 -6
- package/src/adapter/resources/webgl-texture.ts +7 -3
- package/src/adapter/webgl-device.ts +24 -19
- package/src/classic/clear.ts +2 -2
- package/src/context/parameters/unified-parameter-api.ts +4 -16
- package/src/context/state-tracker/with-parameters.ts +2 -7
- package/src/index.ts +4 -4
- package/dist/adapter/device-helpers/device-features.d.ts +0 -6
- package/dist/adapter/device-helpers/device-features.d.ts.map +0 -1
- package/dist/adapter/device-helpers/device-features.js +0 -65
- package/dist/adapter/device-helpers/device-limits.d.ts +0 -50
- package/dist/adapter/device-helpers/device-limits.d.ts.map +0 -1
- package/dist/adapter/device-helpers/device-limits.js +0 -92
- package/dist/adapter/device-helpers/get-device-info.d.ts +0 -4
- package/dist/adapter/device-helpers/get-device-info.d.ts.map +0 -1
- package/dist/adapter/device-helpers/get-device-info.js +0 -87
- package/dist/context/context/context-data.d.ts +0 -14
- package/dist/context/context/context-data.d.ts.map +0 -1
- package/dist/context/context/context-data.js +0 -33
- package/dist/context/context/create-browser-context.d.ts +0 -35
- package/dist/context/context/create-browser-context.d.ts.map +0 -1
- package/dist/context/context/create-browser-context.js +0 -66
|
@@ -39,11 +39,11 @@ function _copyBufferToBuffer(device, options) {
|
|
|
39
39
|
const destination = cast(options.destination);
|
|
40
40
|
// {In WebGL2 we can p}erform the copy on the GPU
|
|
41
41
|
// Use GL.COPY_READ_BUFFER+GL.COPY_WRITE_BUFFER avoid disturbing other targets and locking type
|
|
42
|
-
device.gl.bindBuffer(
|
|
43
|
-
device.gl.bindBuffer(
|
|
44
|
-
device.gl.copyBufferSubData(
|
|
45
|
-
device.gl.bindBuffer(
|
|
46
|
-
device.gl.bindBuffer(
|
|
42
|
+
device.gl.bindBuffer(36662, source.handle);
|
|
43
|
+
device.gl.bindBuffer(36663, destination.handle);
|
|
44
|
+
device.gl.copyBufferSubData(36662, 36663, options.sourceOffset ?? 0, options.destinationOffset ?? 0, options.size);
|
|
45
|
+
device.gl.bindBuffer(36662, null);
|
|
46
|
+
device.gl.bindBuffer(36663, null);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Copies data from a Buffer object into a Texture object
|
|
@@ -109,13 +109,13 @@ function _copyTextureToBuffer(device, options) {
|
|
|
109
109
|
// const byteLength = byteOffset + sourceWidth * sourceHeight * components * byteCount;
|
|
110
110
|
// target = device.createBuffer({byteLength});
|
|
111
111
|
// }
|
|
112
|
-
device.gl.bindBuffer(
|
|
113
|
-
device.gl.bindFramebuffer(
|
|
112
|
+
device.gl.bindBuffer(35051, webglBuffer.handle);
|
|
113
|
+
device.gl.bindFramebuffer(36160, framebuffer.handle);
|
|
114
114
|
device.gl.readPixels(origin[0], origin[1], sourceWidth, sourceHeight, sourceFormat, sourceType, byteOffset);
|
|
115
115
|
}
|
|
116
116
|
finally {
|
|
117
|
-
device.gl.bindBuffer(
|
|
118
|
-
device.gl.bindFramebuffer(
|
|
117
|
+
device.gl.bindBuffer(35051, null);
|
|
118
|
+
device.gl.bindFramebuffer(36160, null);
|
|
119
119
|
if (destroyFramebuffer) {
|
|
120
120
|
framebuffer.destroy();
|
|
121
121
|
}
|
|
@@ -166,7 +166,7 @@ function _copyTextureToTexture(device, options) {
|
|
|
166
166
|
// depthOrArrayLayers = 0
|
|
167
167
|
} = options;
|
|
168
168
|
const destinationMipmaplevel = 0;
|
|
169
|
-
const destinationInternalFormat =
|
|
169
|
+
const destinationInternalFormat = 6408;
|
|
170
170
|
const { framebuffer, destroyFramebuffer } = getFramebuffer(source);
|
|
171
171
|
const [sourceX, sourceY] = origin;
|
|
172
172
|
const isSubCopy = false;
|
|
@@ -176,7 +176,7 @@ function _copyTextureToTexture(device, options) {
|
|
|
176
176
|
// destinationX = destinationX || 0;
|
|
177
177
|
// destinationY = destinationY || 0;
|
|
178
178
|
// destinationZ = destinationZ || 0;
|
|
179
|
-
device.gl.bindFramebuffer(
|
|
179
|
+
device.gl.bindFramebuffer(36160, framebuffer.handle);
|
|
180
180
|
// TODO - support gl.readBuffer (WebGL2 only)
|
|
181
181
|
// const prevBuffer = gl.readBuffer(attachment);
|
|
182
182
|
let texture = null;
|
|
@@ -240,18 +240,18 @@ function _copyTextureToTexture(device, options) {
|
|
|
240
240
|
// Returns number of components in a specific readPixels WebGL format
|
|
241
241
|
export function glFormatToComponents(format) {
|
|
242
242
|
switch (format) {
|
|
243
|
-
case
|
|
244
|
-
case
|
|
245
|
-
case
|
|
243
|
+
case 6406:
|
|
244
|
+
case 33326:
|
|
245
|
+
case 6403:
|
|
246
246
|
return 1;
|
|
247
|
-
case
|
|
248
|
-
case
|
|
247
|
+
case 33328:
|
|
248
|
+
case 33319:
|
|
249
249
|
return 2;
|
|
250
|
-
case
|
|
251
|
-
case
|
|
250
|
+
case 6407:
|
|
251
|
+
case 34837:
|
|
252
252
|
return 3;
|
|
253
|
-
case
|
|
254
|
-
case
|
|
253
|
+
case 6408:
|
|
254
|
+
case 34836:
|
|
255
255
|
return 4;
|
|
256
256
|
// TODO: Add support for additional WebGL2 formats
|
|
257
257
|
default:
|
|
@@ -261,13 +261,13 @@ export function glFormatToComponents(format) {
|
|
|
261
261
|
// Return byte count for given readPixels WebGL type
|
|
262
262
|
export function glTypeToBytes(type) {
|
|
263
263
|
switch (type) {
|
|
264
|
-
case
|
|
264
|
+
case 5121:
|
|
265
265
|
return 1;
|
|
266
|
-
case
|
|
267
|
-
case
|
|
268
|
-
case
|
|
266
|
+
case 33635:
|
|
267
|
+
case 32819:
|
|
268
|
+
case 32820:
|
|
269
269
|
return 2;
|
|
270
|
-
case
|
|
270
|
+
case 5126:
|
|
271
271
|
return 4;
|
|
272
272
|
// TODO: Add support for additional WebGL2 types
|
|
273
273
|
default:
|
|
@@ -52,12 +52,12 @@ export class WEBGLExternalTexture extends WEBGLTexture {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// eslint-disable-next-line max-statements
|
|
55
|
-
constructor(device: Device
|
|
56
|
-
super(WebGLDevice
|
|
55
|
+
constructor(device: Device , props: TextureProps) {
|
|
56
|
+
super(device as WebGLDevice, {id: uid('texture'), ...props});
|
|
57
57
|
|
|
58
58
|
this.glTarget = getWebGLTextureTarget(props);
|
|
59
59
|
|
|
60
|
-
this.device = WebGLDevice
|
|
60
|
+
this.device = device as WebGLDevice;
|
|
61
61
|
this.gl = this.device.gl;
|
|
62
62
|
this.gl2 = this.device.gl2;
|
|
63
63
|
this.handle = this.props.handle || this.gl.createTexture();
|
|
@@ -4,8 +4,7 @@ import { GL } from '@luma.gl/constants';
|
|
|
4
4
|
import { WebGLDevice } from "../webgl-device.js";
|
|
5
5
|
import { WEBGLTexture } from "./webgl-texture.js";
|
|
6
6
|
import { WEBGLTextureView } from "./webgl-texture-view.js";
|
|
7
|
-
|
|
8
|
-
export type Attachment = WEBGLTextureView | WEBGLTexture | WEBGLRenderbuffer;
|
|
7
|
+
export type Attachment = WEBGLTextureView | WEBGLTexture;
|
|
9
8
|
/** luma.gl Framebuffer, WebGL implementation */
|
|
10
9
|
export declare class WEBGLFramebuffer extends Framebuffer {
|
|
11
10
|
device: WebGLDevice;
|
|
@@ -22,8 +21,7 @@ export declare class WEBGLFramebuffer extends Framebuffer {
|
|
|
22
21
|
*/
|
|
23
22
|
protected resizeAttachments(width: number, height: number): this;
|
|
24
23
|
/** Attach one attachment */
|
|
25
|
-
protected _attachOne(attachmentPoint: GL, attachment: Attachment): WEBGLTexture
|
|
26
|
-
protected _attachWEBGLRenderbuffer(attachment: GL, renderbuffer: WEBGLRenderbuffer): void;
|
|
24
|
+
protected _attachOne(attachmentPoint: GL, attachment: Attachment): WEBGLTexture;
|
|
27
25
|
/**
|
|
28
26
|
* @param attachment
|
|
29
27
|
* @param texture
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-framebuffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,E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AG,YAAY;IAqC/E;;;;;OAKG;IACH,SAAS,CAAC,cAAc,CACtB,UAAU,EAAE,EAAE,EACd,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,IAAI;CA2BR"}
|
|
@@ -5,7 +5,6 @@ import { Framebuffer, assert } from '@luma.gl/core';
|
|
|
5
5
|
import { GL } from '@luma.gl/constants';
|
|
6
6
|
import { WEBGLTexture } from "./webgl-texture.js";
|
|
7
7
|
import { WEBGLTextureView } from "./webgl-texture-view.js";
|
|
8
|
-
import { WEBGLRenderbuffer } from "../objects/webgl-renderbuffer.js";
|
|
9
8
|
import { getDepthStencilAttachmentWebGL } from "../converters/texture-formats.js";
|
|
10
9
|
/** luma.gl Framebuffer, WebGL implementation */
|
|
11
10
|
export class WEBGLFramebuffer extends Framebuffer {
|
|
@@ -29,11 +28,11 @@ export class WEBGLFramebuffer extends Framebuffer {
|
|
|
29
28
|
// Auto create textures for attachments if needed
|
|
30
29
|
this.autoCreateAttachmentTextures();
|
|
31
30
|
/** Attach from a map of attachments */
|
|
32
|
-
this.gl.bindFramebuffer(
|
|
31
|
+
this.gl.bindFramebuffer(36160, this.handle);
|
|
33
32
|
// Walk the attachments
|
|
34
33
|
for (let i = 0; i < this.colorAttachments.length; ++i) {
|
|
35
34
|
const attachment = this.colorAttachments[i];
|
|
36
|
-
const attachmentPoint =
|
|
35
|
+
const attachmentPoint = 36064 + i;
|
|
37
36
|
if (attachment) {
|
|
38
37
|
this._attachOne(attachmentPoint, attachment);
|
|
39
38
|
}
|
|
@@ -44,12 +43,12 @@ export class WEBGLFramebuffer extends Framebuffer {
|
|
|
44
43
|
/** Check the status */
|
|
45
44
|
// @ts-expect-error
|
|
46
45
|
if (props.check !== false) {
|
|
47
|
-
const status = this.gl.checkFramebufferStatus(
|
|
48
|
-
if (status !==
|
|
46
|
+
const status = this.gl.checkFramebufferStatus(36160);
|
|
47
|
+
if (status !== 36053) {
|
|
49
48
|
throw new Error(`Framebuffer ${_getFrameBufferStatus(status)}`);
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
|
-
this.gl.bindFramebuffer(
|
|
51
|
+
this.gl.bindFramebuffer(36160, null);
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
54
|
/** destroys any auto created resources etc. */
|
|
@@ -63,13 +62,13 @@ export class WEBGLFramebuffer extends Framebuffer {
|
|
|
63
62
|
// PRIVATE
|
|
64
63
|
/** In WebGL we must use renderbuffers for depth/stencil attachments (unless we have extensions) */
|
|
65
64
|
createDepthStencilTexture(format) {
|
|
66
|
-
return new WEBGLRenderbuffer(this.device, {
|
|
67
|
-
|
|
65
|
+
// return new WEBGLRenderbuffer(this.device, {
|
|
66
|
+
return new WEBGLTexture(this.device, {
|
|
67
|
+
id: `${this.id}-depth-stencil`,
|
|
68
68
|
format,
|
|
69
|
-
// dataFormat: GL.DEPTH_STENCIL,
|
|
70
|
-
// type: GL.UNSIGNED_INT_24_8,
|
|
71
69
|
width: this.width,
|
|
72
|
-
height: this.height
|
|
70
|
+
height: this.height,
|
|
71
|
+
mipmaps: false
|
|
73
72
|
});
|
|
74
73
|
}
|
|
75
74
|
/**
|
|
@@ -100,29 +99,35 @@ export class WEBGLFramebuffer extends Framebuffer {
|
|
|
100
99
|
}
|
|
101
100
|
/** Attach one attachment */
|
|
102
101
|
_attachOne(attachmentPoint, attachment) {
|
|
103
|
-
if (attachment instanceof WEBGLRenderbuffer) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
102
|
+
// if (attachment instanceof WEBGLRenderbuffer) {
|
|
103
|
+
// this._attachWEBGLRenderbuffer(attachmentPoint, attachment);
|
|
104
|
+
// return attachment;
|
|
105
|
+
// }
|
|
106
|
+
if (Array.isArray(attachment)) {
|
|
108
107
|
const [texture, layer = 0, level = 0] = attachment;
|
|
109
108
|
this._attachTexture(attachmentPoint, texture, layer, level);
|
|
110
109
|
return texture;
|
|
111
110
|
}
|
|
112
|
-
|
|
111
|
+
if (attachment instanceof WEBGLTexture) {
|
|
113
112
|
this._attachTexture(attachmentPoint, attachment, 0, 0);
|
|
114
113
|
return attachment;
|
|
115
114
|
}
|
|
116
|
-
|
|
115
|
+
if (attachment instanceof WEBGLTextureView) {
|
|
117
116
|
const textureView = attachment;
|
|
118
117
|
this._attachTexture(attachmentPoint, textureView.texture, textureView.props.baseMipLevel, textureView.props.baseArrayLayer);
|
|
119
118
|
return attachment.texture;
|
|
120
119
|
}
|
|
121
120
|
throw new Error('attach');
|
|
122
121
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
// TODO - we do not seem to need render buffers in WebGL 2
|
|
123
|
+
// protected _attachWEBGLRenderbuffer(attachment: GL, renderbuffer: WEBGLRenderbuffer): void {
|
|
124
|
+
// this.gl.framebufferRenderbuffer(
|
|
125
|
+
// GL.FRAMEBUFFER,
|
|
126
|
+
// attachment,
|
|
127
|
+
// GL.RENDERBUFFER,
|
|
128
|
+
// renderbuffer.handle
|
|
129
|
+
// );
|
|
130
|
+
// }
|
|
126
131
|
/**
|
|
127
132
|
* @param attachment
|
|
128
133
|
* @param texture
|
|
@@ -133,17 +138,17 @@ export class WEBGLFramebuffer extends Framebuffer {
|
|
|
133
138
|
const { gl } = this.device;
|
|
134
139
|
gl.bindTexture(texture.target, texture.handle);
|
|
135
140
|
switch (texture.target) {
|
|
136
|
-
case
|
|
137
|
-
case
|
|
138
|
-
gl.framebufferTextureLayer(
|
|
141
|
+
case 35866:
|
|
142
|
+
case 32879:
|
|
143
|
+
gl.framebufferTextureLayer(36160, attachment, texture.target, level, layer);
|
|
139
144
|
break;
|
|
140
|
-
case
|
|
145
|
+
case 34067:
|
|
141
146
|
// layer must be a cubemap face (or if index, converted to cube map face)
|
|
142
147
|
const face = mapIndexToCubeMapFace(layer);
|
|
143
|
-
gl.framebufferTexture2D(
|
|
148
|
+
gl.framebufferTexture2D(36160, attachment, face, texture.handle, level);
|
|
144
149
|
break;
|
|
145
|
-
case
|
|
146
|
-
gl.framebufferTexture2D(
|
|
150
|
+
case 3553:
|
|
151
|
+
gl.framebufferTexture2D(36160, attachment, 3553, texture.handle, level);
|
|
147
152
|
break;
|
|
148
153
|
default:
|
|
149
154
|
assert(false, 'Illegal texture type');
|
|
@@ -156,26 +161,26 @@ export class WEBGLFramebuffer extends Framebuffer {
|
|
|
156
161
|
function mapIndexToCubeMapFace(layer) {
|
|
157
162
|
// TEXTURE_CUBE_MAP_POSITIVE_X is a big value (0x8515)
|
|
158
163
|
// if smaller assume layer is index, otherwise assume it is already a cube map face constant
|
|
159
|
-
return layer <
|
|
160
|
-
? layer +
|
|
164
|
+
return layer < 34069
|
|
165
|
+
? layer + 34069
|
|
161
166
|
: layer;
|
|
162
167
|
}
|
|
163
168
|
// Helper METHODS
|
|
164
169
|
// Get a string describing the framebuffer error if installed
|
|
165
170
|
function _getFrameBufferStatus(status) {
|
|
166
171
|
switch (status) {
|
|
167
|
-
case
|
|
172
|
+
case 36053:
|
|
168
173
|
return 'success';
|
|
169
|
-
case
|
|
174
|
+
case 36054:
|
|
170
175
|
return 'Mismatched attachments';
|
|
171
|
-
case
|
|
176
|
+
case 36055:
|
|
172
177
|
return 'No attachments';
|
|
173
|
-
case
|
|
178
|
+
case 36057:
|
|
174
179
|
return 'Height/width mismatch';
|
|
175
|
-
case
|
|
180
|
+
case 36061:
|
|
176
181
|
return 'Unsupported or split attachments';
|
|
177
182
|
// WebGL2
|
|
178
|
-
case
|
|
183
|
+
case 36182:
|
|
179
184
|
return 'Samples mismatch';
|
|
180
185
|
// OVR_multiview2 extension
|
|
181
186
|
// case GL.FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: return 'baseViewIndex mismatch';
|
|
@@ -33,21 +33,21 @@ export class WEBGLQuerySet extends QuerySet {
|
|
|
33
33
|
* GPU instruction stream.
|
|
34
34
|
*/
|
|
35
35
|
beginTimestampQuery() {
|
|
36
|
-
return this._begin(
|
|
36
|
+
return this._begin(35007);
|
|
37
37
|
}
|
|
38
38
|
endTimestampQuery() {
|
|
39
39
|
this._end();
|
|
40
40
|
}
|
|
41
41
|
// Shortcut for occlusion queries
|
|
42
42
|
beginOcclusionQuery(options) {
|
|
43
|
-
return this._begin(options?.conservative ?
|
|
43
|
+
return this._begin(options?.conservative ? 36202 : 35887);
|
|
44
44
|
}
|
|
45
45
|
endOcclusionQuery() {
|
|
46
46
|
this._end();
|
|
47
47
|
}
|
|
48
48
|
// Shortcut for transformFeedbackQuery
|
|
49
49
|
beginTransformFeedbackQuery() {
|
|
50
|
-
return this._begin(
|
|
50
|
+
return this._begin(35976);
|
|
51
51
|
}
|
|
52
52
|
endTransformFeedbackQuery() {
|
|
53
53
|
this._end();
|
|
@@ -91,7 +91,7 @@ export class WEBGLQuerySet extends QuerySet {
|
|
|
91
91
|
if (!this._queryPending) {
|
|
92
92
|
return false;
|
|
93
93
|
}
|
|
94
|
-
const resultAvailable = this.device.gl.getQueryParameter(this.handle,
|
|
94
|
+
const resultAvailable = this.device.gl.getQueryParameter(this.handle, 34919);
|
|
95
95
|
if (resultAvailable) {
|
|
96
96
|
this._queryPending = false;
|
|
97
97
|
}
|
|
@@ -99,11 +99,11 @@ export class WEBGLQuerySet extends QuerySet {
|
|
|
99
99
|
}
|
|
100
100
|
// Timing query is disjoint, i.e. results are invalid
|
|
101
101
|
isTimerDisjoint() {
|
|
102
|
-
return this.device.gl.getParameter(
|
|
102
|
+
return this.device.gl.getParameter(36795);
|
|
103
103
|
}
|
|
104
104
|
// Returns query result.
|
|
105
105
|
getResult() {
|
|
106
|
-
return this.device.gl.getQueryParameter(this.handle,
|
|
106
|
+
return this.device.gl.getQueryParameter(this.handle, 34918);
|
|
107
107
|
}
|
|
108
108
|
// Returns the query result, converted to milliseconds to match JavaScript conventions.
|
|
109
109
|
getTimerMilliseconds() {
|
|
@@ -27,7 +27,7 @@ export class WEBGLRenderPass extends RenderPass {
|
|
|
27
27
|
end() {
|
|
28
28
|
popContextState(this.device.gl);
|
|
29
29
|
if (this.props.framebuffer) {
|
|
30
|
-
setGLParameters(this.device, { framebuffer: null });
|
|
30
|
+
setGLParameters(this.device.gl, { framebuffer: null });
|
|
31
31
|
}
|
|
32
32
|
// should add commands to CommandEncoder.
|
|
33
33
|
}
|
|
@@ -50,7 +50,7 @@ export class WEBGLRenderPass extends RenderPass {
|
|
|
50
50
|
glParameters.depthMask = !this.props.depthReadOnly;
|
|
51
51
|
}
|
|
52
52
|
glParameters.stencilMask = this.props.stencilReadOnly ? 0 : 1;
|
|
53
|
-
glParameters[
|
|
53
|
+
glParameters[35977] = this.props.discard;
|
|
54
54
|
// Map the four renderpass parameters to WebGL parameters
|
|
55
55
|
if (parameters.viewport) {
|
|
56
56
|
// WebGPU viewports are 6 coordinates (X, Y, Z)
|
|
@@ -75,10 +75,10 @@ export class WEBGLRenderPass extends RenderPass {
|
|
|
75
75
|
console.warn('RenderPassParameters.stencilReference not yet implemented in WebGL');
|
|
76
76
|
// parameters.stencilFunc = [func, ref, mask];
|
|
77
77
|
// Does this work?
|
|
78
|
-
parameters[
|
|
78
|
+
parameters[2967] = parameters.stencilReference;
|
|
79
79
|
}
|
|
80
80
|
this.glParameters = glParameters;
|
|
81
|
-
setGLParameters(this.device, glParameters);
|
|
81
|
+
setGLParameters(this.device.gl, glParameters);
|
|
82
82
|
}
|
|
83
83
|
beginOcclusionQuery(queryIndex) {
|
|
84
84
|
const webglQuerySet = this.props.occlusionQuerySet;
|
|
@@ -109,7 +109,7 @@ export class WEBGLRenderPass extends RenderPass {
|
|
|
109
109
|
}
|
|
110
110
|
if (clearMask !== 0) {
|
|
111
111
|
// Temporarily set any clear "colors" and call clear
|
|
112
|
-
withGLParameters(this.device, glParameters, () => {
|
|
112
|
+
withGLParameters(this.device.gl, glParameters, () => {
|
|
113
113
|
this.device.gl.clear(clearMask);
|
|
114
114
|
});
|
|
115
115
|
// TODO - clear multiple color attachments
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl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f"}
|
|
@@ -46,7 +46,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
46
46
|
// assert(this.fs.stage === 'fragment');
|
|
47
47
|
// Setup varyings if supplied
|
|
48
48
|
// @ts-expect-error WebGL only
|
|
49
|
-
const { varyings, bufferMode =
|
|
49
|
+
const { varyings, bufferMode = 35981 } = props;
|
|
50
50
|
if (varyings && varyings.length > 0) {
|
|
51
51
|
this.varyings = varyings;
|
|
52
52
|
this.device.gl.transformFeedbackVaryings(this.handle, varyings, bufferMode);
|
|
@@ -126,10 +126,6 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
126
126
|
* This function unifies those ways into a single call using common parameters with sane defaults
|
|
127
127
|
*/
|
|
128
128
|
draw(options) {
|
|
129
|
-
// If we are using async linking, we need to wait until linking completes
|
|
130
|
-
if (this.linkStatus !== 'success') {
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
129
|
const { renderPass, vertexArray, vertexCount,
|
|
134
130
|
// indexCount,
|
|
135
131
|
instanceCount, firstVertex = 0,
|
|
@@ -141,14 +137,24 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
141
137
|
const isIndexed = Boolean(vertexArray.indexBuffer);
|
|
142
138
|
const glIndexType = vertexArray.indexBuffer?.glIndexType;
|
|
143
139
|
const isInstanced = Number(instanceCount) > 0;
|
|
140
|
+
// If we are using async linking, we need to wait until linking completes
|
|
141
|
+
if (this.linkStatus !== 'success') {
|
|
142
|
+
log.info(2, `RenderPipeline:${this.id}.draw() aborted - waiting for shader linking`)();
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
144
145
|
// Avoid WebGL draw call when not rendering any data or values are incomplete
|
|
145
146
|
// Note: async textures set as uniforms might still be loading.
|
|
146
147
|
// Now that all uniforms have been updated, check if any texture
|
|
147
148
|
// in the uniforms is not yet initialized, then we don't draw
|
|
148
149
|
if (!this._areTexturesRenderable() || vertexCount === 0) {
|
|
149
|
-
|
|
150
|
+
log.info(2, `RenderPipeline:${this.id}.draw() aborted - textures not yet loaded`)();
|
|
150
151
|
return false;
|
|
151
152
|
}
|
|
153
|
+
// (isInstanced && instanceCount === 0)
|
|
154
|
+
if (vertexCount === 0) {
|
|
155
|
+
log.info(2, `RenderPipeline:${this.id}.draw() aborted - no vertices to draw`)();
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
152
158
|
this.device.gl.useProgram(this.handle);
|
|
153
159
|
// Note: Rebinds constant attributes before each draw call
|
|
154
160
|
vertexArray.bindBeforeRender(renderPass);
|
|
@@ -242,13 +248,13 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
242
248
|
*/
|
|
243
249
|
_getLinkStatus() {
|
|
244
250
|
const { gl } = this.device;
|
|
245
|
-
const linked = gl.getProgramParameter(this.handle,
|
|
251
|
+
const linked = gl.getProgramParameter(this.handle, 35714);
|
|
246
252
|
if (!linked) {
|
|
247
253
|
this.linkStatus = 'error';
|
|
248
254
|
return 'linking';
|
|
249
255
|
}
|
|
250
256
|
gl.validateProgram(this.handle);
|
|
251
|
-
const validated = gl.getProgramParameter(this.handle,
|
|
257
|
+
const validated = gl.getProgramParameter(this.handle, 35715);
|
|
252
258
|
if (!validated) {
|
|
253
259
|
this.linkStatus = 'error';
|
|
254
260
|
return 'validation';
|
|
@@ -267,7 +273,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
267
273
|
}
|
|
268
274
|
const { gl } = this.device;
|
|
269
275
|
for (;;) {
|
|
270
|
-
const complete = gl.getProgramParameter(this.handle,
|
|
276
|
+
const complete = gl.getProgramParameter(this.handle, 37297);
|
|
271
277
|
if (complete) {
|
|
272
278
|
return;
|
|
273
279
|
}
|
|
@@ -310,16 +316,16 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
310
316
|
// Set buffer
|
|
311
317
|
const { name } = binding;
|
|
312
318
|
const location = gl.getUniformBlockIndex(this.handle, name);
|
|
313
|
-
if (location ===
|
|
319
|
+
if (location === 4294967295) {
|
|
314
320
|
throw new Error(`Invalid uniform block name ${name}`);
|
|
315
321
|
}
|
|
316
322
|
gl.uniformBlockBinding(this.handle, uniformBufferIndex, location);
|
|
317
323
|
// console.debug(binding, location);
|
|
318
324
|
if (value instanceof WEBGLBuffer) {
|
|
319
|
-
gl.bindBufferBase(
|
|
325
|
+
gl.bindBufferBase(35345, uniformBufferIndex, value.handle);
|
|
320
326
|
}
|
|
321
327
|
else {
|
|
322
|
-
gl.bindBufferRange(
|
|
328
|
+
gl.bindBufferRange(35345, uniformBufferIndex,
|
|
323
329
|
// @ts-expect-error
|
|
324
330
|
value.buffer.handle,
|
|
325
331
|
// @ts-expect-error
|
|
@@ -350,7 +356,7 @@ export class WEBGLRenderPipeline extends RenderPipeline {
|
|
|
350
356
|
else {
|
|
351
357
|
throw new Error('No texture');
|
|
352
358
|
}
|
|
353
|
-
gl.activeTexture(
|
|
359
|
+
gl.activeTexture(33984 + textureUnit);
|
|
354
360
|
gl.bindTexture(texture.target, texture.handle);
|
|
355
361
|
// gl.bindSampler(textureUnit, sampler.handle);
|
|
356
362
|
textureUnit += 1;
|
|
@@ -37,8 +37,8 @@ export class WEBGLSampler extends Sampler {
|
|
|
37
37
|
// For now, pick the float version for parameters specified as GLfloat.
|
|
38
38
|
const param = Number(pname);
|
|
39
39
|
switch (param) {
|
|
40
|
-
case
|
|
41
|
-
case
|
|
40
|
+
case 33082:
|
|
41
|
+
case 33083:
|
|
42
42
|
this.device.gl.samplerParameterf(this.handle, param, value);
|
|
43
43
|
break;
|
|
44
44
|
default:
|
|
@@ -15,10 +15,10 @@ export class WEBGLShader extends Shader {
|
|
|
15
15
|
this.device = device;
|
|
16
16
|
switch (this.props.stage) {
|
|
17
17
|
case 'vertex':
|
|
18
|
-
this.handle = this.props.handle || this.device.gl.createShader(
|
|
18
|
+
this.handle = this.props.handle || this.device.gl.createShader(35633);
|
|
19
19
|
break;
|
|
20
20
|
case 'fragment':
|
|
21
|
-
this.handle = this.props.handle || this.device.gl.createShader(
|
|
21
|
+
this.handle = this.props.handle || this.device.gl.createShader(35632);
|
|
22
22
|
break;
|
|
23
23
|
default:
|
|
24
24
|
throw new Error(this.props.stage);
|
|
@@ -88,7 +88,7 @@ export class WEBGLShader extends Shader {
|
|
|
88
88
|
}
|
|
89
89
|
const { gl } = this.device;
|
|
90
90
|
for (;;) {
|
|
91
|
-
const complete = gl.getShaderParameter(this.handle,
|
|
91
|
+
const complete = gl.getShaderParameter(this.handle, 37297);
|
|
92
92
|
if (complete) {
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
@@ -101,7 +101,7 @@ export class WEBGLShader extends Shader {
|
|
|
101
101
|
* https://gamedev.stackexchange.com/questions/30429/how-to-detect-glsl-warnings
|
|
102
102
|
*/
|
|
103
103
|
_getCompilationStatus() {
|
|
104
|
-
this.compilationStatus = this.device.gl.getShaderParameter(this.handle,
|
|
104
|
+
this.compilationStatus = this.device.gl.getShaderParameter(this.handle, 35713)
|
|
105
105
|
? 'success'
|
|
106
106
|
: 'error';
|
|
107
107
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Device, TextureProps, Sampler, SamplerProps, TypedArray } from '@luma.gl/core';
|
|
1
|
+
import { Device, TextureProps, TextureViewProps, Sampler, SamplerProps, TypedArray } from '@luma.gl/core';
|
|
2
2
|
import { Texture } from '@luma.gl/core';
|
|
3
3
|
import { GL, GLSamplerParameters } from '@luma.gl/constants';
|
|
4
4
|
import { WebGLDevice } from "../webgl-device.js";
|
|
@@ -135,6 +135,7 @@ export declare class WEBGLTexture extends Texture<WEBGLTextureProps> {
|
|
|
135
135
|
constructor(device: Device, props: WEBGLTextureProps);
|
|
136
136
|
destroy(): void;
|
|
137
137
|
toString(): string;
|
|
138
|
+
createView(props: TextureViewProps): WEBGLTextureView;
|
|
138
139
|
initialize(props?: WEBGLTextureProps): this;
|
|
139
140
|
initializeCube(props?: WEBGLTextureProps): this;
|
|
140
141
|
setSampler(sampler?: Sampler | SamplerProps): this;
|
|
@@ -1 +1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