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

Add spirv-val flags to spirv-builder #635

Merged
merged 1 commit into from
May 31, 2021
Merged

Add spirv-val flags to spirv-builder #635

merged 1 commit into from
May 31, 2021

Conversation

khyperia
Copy link
Contributor

Fixes #628

Went a little overboard and added all the spirv-val flags instead of just --scalar-block-layout, figured we'd want them eventually.

Also, fixed a nasty bug where spirv-opt wasn't being passed the target environment (but spirv-val was), that was a little spooky to find.

@khyperia khyperia requested a review from eddyb as a code owner May 26, 2021 10:04
// spirv-val flags
pub relax_struct_store: bool,
pub relax_logical_pointer: bool,
pub relax_block_layout: Option<bool>,
Copy link
Contributor

Choose a reason for hiding this comment

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

So this is basically a tri-state? It stands out a bit here, maybe deserves a comment (although this is kind of a deep location).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's... a little weird? Even weirder is that I don't think the CLI of spirv-val exposes this tri-state, it's only Some(true) and None. I thiiiink the tri-state is:

  • Some(true) -> force relax-block-layout on
  • Some(false) -> force relax-block-layout off
  • None -> relax-block-layout is on if vulkan version >=1.1, off if ==1.0

@khyperia khyperia merged commit 3fa15c9 into main May 31, 2021
@khyperia khyperia deleted the val-flags branch May 31, 2021 09:44
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.

Need a way to disable uniform buffer layout validation in spirv-val
2 participants