tests: Test SM1 const register allocation with relative addressing.

This commit is contained in:
Francisco Casas 2024-05-03 04:15:09 -04:00 committed by Alexandre Julliard
parent b56ae0f1c8
commit 7b3644d9f2
Notes: Alexandre Julliard 2024-05-13 22:57:39 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/851

View File

@ -373,3 +373,40 @@ uniform 20 float 5
uniform 24 float 6
draw quad
todo probe all rgba (6, 1, 0, 0)
[pixel shader todo]
// Relative addressing extends the allocation size only up to the array's size.
float idx;
struct
{
float dyn[5];
float unused;
} a;
float4 main() : sv_target
{
return a.dyn[idx];
}
// Registers:
//
// Name Reg Size
// ------------ ----- ----
// a c0 5
// idx c5 1
//
[test]
uniform 0 float 0
uniform 4 float 1
uniform 8 float 2
uniform 12 float 3
uniform 16 float 4
uniform 20 float 3
todo draw quad
probe all rgba (3, 3, 3, 3)
uniform 20 float 1
todo draw quad
probe all rgba (1, 1, 1, 1)