tests: Add more register reservations tests.

This commit is contained in:
Victor Chiletto
2024-07-03 14:05:58 -03:00
parent ccb6150aab
commit d11c777092
Notes: Henri Verbeet 2024-07-08 18:04:49 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/792
3 changed files with 277 additions and 0 deletions

View File

@@ -29,6 +29,19 @@ float4 main() : sv_target
todo(glsl) draw quad
probe (0, 0) rgba (1, 1, 1, 99)
% Bracket syntax for registers. Ignored in SM>=6.
[pixel shader todo]
Texture2D tex1 : register(t[1], space0);
float4 main() : sv_target
{
return tex1.Load(int3(0, 0, 0));
}
[test]
todo(sm<6) draw quad
if(sm>=6) probe (0, 0) rgba (0, 0, 0, 99)
if(sm<6) probe (0, 0) rgba (1, 1, 1, 99)
[pixel shader fail(sm>=6)]
Texture2D tex1 : register(t1, sPaCe0);
@@ -94,6 +107,20 @@ todo(sm<6) draw quad
if(sm>=6) probe (0,0) rgba (2, 2, 2, 99)
if(sm<6) probe (0,0) rgba (1, 1, 1, 99)
% Same as above, but with bracket exprs, which are ignored in SM>=6.
[pixel shader todo]
Texture2D tex1 : register(vs, t[1], space0) : register(ps, t[2], space0);
float4 main() : sv_target
{
return tex1.Load(int3(0, 0, 0));
}
[test]
todo(sm<6) draw quad
if(sm>=6) probe (0, 0) rgba (0, 0, 0, 99)
if(sm<6) probe (0, 0) rgba (1, 1, 1, 99)
% This actually inheres to 5.1+; it doesn't matter whether "space" is specified.