Module: vkd3d Branch: master Commit: 19fd43214bf2ae4a69e240e658b47800e194124e URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/19fd43214bf2ae4a69e240e658b478...
Author: Francisco Casas fcasas@codeweavers.com Date: Fri Mar 1 16:01:03 2024 -0300
vkd3d-shader/hlsl: Ensure that TERNARY condition is always bool.
Also, properly casting it to float in lower_ternary() for SM1 avoids creating ABS and NEG on bool types.
---
libs/vkd3d-shader/hlsl.h | 10 ++--- libs/vkd3d-shader/hlsl.y | 51 ++++++++++++++++--------- libs/vkd3d-shader/hlsl_codegen.c | 42 ++++++++++---------- libs/vkd3d-shader/hlsl_constant_ops.c | 23 +---------- tests/hlsl/arithmetic-float-uniform.shader_test | 16 ++++---- tests/hlsl/float-comparison.shader_test | 4 +- tests/hlsl/fmod.shader_test | 12 +++--- tests/hlsl/inverse-trig.shader_test | 44 ++++++++++----------- tests/hlsl/lit.shader_test | 12 +++--- tests/hlsl/ternary.shader_test | 18 ++++----- tests/hlsl/vertex-shader-ops.shader_test | 6 +-- 11 files changed, 115 insertions(+), 123 deletions(-)