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

Lower some data into the wgpu-core storages #3106

Closed
wants to merge 2 commits into from

Conversation

i509VCB
Copy link
Contributor

@i509VCB i509VCB commented Oct 14, 2022

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
Related to #3051 and the work to move that pull request towards using Ids instead of Boxes.

Description
In order for all the assoicated types in the native backend to be ids we can convert directly, we need to lower some of the data associated with some types into the tracker instead of living next to the ids.

However this is a challenge to do and this pull request is here to explore the idea or find a better alternative. There are still some types which may need data lowered into the tracker or living in a type erased form along side ids. Namely RenderPass, ComputePass and RenderBundleEncoder carry a large amount of data along.

Testing
Local tests appear to run fine.

@i509VCB i509VCB force-pushed the lower-core-data branch 2 times, most recently from 935629e to 1b117c5 Compare October 18, 2022 03:39
@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2022

Codecov Report

Merging #3106 (95cc87f) into master (b28a87e) will increase coverage by 63.41%.
The diff coverage is 70.00%.

@@             Coverage Diff             @@
##           master    #3106       +/-   ##
===========================================
+ Coverage    1.34%   64.75%   +63.41%     
===========================================
  Files          70       81       +11     
  Lines       18683    38739    +20056     
===========================================
+ Hits          251    25087    +24836     
+ Misses      18432    13652     -4780     
Impacted Files Coverage Δ
wgpu/src/backend/direct.rs 55.75% <65.00%> (+55.75%) ⬆️
wgpu-core/src/device/mod.rs 66.06% <75.00%> (+66.06%) ⬆️
wgpu-hal/src/empty.rs 0.00% <0.00%> (ø)
wgpu-core/src/present.rs 0.00% <0.00%> (ø)
wgpu/src/util/encoder.rs 0.00% <0.00%> (ø)
wgpu-hal/src/dx11/device.rs 0.00% <0.00%> (ø)
wgpu/examples/framework.rs
wgpu/examples/cube/main.rs
wgpu/src/backend/web.rs
wgpu/examples/water/point_gen.rs
... and 84 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@i509VCB i509VCB changed the title Lower some data into the wgpu-core tracker Lower some data into the wgpu-core storages Oct 22, 2022
@i509VCB
Copy link
Contributor Author

i509VCB commented Oct 23, 2022

Going to delay this temporarily since I have a solution which is working in #3051

@i509VCB i509VCB marked this pull request as draft October 23, 2022 05:55
@cwfitzgerald
Copy link
Member

As this MR is currently stale, I'm going to close it for triage purposes. Please feel-free to re-open there is renewed interest in landing these changes!

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.

4 participants