vkd3d-shader/hlsl: Add constant folding for lshift.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov
2023-09-13 07:29:10 +02:00
committed by Alexandre Julliard
parent 8c9d65d6b3
commit 6e74819eb7
Notes: Alexandre Julliard 2023-10-05 22:37:14 +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/363
2 changed files with 49 additions and 0 deletions

View File

@@ -14,6 +14,21 @@ float4 main() : SV_TARGET
draw quad
probe all rgba (0.0, 0.0, 163840.0, 480.0)
[pixel shader]
float4 main() : sv_target
{
int x = 1;
int y = -1;
int z = 34;
uint x2 = 1;
return float4(x << y, x << z, x2 << y, x2 << z);
}
[test]
draw quad
probe all rgba (-2147483648.0, 4.0, 2147483650.0, 4.0)
[pixel shader]
float4 main() : SV_TARGET
{