tests: Test unused invalid samples with a static sampler.

This commit is contained in:
Francisco Casas
2025-02-11 22:08:40 -03:00
committed by Henri Verbeet
parent 321fda9c26
commit e60c89c532
Notes: Henri Verbeet 2025-02-20 16:06:52 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Elizabeth Figura (@zfigura)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1367

View File

@ -104,7 +104,6 @@ float4 main() : sv_target
// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111
static Texture2D tex;
sampler sam;
uniform uint i;
float4 main() : sv_target
{
@ -114,6 +113,33 @@ float4 main() : sv_target
}
[pixel shader fail(sm<6)]
// This fails, so SM4 resource samples always require a non-static
// sampler, whether the result is used or not. Unlike the texture which can be
// static if the result is not used.
Texture2D tex;
static sampler sam;
float4 main() : sv_target
{
float4 unused = tex.Sample(sam, float2(0, 0));
return 0;
}
[pixel shader fail]
// The sampler can also never be static on SM1 style resource samples.
static sampler sam;
float4 main() : sv_target
{
float4 unused = tex2D(sam, float2(0, 0));
return 0;
}
[pixel shader fail]
static Texture2D tex1;
sampler sam;