tests: Test discontiguous signature masks with SM<4 shaders.

This commit is contained in:
Giovanni Mascellani 2024-10-14 22:33:32 +02:00 committed by Henri Verbeet
parent 0e43dea42d
commit e411fcb60e
Notes: Henri Verbeet 2024-10-17 17:39:22 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1183

View File

@ -123,3 +123,38 @@ todo probe (5, 0) rgba ( 7.0, 18.0, 19.0, 0.0)
todo probe (6, 0) rgba (27.0, 28.0, 0.0, 0.0) todo probe (6, 0) rgba (27.0, 28.0, 0.0, 0.0)
todo probe (7, 0) rgba ( 8.0, 9.0, 10.0, 11.0) todo probe (7, 0) rgba ( 8.0, 9.0, 10.0, 11.0)
todo probe (8, 0) rgba (23.0, 24.0, 25.0, 0.0) todo probe (8, 0) rgba (23.0, 24.0, 25.0, 0.0)
[require]
shader model >= 3.0
[input layout]
0 r32g32-float POSITION
[vb 0]
-1.0 -1.0
-1.0 3.0
3.0 -1.0
[vertex shader]
void main(float2 in_pos : POSITION, out float4 pos : SV_Position, out float4 color : COLOR)
{
pos = float4(in_pos, 0.0f, 1.0f);
color = float4(1.0f, 2.0f, 3.0f, 4.0f);
}
[pixel shader]
% The point of this test is to check that signature masks are handled correctly
% when they are not contiguous, so we attempt reading only component .xw from
% `color'. This happens when the shader is compiled by native, but not by us,
% currently, so it's not very useful for the moment. I'm leaving it anyway
% so that it either becomes useful when our HLSL compiler becomes more optimized
% or can be eventually rewritten in assembly/bytecode when the shader runner
% supports that.
float4 main(float4 pos : SV_Position, float4 color : COLOR) : SV_Target
{
return float4(color.x, 10.0f, 11.0f, color.w);
}
[test]
draw triangle list 3
todo(sm<4) probe (0, 0) rgba (1.0, 10.0, 11.0, 4.0)