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

Remove Clone Staring Me In the Face #6969

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

cwfitzgerald
Copy link
Member

@cwfitzgerald cwfitzgerald commented Jan 21, 2025

There's an unconditional clone when we merge trackers, even if the tracker already owns that resource. This clone has been staring me in the face. This was a quick experiment to see if it would help. According to our benchmarks, it doesn't. HOWEVER, the benchmarks never re-use textures between bind groups. There's a 1:1 relationship between a set of textures and a bind group. We also only ever bind a bind group once. This just... isn't terribly realistic. We need to modify our render benchmark to be more representative. That's more than the 10 minutes I had timeboxed for this experiment tho.

Also this PR is wrong wrt Weak handling.

Edit: ayy funny number

@@ -706,7 +706,7 @@ unsafe fn insert<T: Clone>(
*current_states.get_unchecked_mut(index) = new_end_state;

let resource = metadata_provider.get(index);
resource_metadata.insert(index, resource.clone());
Copy link
Member Author

Choose a reason for hiding this comment

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

This bad boi

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.

1 participant