On Mon Sep 11 11:27:36 2023 +0000, Giovanni Mascellani wrote:
Given that `hlsl_add_conditional()` is also used in `lower_int_division()` and `lower_int_modulus()`, which likely have the same problem, shouldn't we rather fix `hlsl_add_conditional()` instead? Also, please add the corresponding test in `arithmetic-float-uniform.shader_test` too:
[pixel shader] float4 x = {5.0, -42.1, 4.0, 45.0}; float4 y = {15.0, -5.0, 4.1, 5.0}; float4 main() : sv_target { return x % y; } [test] draw quad probe all rgba (5.0, -2.1, 4.0, 0.0) 4
I don't think we should, because it does not mean the same thing. In the future we might want to turn certain if/else blocks to conditional moves, I don't know if that happens on Windows. Regarding this test, it only differs in a way the data is initialized, why is it important?