Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPURenderer: Pipelines - Clean up. #28495

Merged
merged 2 commits into from
May 27, 2024

Conversation

Methuselah96
Copy link
Contributor

Related issue: N/A

Description

See comments explaining each change.

@@ -67,7 +67,7 @@ class Pipelines extends DataMap {

if ( pipeline === undefined ) {

if ( previousPipeline && previousPipeline.usedTimes === 0 ) this._releasePipeline( computeNode );
if ( previousPipeline && previousPipeline.usedTimes === 0 ) this._releasePipeline( previousPipeline );
Copy link
Contributor Author

@Methuselah96 Methuselah96 May 27, 2024

Choose a reason for hiding this comment

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

I think this is just a typo? this._releasePipeline takes a pipeline and uses its cacheKey property to remove it from this.caches.

@@ -205,7 +205,7 @@ class Pipelines extends DataMap {

}

super.delete( object );
return super.delete( object );
Copy link
Contributor Author

@Methuselah96 Methuselah96 May 27, 2024

Choose a reason for hiding this comment

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

This method is overriding DataMap.delete which returns the value for the deleted key. For consistency with how the base method works, it seems best to continue returning the deleted value.

@@ -22,6 +22,8 @@ class Attributes extends DataMap {

}

return attributeData;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated another case where DataMap.delete is being overridden.

@sunag sunag added this to the r165 milestone May 27, 2024
@sunag sunag merged commit 7a3cd98 into mrdoob:dev May 27, 2024
11 checks passed
@Methuselah96 Methuselah96 deleted the gpu-pipelines-cleanup branch May 27, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants