mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Test depth bounds.
This commit is contained in:
parent
e761b2cad1
commit
61a700bcdc
Notes:
Henri Verbeet
2024-09-11 15:31:24 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1031
@ -93,6 +93,7 @@ vkd3d_shader_tests = \
|
||||
tests/hlsl/d3dcolor-to-ubyte4.shader_test \
|
||||
tests/hlsl/ddxddy.shader_test \
|
||||
tests/hlsl/default-values.shader_test \
|
||||
tests/hlsl/depth-bounds.shader_test \
|
||||
tests/hlsl/depth-out.shader_test \
|
||||
tests/hlsl/determinant.shader_test \
|
||||
tests/hlsl/discard.shader_test \
|
||||
|
65
tests/hlsl/depth-bounds.shader_test
Normal file
65
tests/hlsl/depth-bounds.shader_test
Normal file
@ -0,0 +1,65 @@
|
||||
[require]
|
||||
shader model >= 5.0
|
||||
depth-bounds
|
||||
|
||||
[rtv 0]
|
||||
size (2d, 640, 480)
|
||||
|
||||
[uav 1]
|
||||
format r32-float
|
||||
size (buffer, 1)
|
||||
0.0
|
||||
|
||||
[dsv]
|
||||
size (2d, 640, 480)
|
||||
|
||||
[vertex shader]
|
||||
RWBuffer<float> u : register(u1);
|
||||
float4 main(float4 position : position) : sv_position
|
||||
{
|
||||
u[0] = 0.0;
|
||||
return float4(position.xy, 1.0, 1.0);
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
RWBuffer<float> u : register(u1);
|
||||
[earlydepthstencil]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
u[0] = 1.0;
|
||||
return float4(1, 1, 1, 1);
|
||||
}
|
||||
|
||||
[test]
|
||||
depth-bounds 0.3 0.6
|
||||
depth greater equal
|
||||
|
||||
clear rtv 0 0.0 0.0 0.0 0.0
|
||||
clear dsv 0.0
|
||||
todo(glsl) draw quad
|
||||
todo(d3d12) probe (0, 0) rgba(0, 0, 0, 0)
|
||||
todo probe uav 1 (0) r(0.0)
|
||||
|
||||
clear rtv 0 0.0 0.0 0.0 0.0
|
||||
clear dsv 0.3
|
||||
todo(glsl) draw quad
|
||||
probe (0, 0) rgba(1, 1, 1, 1)
|
||||
probe uav 1 (0) r(1.0)
|
||||
|
||||
clear rtv 0 0.0 0.0 0.0 0.0
|
||||
clear dsv 0.5
|
||||
todo(glsl) draw quad
|
||||
probe (0, 0) rgba(1, 1, 1, 1)
|
||||
probe uav 1 (0) r(1.0)
|
||||
|
||||
clear rtv 0 0.0 0.0 0.0 0.0
|
||||
clear dsv 0.6
|
||||
todo(glsl) draw quad
|
||||
probe (0, 0) rgba(1, 1, 1, 1)
|
||||
probe uav 1 (0) r(1.0)
|
||||
|
||||
clear rtv 0 0.0 0.0 0.0 0.0
|
||||
clear dsv 1.0
|
||||
todo(glsl) draw quad
|
||||
todo(d3d12) probe (0, 0) rgba(0, 0, 0, 0)
|
||||
todo probe uav 1 (0) r(0.0)
|
Loading…
Reference in New Issue
Block a user