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

Refactor usage tracking to be truly sparse #439

Merged
merged 2 commits into from
Jan 9, 2020
Merged

Conversation

kvark
Copy link
Member

@kvark kvark commented Jan 7, 2020

This is a required step towards #438 . We want to be tracking the usage by only having resource IDs around, not resources themselves. So we aren't going to have access to full_selector.

It's also streamlining some of the verbose parts of the internal API for usage tracking.
It also uses SmallVec for the texture tracker ranges, essentially making it lightweight for most cases (where the layer count is 1).

Compromises:

  • removes SEPARATE_DEPTH_STENCIL_STATES support. It's not in the near future to enable it anyway.

@kvark kvark requested a review from grovesNL January 7, 2020 05:41
@kvark kvark changed the title Refactor usage tracking to be truly sparse [WIP] Refactor usage tracking to be truly sparse Jan 7, 2020
@kvark kvark changed the title [WIP] Refactor usage tracking to be truly sparse Refactor usage tracking to be truly sparse Jan 7, 2020
@kvark
Copy link
Member Author

kvark commented Jan 7, 2020

Tested on wgpu-rs examples as well as vange-rs. Fairly confident that this is ready to merge.

@kvark
Copy link
Member Author

kvark commented Jan 7, 2020

As outlined in #438 (comment), this isn't moving us to the goal, strictly speaking. I still believe it's a good change to land though.

@kvark kvark mentioned this pull request Jan 7, 2020
@kvark
Copy link
Member Author

kvark commented Jan 9, 2020

Merging as a dependency for #440
Post-landing review would still be great!
bors r=dependency

bors bot added a commit that referenced this pull request Jan 9, 2020
439: Refactor usage tracking to be truly sparse r=dependency a=kvark

~~This is a required step towards #438 . We want to be tracking the usage by only having resource IDs around, not resources themselves. So we aren't going to have access to `full_selector`.~~

It's also streamlining some of the verbose parts of the internal API for usage tracking.
It also uses `SmallVec` for the texture tracker ranges, essentially making it lightweight for most cases (where the layer count is 1).

Compromises:
  - removes `SEPARATE_DEPTH_STENCIL_STATES` support. It's not in the near future to enable it anyway.

Co-authored-by: Dzmitry Malyshau <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 9, 2020

Build succeeded

@bors bors bot merged commit bcf533f into gfx-rs:master Jan 9, 2020
@kvark kvark deleted the track-sparse branch January 9, 2020 15:51
kvark pushed a commit to kvark/wgpu that referenced this pull request Jun 3, 2021
439: Update to latest `wgpu-core` r=kvark a=GabrielMajeri

Pull in some of the latest changes from the `wgpu` repo

Co-authored-by: Gabriel Majeri <[email protected]>
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