[SPIR-V] Scalar layout to follow C structure layout
See #7894 for context.
Note that this is a backwards incompatible change and may break code that relies on the current odd behavior of -fvk-use-scalar-layout. It also fixes a case found by @s-perron that currently generates invalid SPIR-V (scalar.layout.struct.array test) because structs don't get properly aligned inside arrays.
Thanks for the contribution. That is great.
We'll have to see if this causes regressions for anyone. It could be that people depend on the old behaviour, and this could break them. If that is significant, then we will have to add a new option.
@gjaegy, @devshgraphicsprogramming, @sajjadmirzanv, @LukasBanana, @EpicJeanNoeMorissette
If any of you use the scalar layout option in DXC, let me know if this will cause problems for you. I think this is the right direction in spirit, but it might not be pragmatic.
We don't use the "vk-use-scalar-layout" option, so not a problem for us, thanks for asking !
Thanks for the contribution. That is great.
We'll have to see if this causes regressions for anyone. It could be that people depend on the old behaviour, and this could break them. If that is significant, then we will have to add a new option.
@gjaegy, @devshgraphicsprogramming, @sajjadmirzanv, @LukasBanana, @EpicJeanNoeMorissette
If any of you use the scalar layout option in DXC, let me know if this will cause problems for you. I think this is the right direction in spirit, but it might not be pragmatic.
It actually fixes stuff for us, LGTM
Following the description in #7894, this makes sense to me. If the intention was to have C-like structures, this sounds like a reasonable fix. We do use this layout in UE5 as the extension VK_EXT_scalar_block_layout is required for ray-tracing and Nanite, so we'll keep an eye on this extension when we merge our next update from this mainstream. @EpicJeanNoeMorissette for vis.
/AzurePiplines run
@microsoft-github-policy-service agree company="BAE Systems OneArc"
/AzurePipelines run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).