tests: Test register reservations on structs for SM5.

This commit is contained in:
Francisco Casas 2023-09-11 18:44:39 -03:00 committed by Alexandre Julliard
parent cd0e3786c3
commit e64e08b2b7
Notes: Alexandre Julliard 2023-10-05 22:36:55 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/342

View File

@ -156,3 +156,76 @@ float4 main() : sv_target
[test]
draw quad
probe all rgba (2.0, 2.0, 2.0, 99.0)
[require]
shader model >= 5.0
[texture 0]
size (2, 2)
0.0 0.0 0.0 99.0
0.0 0.0 0.0 99.0
0.0 0.0 0.0 99.0
0.0 0.0 0.0 99.0
[texture 1]
size (2, 2)
1.0 1.0 1.0 99.0
1.0 1.0 1.0 99.0
0.0 0.0 0.0 99.0
0.0 0.0 0.0 99.0
[sampler 0]
filter point point point
address clamp clamp clamp
[sampler 1]
filter linear linear linear
address clamp clamp clamp
% If a struct spans many object register sets and one is reserved, all other used object register sets must be.
[pixel shader fail todo]
struct
{
Texture2D tex;
sampler sam;
} foo : register(t1);
float4 main() : sv_target
{
return foo.tex.Sample(foo.sam, float2(0.4, 0));
}
[pixel shader todo]
struct
{
Texture2D tex;
sampler sam;
} foo : register(t1) : register(s1);
float4 main() : sv_target
{
return foo.tex.Sample(foo.sam, float2(0, 0.5));
}
[test]
todo draw quad
todo probe all rgba (0.5, 0.5, 0.5, 99.0)
[pixel shader]
struct
{
Texture2D tex;
sampler sam; // unused.
} foo : register(t1);
float4 main() : sv_target
{
return foo.tex.Load(int3(0, 0, 0));
}
[test]
draw quad
todo probe all rgba (1.0, 1.0, 1.0, 99.0)