Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/renderers/common/Textures.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ class Textures extends DataMap {
}

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.


};

Expand Down
19 changes: 1 addition & 18 deletions src/renderers/webgpu/WebGPUBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ class WebGPUBackend extends Backend {
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.

renderTargetData.activeMipmapLevel !== renderContext.activeMipmapLevel ||
renderTargetData.activeCubeFace !== renderContext.activeCubeFace ||
renderTargetData.samples !== renderTarget.samples
Expand All @@ -400,21 +399,6 @@ class WebGPUBackend extends Backend {

renderTargetData.descriptors = descriptors;

// dispose

const onDispose = () => {

renderTarget.removeEventListener( 'dispose', onDispose );
this.delete( renderTarget );

};

if ( renderTarget.hasEventListener( 'dispose', onDispose ) === false ) {

renderTarget.addEventListener( 'dispose', onDispose );

}

}

const cacheKey = renderContext.getCacheKey();
Expand Down Expand Up @@ -534,7 +518,6 @@ class WebGPUBackend extends Backend {
renderTargetData.samples = renderTarget.samples;
renderTargetData.activeMipmapLevel = renderContext.activeMipmapLevel;
renderTargetData.activeCubeFace = renderContext.activeCubeFace;
renderTargetData.dimensions = renderTarget.dimensions;

}

Expand Down Expand Up @@ -2230,7 +2213,7 @@ class WebGPUBackend extends Backend {
}

/**
* Checks if the given feature is supported by the backend.
* Checks if the given feature is supported by the backend.
*
* @param {string} name - The feature's name.
* @return {boolean} Whether the feature is supported or not.
Expand Down
Loading