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

Track pipeline layout lifetime #582

Merged
merged 1 commit into from
Apr 14, 2020
Merged

Track pipeline layout lifetime #582

merged 1 commit into from
Apr 14, 2020

Conversation

kvark
Copy link
Member

@kvark kvark commented Apr 14, 2020

Fixes #580
This one is interesting: it's not instantly destroyed when dropped, like bind group layouts. And it's not tracked for GPU usage like the resources. It's somewhat in-between. We have the following classes of tracking now:

  1. no tracking, destroyed on drop. Applies to: bind group layouts, adapters
  2. only CPU-side tracking. They go to "suspected" list on drop of self or anything that can point to them. Applies to: pipeline layouts
  3. full GPU tracking. They go to "suspected" list on drop, then get associated with active submission before destruction. Applies to: buffers, textures, views, bind groups, pipelines

@kvark kvark requested a review from grovesNL April 14, 2020 05:02
Copy link
Collaborator

@grovesNL grovesNL left a comment

Choose a reason for hiding this comment

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

This makes sense to me, thank you!

@kvark
Copy link
Member Author

kvark commented Apr 14, 2020

Thanks for the review!
I think what the follow-up needs to be is us removing the class(1) of the tracking entirely. Everything then will be refcounted. Just some objects not caring about GPU usage, and others doing that.
bors r=grovesNL

@grovesNL
Copy link
Collaborator

Yeah that sounds good 👍 hopefully we can find some opportunities to simplify the tracking in general

@bors
Copy link
Contributor

bors bot commented Apr 14, 2020

Build succeeded:

@bors bors bot merged commit 729ecb1 into gfx-rs:master Apr 14, 2020
@kvark kvark deleted the keep-layout branch April 14, 2020 13:47
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.

Keep pipeline layouts alive
2 participants