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

Fixed buffer sizes encoding on Metal. #3047

Merged
merged 1 commit into from Oct 5, 2022

Conversation

dragostis
Copy link
Contributor

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.

Description
Metal validation layers were complaining that the Naga-generated _buffer_sizes argument was not properly encoded in the cases where only a part of the buffers declared in the shader file was used by one entry. Thus, the size buffer would only be partially written.

This patch writes 0s in the case of unused buffer's sizes.

Testing
Tested locally. Validation reports no errors.

Metal validation layers were complaining that the Naga-generated
`_buffer_sizes` argument was not properly encoded in the cases
where only a part of the buffers declared in the shader file was
used by one entry. Thus, the size buffer would only be partially
written.

This patch writes 0s in the case of unused buffer's sizes.
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.

Good catch!

@cwfitzgerald cwfitzgerald merged commit 5c33e23 into gfx-rs:master Oct 5, 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.

None yet

2 participants