You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
In Vulkan 1.2, the
scalarBlockLayout
feature was added (as well as the relateduniformBufferStandardLayout
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.
The text was updated successfully, but these errors were encountered: