Skip to content

Conversation

@Methuselah96
Copy link
Contributor

Related issue: N/A

Description

See comments explaining each change.

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.

}

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.

@Methuselah96 Methuselah96 force-pushed the gpu-pipelines-cleanup branch from 1c4e8d3 to 83783da Compare May 27, 2024 03:40

}

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
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants