[PATCH vkd3d v3 03/11] vkd3d-shader/hlsl: Test the INT_MIN / -1 constant folding special case.

Francisco Casas fcasas at codeweavers.com
Fri Apr 22 11:13:19 CDT 2022


Signed-off-by: Francisco Casas <fcasas at codeweavers.com>

However,

April 22, 2022 6:25 AM, "Giovanni Mascellani" <gmascellani at codeweavers.com> wrote:

> Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
> ---
> tests/arithmetic-int.shader_test | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
> 
> diff --git a/tests/arithmetic-int.shader_test b/tests/arithmetic-int.shader_test
> index c2eee2ba..14bb6a63 100644
> --- a/tests/arithmetic-int.shader_test
> +++ b/tests/arithmetic-int.shader_test
> @@ -24,6 +24,19 @@ float4 main() : SV_TARGET
> draw quad
> probe all rgba (5.0, 5.0, -5.0, 3.0)
> 
> +[pixel shader]
> +float4 main() : SV_TARGET
> +{
> + int x = -2147483648;
> + int y = -1;
> +
> + return x / y;
> +}
> +
> +[test]
> +draw quad
> +probe all rgba (-2147483648.0, -2147483648.0, -2147483648.0, -2147483648.0)
> +
> [pixel shader fail]
> float4 main() : SV_TARGET
> {
> -- 
> 2.35.2


Using ps_3_0, the native (10.0.10240.16384) gives me
---
    ps_3_0
    def c0, 2.14748365e+009, 0, 0, 0
    mov oC0, c0.x
---
while native (9.29.952.3111) doesn't even parse -2147483648 correctly.

I suggest adding
---
[require]
shader model >= 4.0
---

Best regards,
 Francisco.



More information about the wine-devel mailing list