vkd3d-shader/hlsl: Make pre/post decrement generate a signed one.

If a float expression is pre/post decremented and an unsigned one is
used to execute it, the unsigned one is first negated (becoming 2^32-1)
and then casted to float (becoming 2^32), which leads to an incorrect
result.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Giovanni Mascellani
2021-12-01 17:15:00 +01:00
committed by Alexandre Julliard
parent c64627313f
commit 0e45838370
4 changed files with 15 additions and 2 deletions

View File

@@ -304,7 +304,6 @@ XFAIL_TESTS = \
tests/hlsl-storage-qualifiers.shader_test \
tests/hlsl-vector-indexing.shader_test \
tests/hlsl-vector-indexing-uniform.shader_test \
tests/math.shader_test \
tests/max.shader_test \
tests/sampler.shader_test \
tests/texture-load.shader_test \