On Mon Apr 17 15:57:09 2023 +0000, Francisco Casas wrote:
Hmm, this just made me realize that there is an oversight regarding how input semantic indexes are allocated. It seems that the native compiler can make different input semantics share the same input register. For instance, for the test that causes problem in the first commit:
[pixel shader] float4 main(in float2 tex0 : TEXCOORD0, in float2 tex1 : TEXCOORD1) : sv_target { return float4(tex0, tex1); }
This is the input signature:
// Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------ ------ // TEXCOORD 0 xy 0 NONE float xy // TEXCOORD 1 zw 0 NONE float zw
But we are allocating different input registers for each of these semantics in allocate_semantic_register(). This behavior seems to only be correct for output semantics.
For the record, I don't see the errors when using vkd3d-shader and executing with Vulkan or vkd3d.