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

Better error message #3099

Closed
wants to merge 2 commits into from

Conversation

gilescope
Copy link

@gilescope gilescope commented Oct 13, 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
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:

In Device::create_render_pipeline
      note: label = `cuboids_pipeline`
    shader group 1 binding 1 must be 16bit aligned as device does not support DownlevelFlags `BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`

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've tested that I get the updated error locally in the browser.

@gilescope
Copy link
Author

Could state what size we found?

@cwfitzgerald
Copy link
Member

The more information the merrier!

@kpreid
Copy link
Contributor

kpreid commented Oct 13, 2022

Could the shader's label or entry point name be included too?

@@ -371,6 +371,8 @@ pub enum CreateRenderPipelineError {
stage: wgt::ShaderStages,
error: String,
},
#[error("shader group {group} binding {binding} must be 16bit aligned as device does not support DownlevelFlags `BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be bytes instead of bits

@cwfitzgerald
Copy link
Member

Poke from triage

cwfitzgerald pushed a commit that referenced this pull request Jan 24, 2023
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: gilescope <gilescope@gmail.com>
Closes #3099
Closes #2832
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.

Helpful information for BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED
4 participants