tests: Add some tests for FOG and PSIZE writemask restrictions.

This commit is contained in:
Elizabeth Figura 2024-11-04 22:20:45 -06:00 committed by Henri Verbeet
parent 90a07ada8e
commit aa1ce9e295
Notes: Henri Verbeet 2024-11-05 20:06:25 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1247
3 changed files with 36 additions and 0 deletions

View File

@ -123,6 +123,7 @@ vkd3d_shader_tests = \
tests/hlsl/f16tof32.shader_test \
tests/hlsl/f32tof16.shader_test \
tests/hlsl/faceforward.shader_test \
tests/hlsl/fog.shader_test \
tests/hlsl/ffp-point-size.shader_test \
tests/hlsl/float-comparison.shader_test \
tests/hlsl/floor.shader_test \

View File

@ -0,0 +1,29 @@
[require]
shader model < 3.0
[vertex shader fail todo]
void main(float4 pos : position, out float2 fog : fog, out float4 out_pos : sv_position)
{
fog = 0.5;
out_pos = pos;
}
[require]
shader model >= 3.0
[vertex shader]
void main(float4 pos : position, out float2 fog : fog, out float4 out_pos : sv_position)
{
fog = float2(0.1, 0.2);
out_pos = pos;
}
[pixel shader]
float4 main(float2 fog : fog) : sv_target
{
return float4(fog, 0, 1);
}
[test]
draw quad
probe (0, 0) rgba (0.1, 0.2, 0, 1)

View File

@ -9,6 +9,12 @@ shader model < 4.0
-0.5 0 20
0.5 0 40
[vertex shader fail todo]
void main(inout float4 pos : position, out float2 size : psize)
{
size = 1;
}
[vertex shader]
void main(inout float4 pos : position, inout float size : psize)
{