vkd3d-shader/hlsl: Parse matrix constructors.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Giovanni Mascellani
2022-04-27 10:56:26 +02:00
committed by Alexandre Julliard
parent ff3ec5d4a5
commit cf7cf05cb7
4 changed files with 23 additions and 28 deletions

View File

@ -60,3 +60,19 @@ uniform 0 float4 1.0 2.0 3.0 0.0
uniform 4 float4 5.0 6.0 7.0 0.0
draw quad
probe all rgba (1.0, 3.0, 6.0, 7.0)
[pixel shader]
float4 main() : SV_TARGET
{
float2x2 a = float2x2(11.0, 12.0, 13.0, 14.0);
float4x4 m = float4x4(1.0, 2.0, 3.0, 4.0,
float3(5.0, 6.0, 7.0), 8.0,
9.0, 10.0,
a,
15.0, 16.0);
return float4(m[0][0], m[1][0], m[1][2], m[2][3]);
}
[test]
todo draw quad
probe all rgba (1.0, 5.0, 7.0, 12.0)

View File

@ -29,5 +29,5 @@ float4 main() : sv_target
}
[test]
todo draw quad
draw quad
probe all rgba (1.0, 2.0, 3.0, 5.0)

View File

@ -98,7 +98,7 @@ float4 main() : sv_target
todo draw quad
probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader fail todo]
[pixel shader fail]
float3x1 func()
{
return float1x3(0.4, 0.3, 0.2);
@ -109,7 +109,7 @@ float4 main() : sv_target
return float4(func(), 0.0);
}
[pixel shader fail todo]
[pixel shader fail]
float1x3 func()
{
return float3x1(0.4, 0.3, 0.2);
@ -191,7 +191,7 @@ float4 main() : sv_target
todo draw quad
probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader fail todo]
[pixel shader fail]
float3x1 func()
{
return float1x4(0.4, 0.3, 0.2, 0.1);
@ -217,7 +217,7 @@ float4 main() : sv_target
todo draw quad
probe all rgba (0.4, 0.3, 0.2, 0.0)
[pixel shader fail todo]
[pixel shader fail]
float1x3 func()
{
return float4x1(0.4, 0.3, 0.2, 0.1);