13 Sep
2023
13 Sep
'23
10:15 a.m.
On Wed Sep 13 09:08:35 2023 +0000, Giovanni Mascellani wrote:
I stand corrected! The correct version is probably rather: `dst->u[k] = (src1->value.u[k].f != 0.0f) ? src2->value.u[k] : src3->value.u[k]`. IOW, we have to copy the `union`, not the unsigned field, because the data type of the second and third operand might be larger than an unsigned (i.e., it might be a double). Also, similarly to other `fold_*()` helpers, you might assert that the type of the second and third operand coincides with the type of the result. Right, source/destination type is not affected by selector type. Thanks.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/336#note_45189