Henri Verbeet pushed to branch master at wine / vkd3d
Commits: 083b87c7 by Giovanni Mascellani at 2024-10-17T17:28:52+02:00 vkd3d-shader/d3dbc: Make signature masks contiguous.
The goal is to make a requirement for VSIR that signature element masks are always contiguous. The SPIR-V backend already implicitly makes that assumption, since it just consider the LSB and popcount of the mask.
For example, consider this HLSL pixel shader:
float4 main(float4 color : COLOR) : SV_Target { return float4(color.x, 10.0f, 11.0f, color.w); }
Currently the parser describes the input signature element corresponding to semantic COLOR as having mask .xw, which is sensible. However, the SPIR-V parser will interpret that as a mask starting at x and with popcount 2, and assuming it is contiguous it will implicitly act as if it were .xy. This is not correct, because the wrong component will be loaded from the vertex stage.
- - - - - 0e43dea4 by Giovanni Mascellani at 2024-10-17T17:28:52+02:00 vkd3d-shader/ir: Check that signature masks are contiguous.
- - - - - e411fcb6 by Giovanni Mascellani at 2024-10-17T17:28:52+02:00 tests: Test discontiguous signature masks with SM<4 shaders.
- - - - -
3 changed files:
- libs/vkd3d-shader/d3dbc.c - libs/vkd3d-shader/ir.c - tests/hlsl/interface-packing.shader_test
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/compare/8943999bd275c571c49aa352c9f78...