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

Force all adapters to report min buffer alignment of 32 #3262

Merged

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Dec 5, 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

Description

This follows up on the WebGPU spec which doesn't allow an api to report less than 32 bytes buffer alignment.
(brought up on Matrix https://matrix.to/#/!XFRnMvAfptAHthwBCx:matrix.org/$YbQEfpuY-nNlZWNGexna4w0pHa_ItGlm0oHlPvrC5Ds?via=matrix.org&via=mozilla.org&via=kyju.org)

Testing

Ran some sample applications with this

wgpu-hal/src/lib.rs Outdated Show resolved Hide resolved
wgpu-hal/src/dx11/adapter.rs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2022

Codecov Report

Merging #3262 (dd7a5ea) into master (6f4ec4f) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3262      +/-   ##
==========================================
+ Coverage   64.11%   64.14%   +0.03%     
==========================================
  Files          86       86              
  Lines       42560    42572      +12     
==========================================
+ Hits        27286    27308      +22     
+ Misses      15274    15264      -10     
Impacted Files Coverage Δ
wgpu-core/src/instance.rs 65.67% <100.00%> (+0.56%) ⬆️
wgpu-core/src/hub.rs 60.67% <0.00%> (-0.16%) ⬇️
wgpu-core/src/device/mod.rs 66.77% <0.00%> (+0.09%) ⬆️
wgpu/src/backend/direct.rs 56.78% <0.00%> (+0.28%) ⬆️

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 fix-buffer-alignments-lower-than-32 branch from 221f32f to b787007 Compare December 17, 2022 20:24
@Wumpf
Copy link
Member Author

Wumpf commented Dec 17, 2022

@cwfitzgerald apologies for the hiatus!
Solved it completely differently now - the modified callsite seems to be a chokepoint through which adapter limits from hal will go through, so seems like a better place to enforce this the limit

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Thanks!

@cwfitzgerald
Copy link
Member

Merge conflicts

@Wumpf
Copy link
Member Author

Wumpf commented Dec 21, 2022

resolved

wgpu-core/src/instance.rs Outdated Show resolved Hide resolved
@teoxoy teoxoy added this to the WebGPU Specification V1 milestone Dec 21, 2022
@Wumpf Wumpf force-pushed the fix-buffer-alignments-lower-than-32 branch from 2de272b to 8e5a635 Compare December 21, 2022 18:36
@cwfitzgerald cwfitzgerald merged commit eaa87ba into gfx-rs:master Dec 21, 2022
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.

5 participants