vkd3d-shader/hlsl: Support non-constant vector indexing.

Non-constant vector indexing is not solved with relative addressing
in the register indexes because this indexation cannot be at the level
of register-components.

Mathematical operations must be used instead.
This commit is contained in:
Francisco Casas
2023-05-08 18:25:18 -04:00
committed by Alexandre Julliard
parent 6cfa8cf859
commit ebf7573571
Notes: Alexandre Julliard 2023-06-07 22:46:44 +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/207
7 changed files with 134 additions and 37 deletions

View File

@@ -13,7 +13,7 @@ draw quad
probe all rgba (8.0, 8.0, 8.0, 8.0)
[pixel shader todo]
[pixel shader]
float4 a, b;
float i;
@@ -26,8 +26,8 @@ float4 main() : sv_target
uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 5.0 6.0 7.0 8.0
uniform 8 float 2
todo draw quad
todo probe all rgba (10.0, 10.0, 10.0, 10.0)
draw quad
probe all rgba (10.0, 10.0, 10.0, 10.0)
[pixel shader]
@@ -44,7 +44,7 @@ draw quad
probe all rgba (3.0, 3.0, 3.0, 3.0)
[pixel shader todo]
[pixel shader]
float4 a;
float i;
@@ -56,11 +56,11 @@ float4 main() : sv_target
[test]
uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float 0
todo draw quad
todo probe all rgba (4.0, 4.0, 4.0, 4.0)
draw quad
probe all rgba (4.0, 4.0, 4.0, 4.0)
uniform 4 float 2
todo draw quad
todo probe all rgba (1.0, 1.0, 1.0, 1.0)
draw quad
probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader]
@@ -82,7 +82,7 @@ draw quad
probe all rgba (4.0, 4.0, 4.0, 4.0)
[pixel shader todo]
[pixel shader]
float4 a;
float i;
@@ -99,5 +99,5 @@ float4 main() : sv_target
[test]
uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float 1
todo draw quad
todo probe all rgba (2.0, 2.0, 2.0, 2.0)
draw quad
probe all rgba (2.0, 2.0, 2.0, 2.0)