-
Notifications
You must be signed in to change notification settings - Fork 954
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
Better error message for 16 byte alignment error #3414
Conversation
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
@cwfitzgerald btw, I replied to the code suggestion, but I know github notifications are a bit weird with resolved discussions so I'll ping you here. |
@IceSentry Good shout on the ping - I didn't see this. I just realized the requirement is that the size, not the alignment, is a multiple of 16. So my suggestion is actually slightly wrong. /s/alignment/size should take care of it. The requirement should be "a multiple of 16". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Party party party
Checklist
cargo clippy
.RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
(Based on) Closes #3099
Closes #2832
Description
Previous error message was the generic downflags error message for BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED that didn't highlight that if it was 16 bit aligned then this is supported. But it wasn't clear which shader group / bind was not aligned.
New error message:
Also have switched the code around to check the flag once as if it's set then we can skip the check entirely.
Testing
I didn't test it myself, but the original author tested and I simply updated the message to address the comment on the PR