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

Request: Add a Cap for ScalarBlockLayout etc #205

Open
kusma opened this issue Apr 14, 2021 · 0 comments
Open

Request: Add a Cap for ScalarBlockLayout etc #205

kusma opened this issue Apr 14, 2021 · 0 comments

Comments

@kusma
Copy link

kusma commented Apr 14, 2021

In Vulkan 1.2, the scalarBlockLayout feature was added (as well as the related uniformBufferStandardLayout feature), which allows struct-members inside uniform, SSBO et al blocks to be aligned to the natural alignment instead of 16.

Unfortunately, there's no SPIR-V cap that encodes that this is expected in a shader, which means that the spirv-val tool have to make assumptions. It currently assumes that the capability is not supported, and emits a warning on tightly packed scalars.

It would IMO be much better if we could have SPIR-V caps to encode these requirements, so it's clearly visible in the shader without having to parse types etc what rules apply. There's a related feature called workgroupMemoryExplicitLayoutScalarBlockLayout that probably have the same issue.

I realize that this can only be added to newer versions of SPIR-V, we can't retroactively add it to old versions. But I think adding it to future versions would be a win.

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

1 participant