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

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov
2023-09-23 18:31:55 +02:00
committed by Alexandre Julliard
parent 6e74819eb7
commit 8ebccad3c9
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

@@ -29,6 +29,21 @@ float4 main() : sv_target
draw quad
probe all rgba (-2147483648.0, 4.0, 2147483650.0, 4.0)
[pixel shader]
float4 main() : sv_target
{
int x = 2147483647;
int y = -1;
int z = 34;
uint x2 = 4294967295;
return float4(x >> y, x >> z, x2 >> y, x2 >> z);
}
[test]
draw quad
probe all rgba (0.0, 536870912.0, 1.0, 1073741824.0)
[pixel shader]
float4 main() : SV_TARGET
{