Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 8, 2025

Fixed #31600.

Description

The PR removes any render target dispose related code from _getRenderPassDescriptor(). The dispose logic is managed for all backends in Texture.updateRenderTarget(). I assume the code in the WebGPU backend is a leftover from earlier days.

@Mugen87 Mugen87 added this to the r180 milestone Aug 8, 2025
@Mugen87 Mugen87 marked this pull request as draft August 8, 2025 10:35
@github-actions
Copy link

github-actions bot commented Aug 8, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.74
79.06
338.74
79.06
+0 B
+0 B
WebGPU 568.55
157.24
568.39
157.18
-167 B
-60 B
WebGPU Nodes 567.16
156.99
566.99
156.93
-167 B
-57 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 470.48
113.82
470.48
113.82
+0 B
+0 B
WebGPU 642.26
173.71
642.09
173.65
-167 B
-57 B
WebGPU Nodes 596.9
163.01
596.74
162.96
-167 B
-58 B

@Mugen87 Mugen87 marked this pull request as ready for review August 8, 2025 10:40
}

this.delete( renderTarget );
this.backend.delete( renderTarget );
Copy link
Collaborator Author

@Mugen87 Mugen87 Aug 8, 2025

Choose a reason for hiding this comment

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

This delete is not necessarily required since the backend data are maintained in a weak map but it's still more correct to remove the data as soon as we can.

if ( descriptors === undefined ||
renderTargetData.width !== renderTarget.width ||
renderTargetData.height !== renderTarget.height ||
renderTargetData.dimensions !== renderTarget.dimensions ||
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

RenderTarget.dimensions does not exist.

@Mugen87 Mugen87 merged commit fda27bb into mrdoob:dev Aug 8, 2025
9 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.

WebGPU: CubeRenderTarget dispose listeners increase indefinitely

1 participant