mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
127ae6cf12
Based on the design document, "The runtime will not clamp or validate the input, but implementations may clamp to the range [0,1] if necessary.", so we test for the EXT_depth_range_unrestricted extension, and only clamp if it's not available (thus, necessary to do so). NaNs are converted to zero as per "NaNs must be treated as 0, but the runtime will convert NaNs to 0 on behalf of the implementation.", and a default bounds are set to 0.0 and 1.0.
66 lines
1.1 KiB
Plaintext
66 lines
1.1 KiB
Plaintext
[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
|
|
probe (0, 0) rgba(0, 0, 0, 0)
|
|
todo(sm<6) 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
|
|
probe (0, 0) rgba(0, 0, 0, 0)
|
|
todo(sm<6) probe uav 1 (0) r(0.0)
|