On Mon Apr 17 15:57:09 2023 +0000, Giovanni Mascellani wrote:
I see failures for `entry-point-semantics.shader_test`. Commit bc12da74638f3cbb5894737319842d2a28b76d2a gives (on Wine with native `d3dcompiler_47.dll`):
shader_runner:1185: Running tests from a Windows cross build shader_runner:1187: Compiling shaders with d3dcompiler_47.dll and executing with d3d9.dll 0024:fixme:ntdll:8U:0x7f5488008bde:dlls/ntdll/unix/system.c:2589:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION shader_runner:87: Driver string: aticfx32.dll. shader_runner:88: Device: Radeon RX 5700 / 5700 XT, 1002:731f. 0108:fixme:d3d:8P:00000000008A1F29:dlls/wined3d/state.c:1680:state_linepattern_w Setting line patterns is not supported in OpenGL core contexts. shader_runner:1190: Compiling shaders with d3dcompiler_47.dll and executing with d3d11.dll shader_runner:161: Adapter: Radeon RX 5700 / 5700 XT, 1002:731f. shader_runner:602: Section [test], line 193: Test failed: Got {1.00000000e+000, 2.00000000e+000, 1.00000000e+000, 2.00000000e+000}, expected {1.00000000e+000, 2.00000000e+000, 1.00000000e+001, 2.00000000e+001} at (0, 0). shader_runner:1193: Compiling shaders with d3dcompiler_47.dll and executing with d3d12.dll shader_runner:340: Adapter: Radeon RX 5700 / 5700 XT, 1002:731f. shader_runner:602: Section [test], line 193: Test failed: Got {1.00000000e+000, 2.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {1.00000000e+000, 2.00000000e+000, 1.00000000e+001, 2.00000000e+001} at (0, 0). shader_runner:1163: d3dcompiler_47.dll version: 10.0.19041.868 shader_runner:1163: dxgi.dll version: 6.0.6000.16386 shader_runner:1163: d3d9.dll version: 5.3.1.904 shader_runner:1163: d3d11.dll version: 7.0.6002.18107 shader_runner:1176: d3d12.dll version: unknown shader_runner: 482 tests executed (2 failures, 0 skipped, 0 todo, 0 bugs).
With commit 29f8202e6c596513376468d1535495ad187572fd other failures appear:
shader_runner:1185: Running tests from a Windows cross build shader_runner:1187: Compiling shaders with d3dcompiler_47.dll and executing with d3d9.dll 0024:fixme:ntdll:8U:0x7f97b3c08bde:dlls/ntdll/unix/system.c:2589:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION shader_runner:87: Driver string: aticfx32.dll. shader_runner:88: Device: Radeon RX 5700 / 5700 XT, 1002:731f. 0108:fixme:d3d:8P:00000000008A1F29:dlls/wined3d/state.c:1680:state_linepattern_w Setting line patterns is not supported in OpenGL core contexts. shader_runner:1190: Compiling shaders with d3dcompiler_47.dll and executing with d3d11.dll shader_runner:161: Adapter: Radeon RX 5700 / 5700 XT, 1002:731f. shader_runner:602: Section [test], line 193: Test failed: Got {1.00000000e+000, 2.00000000e+000, 1.00000000e+000, 2.00000000e+000}, expected {1.00000000e+000, 2.00000000e+000, 1.00000000e+001, 2.00000000e+001} at (0, 0). shader_runner:602: Section [test], line 262: Test failed: Got {1.10000000e+001, 2.20000000e+001, 0.00000000e+000, 0.00000000e+000}, expected {1.10000000e+001, 2.20000000e+001, 3.30000000e+001, 0.00000000e+000} at (0, 0). shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:1193: Compiling shaders with d3dcompiler_47.dll and executing with d3d12.dll shader_runner:340: Adapter: Radeon RX 5700 / 5700 XT, 1002:731f. shader_runner:602: Section [test], line 193: Test failed: Got {1.00000000e+000, 2.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {1.00000000e+000, 2.00000000e+000, 1.00000000e+001, 2.00000000e+001} at (0, 0). shader_runner:602: Section [test], line 262: Test failed: Got {1.10000000e+001, 2.20000000e+001, 1.10000000e+001, 0.00000000e+000}, expected {1.10000000e+001, 2.20000000e+001, 3.30000000e+001, 0.00000000e+000} at (0, 0). shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:736: Test failed: Got unexpected hr 0x80010064. shader_runner:1163: d3dcompiler_47.dll version: 10.0.19041.868 shader_runner:1163: dxgi.dll version: 6.0.6000.16386 shader_runner:1163: d3d9.dll version: 5.3.1.904 shader_runner:1163: d3d11.dll version: 7.0.6002.18107 shader_runner:1176: d3d12.dll version: unknown shader_runner: 662 tests executed (14 failures, 0 skipped, 0 todo, 0 bugs).
I am not really sure of what these errors 0x80010064 are. Can you reproduce them?
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.