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

Support enabling ScalarBlockLayout in Vulkan #932

Open
seanbaxter opened this issue Dec 14, 2020 · 8 comments
Open

Support enabling ScalarBlockLayout in Vulkan #932

seanbaxter opened this issue Dec 14, 2020 · 8 comments

Comments

@seanbaxter
Copy link

spirv-val is generating its old Invalid shader thing about Block offsets. DEVICE_EXTENSION VK_EXT_scalar_block_layout isn't stopping it. How do I get amber to accept my shader's scalar block layout?

@dj2
Copy link
Collaborator

dj2 commented Dec 14, 2020

If this is fixed in SPIRV-Tools you can update the dependency in Amber and rebuild. If it isn't, you can use --disable-spirv-val to disable spirv-val usage in Amber.

@dj2 dj2 closed this as completed Dec 14, 2020
@seanbaxter
Copy link
Author

I'm still getting a scalar_block_layout validation error with --disable-spirv-val. But now it looks like it comes from the Vulkan validator itself.

https://gist.github.com/seanbaxter/5c76583f1f56803794eead0ba4c252c3

@dj2
Copy link
Collaborator

dj2 commented Dec 14, 2020

The validation layers in Amber are built with the same version of spirv-tools. There is a -d flag to disable vulkan validation as well.

If this passes with those disabled, and the fix is already in SPIRV-Tools we can create an issue to roll the dependencies of Amber.

@seanbaxter
Copy link
Author

I just built amber from source this morning, so this fix isn't there. I've never understood this aspect part of spirv-tools. Shouldn't the presence of GL_EXT_scalar_block_layout disable those alignment checks?

@seanbaxter
Copy link
Author

@dj2
Copy link
Collaborator

dj2 commented Dec 14, 2020

Not sure how you built Amber, but if you used git-sync-deps, then Amber has a pinned version of SPIRV-Tools which is not tip-of-tree.

It looks like scalar block layout has to be enabled through Vulkan which Amber doesn't know how to do at this point: https://github.com/google/amber/blob/main/samples/config_helper_vulkan.cc#L1001

@seanbaxter
Copy link
Author

I just built SPIRV-Tools from top of tree. The issue is still there. It's ignoring GL_EXT_scalar_block_layout and requires --scalar-block-layout not to fail.

@dj2 dj2 reopened this Dec 14, 2020
@dj2 dj2 changed the title Assert scalar block layout? Support enabling ScalarBlockLayout in Vulkan Dec 14, 2020
@dj2
Copy link
Collaborator

dj2 commented Dec 14, 2020

I've updated the title of this to add support into Amber for enabling the scalar block layout in the vulkan structures. Between that and fixing SPIRV-Tools, hopefully that's all that would be needed.

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

No branches or pull requests

2 participants