On Thu Feb 23 20:27:55 2023 +0000, Francisco Casas wrote:
Currently, `distance()` fails when passing `int` parameters:
int a, b; float4 main() : sv_target { return distance(a, b); }
vkd3d/libs/vkd3d-shader/hlsl_sm4.c:1800: write_sm4_expr: Assertion `type_is_float(dst_type)' failed. Aborted (core dumped)
it is worth noting that `add_binary_arithmetic_expr()` results in a value of the common type (which is `int` if both arguments are `int`).
Thanks, it should do explicit conversion apparently. I pushed just that. Tests results unfortunately differ again, between d3d9 and d3d10+.