2024-04-03 22:00:26 -07:00
|
|
|
[require]
|
2024-04-30 21:55:03 -07:00
|
|
|
shader model >= 4.1
|
2024-04-03 22:00:26 -07:00
|
|
|
|
|
|
|
[rtv 0]
|
2024-08-01 18:03:46 -07:00
|
|
|
format r32g32b32a32-float
|
2024-04-03 22:00:26 -07:00
|
|
|
size (2dms, 4, 640, 480)
|
|
|
|
|
2024-06-18 21:52:38 -07:00
|
|
|
[pixel shader]
|
2024-04-30 21:55:03 -07:00
|
|
|
float4 main(out uint sample_mask : SV_Coverage) : SV_Target
|
|
|
|
{
|
|
|
|
sample_mask = 0x5;
|
|
|
|
return float4(1.0, 1.0, 1.0, 1.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-06-18 21:52:38 -07:00
|
|
|
clear rtv 0 0.0 0.0 0.0 0.0
|
2024-10-21 07:23:27 -07:00
|
|
|
todo(glsl | msl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.5, 0.5, 0.5, 0.5)
|
2024-04-30 21:55:03 -07:00
|
|
|
sample mask 0x0b
|
|
|
|
clear rtv 0 0.0 0.0 0.0 0.0
|
2024-10-21 07:23:27 -07:00
|
|
|
todo(glsl | msl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.25, 0.25, 0.25, 0.25)
|
2024-04-30 21:55:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
[require]
|
|
|
|
shader model >= 5.0
|
2024-08-01 16:13:31 -07:00
|
|
|
format r32-uint uav-load
|
2024-04-30 21:55:03 -07:00
|
|
|
|
2024-04-03 22:00:26 -07:00
|
|
|
[uav 1]
|
2024-08-01 18:03:46 -07:00
|
|
|
format r32-uint
|
2024-04-03 22:00:26 -07:00
|
|
|
size (2d, 4, 4)
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
RWTexture2D<uint> u : register(u1);
|
|
|
|
|
|
|
|
float4 main(float4 position : SV_Position, uint coverage : SV_Coverage) : SV_Target
|
|
|
|
{
|
|
|
|
InterlockedOr(u[uint2(position.x, position.y)], coverage);
|
|
|
|
return float4(0.0, 1.0, 0.0, 1.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
sample mask 0x01
|
2024-04-30 21:55:03 -07:00
|
|
|
clear rtv 0 0.0 0.0 0.0 0.0
|
2024-04-03 21:29:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 0.25, 0.0, 0.25)
|
|
|
|
probe uav 1 (0, 0, 4, 4) rui (0x01)
|
2024-04-03 22:00:26 -07:00
|
|
|
sample mask 0x03
|
2024-04-03 21:29:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 0.5, 0.0, 0.5)
|
|
|
|
probe uav 1 (0, 0, 4, 4) rui (0x03)
|
2024-04-03 22:00:26 -07:00
|
|
|
sample mask 0x07
|
2024-04-03 21:29:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 0.75, 0.0, 0.75)
|
|
|
|
probe uav 1 (0, 0, 4, 4) rui (0x07)
|
2024-04-03 22:00:26 -07:00
|
|
|
|
|
|
|
[uav 1]
|
2024-08-01 18:03:46 -07:00
|
|
|
format r32-uint
|
2024-04-03 22:00:26 -07:00
|
|
|
size (2d, 4, 4)
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
|
|
|
|
[test]
|
|
|
|
clear rtv 0 0.0 0.0 0.0 0.0
|
|
|
|
sample mask 0x09
|
2024-04-03 21:29:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 0.5, 0.0, 0.5)
|
|
|
|
probe uav 1 (0, 0, 4, 4) rui (0x09)
|
2024-04-03 22:00:26 -07:00
|
|
|
sample mask 0x0f
|
2024-04-03 21:29:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
probe uav 1 (0, 0, 4, 4) rui (0x0f)
|