Skip to content

WebGPUTextureUtils: Fix check layerUpdates property#33075

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
sunag:dev-check-layerUpdates
Feb 27, 2026
Merged

WebGPUTextureUtils: Fix check layerUpdates property#33075
Mugen87 merged 1 commit into
mrdoob:devfrom
sunag:dev-check-layerUpdates

Conversation

@sunag

@sunag sunag commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

Related issue: #33072

Description

This should fix Textures that do not have the property so it doesn’t fail the .length check.

@sunag sunag changed the title WebGPUTextureUtils: Fix check layerUpdates properties WebGPUTextureUtils: Fix check layerUpdates properties Feb 26, 2026
@sunag sunag changed the title WebGPUTextureUtils: Fix check layerUpdates properties WebGPUTextureUtils: Fix check layerUpdates property Feb 26, 2026
@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.49
85.34
359.49
85.34
+0 B
+0 B
WebGPU 626.57
174.15
626.59
174.15
+16 B
+5 B
WebGPU Nodes 625.15
173.9
625.17
173.91
+16 B
+5 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 491.23
119.75
491.23
119.75
+0 B
+0 B
WebGPU 700.2
189.15
700.22
189.16
+16 B
+5 B
WebGPU Nodes 649.41
176.51
649.42
176.52
+16 B
+5 B

@sunag sunag marked this pull request as ready for review February 26, 2026 15:58
@sunag sunag added this to the r184 milestone Feb 26, 2026
} else if ( texture.isArrayTexture || texture.isDataArrayTexture || texture.isData3DTexture ) {

if ( texture.layerUpdates.size > 0 ) {
if ( texture.layerUpdates && texture.layerUpdates.size > 0 ) {

@Mugen87 Mugen87 Feb 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's because Data3DTexture hasn't layerUpdates.

Does it make sense to add this property in this class as well?

/cc @ahaensler

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging for now. We can still add the property and refactor if there is a use case.

@Mugen87 Mugen87 merged commit bc733cd into mrdoob:dev Feb 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants