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

deref/deref_mut methods on buffer-views inline #3307

Merged
merged 3 commits into from
Dec 19, 2022

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Dec 19, 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
n/a

Description
If no link time optimizations are enabled, each access to a buffer view incurs an opaque function call. When iterating over bytes directly on the mapped buffer, this can be a significant overhead!

Testing
it compiles ;)

@Wumpf Wumpf force-pushed the inline-buffer-view-access branch from 570b01c to 5e23186 Compare December 19, 2022 08:35
@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2022

Codecov Report

Merging #3307 (570b01c) into master (eda77e6) will increase coverage by 0.88%.
The diff coverage is 32.58%.

❗ Current head 570b01c differs from pull request most recent head 3ba6757. Consider uploading reports for the commit 3ba6757 to get more accurate results

@@            Coverage Diff             @@
##           master    #3307      +/-   ##
==========================================
+ Coverage   64.77%   65.66%   +0.88%     
==========================================
  Files          81       82       +1     
  Lines       38724    39489     +765     
==========================================
+ Hits        25084    25930     +846     
+ Misses      13640    13559      -81     
Impacted Files Coverage Δ
wgpu-core/src/resource.rs 25.13% <ø> (ø)
wgpu-hal/src/dx11/adapter.rs 0.00% <0.00%> (ø)
wgpu-hal/src/gles/mod.rs 61.53% <ø> (ø)
wgpu-types/src/lib.rs 88.30% <ø> (+0.26%) ⬆️
wgpu/src/lib.rs 52.09% <4.22%> (-0.72%) ⬇️
wgpu/src/backend/direct.rs 56.49% <32.55%> (+0.60%) ⬆️
wgpu-core/src/command/transfer.rs 75.49% <40.90%> (+4.72%) ⬆️
wgpu-hal/src/gles/command.rs 69.82% <42.85%> (-0.26%) ⬇️
wgpu-core/src/device/queue.rs 70.51% <62.50%> (-0.30%) ⬇️
wgpu-core/src/device/mod.rs 66.68% <100.00%> (+0.37%) ⬆️
... and 58 more

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

@Wumpf Wumpf force-pushed the inline-buffer-view-access branch from 3ba6757 to d15320f Compare December 19, 2022 13:28
@nical nical merged commit 46831a8 into gfx-rs:master Dec 19, 2022
@Wumpf Wumpf deleted the inline-buffer-view-access branch December 19, 2022 15:38
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.

3 participants