mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Add more tests for UAV allocation.
This commit is contained in:
parent
52069386c4
commit
8044fce040
Notes:
Alexandre Julliard
2022-10-31 22:39:35 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/36
@ -22,6 +22,7 @@ float4 main() : sv_target
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
[uav 1]
|
||||
format r32 float
|
||||
size (2, 2)
|
||||
@ -54,3 +55,68 @@ probe uav 1 (0, 1) r (0.6)
|
||||
probe uav 1 (1, 0) r (0.2)
|
||||
probe uav 1 (1, 1) r (0.7)
|
||||
probe uav 2 (0, 0) rgba (2.0, 1.0, 4.0, 3.0)
|
||||
|
||||
|
||||
% UAVs are implicitly allocated starting from the highest render target slot.
|
||||
% They cannot overlap render target slots, and also cannot be allocated any
|
||||
% lower than the highest render target.
|
||||
% This ceases to be true with shader model 5.1.
|
||||
|
||||
[render target 1]
|
||||
format r32g32b32a32 float
|
||||
size (640, 480)
|
||||
|
||||
[uav 2]
|
||||
size (1, 1)
|
||||
|
||||
0.1 0.2 0.3 0.4
|
||||
|
||||
[pixel shader fail]
|
||||
RWTexture2D<float4> u : register(u0);
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6);
|
||||
return 0;
|
||||
}
|
||||
|
||||
[pixel shader fail]
|
||||
RWTexture2D<float4> u : register(u1);
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6);
|
||||
return 0;
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
RWTexture2D<float4> u;
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6);
|
||||
return 0;
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
|
||||
|
||||
|
||||
[uav 3]
|
||||
size (1, 1)
|
||||
|
||||
0.1 0.2 0.3 0.4
|
||||
|
||||
[pixel shader]
|
||||
RWTexture2D<float4> u : register(u3);
|
||||
|
||||
float4 main() : sv_target1
|
||||
{
|
||||
u[uint2(0, 0)] = float4(0.9, 0.8, 0.7, 0.6);
|
||||
return 0;
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
|
||||
|
Loading…
Reference in New Issue
Block a user