[PATCH vkd3d 7/8] vkd3d-shader/hlsl: Support negation for all numeric types in fold_constants().

Giovanni Mascellani gmascellani at codeweavers.com
Fri Jan 7 03:42:16 CST 2022


Hi,

On 06/01/22 18:39, Francisco Casas wrote:
> +            case HLSL_TYPE_INT:
> +                tgt->value[k].i = -src->value[k].i;
> +                break;

Alas, negation isn't safe either: -INT_MIN is undefined behavior, and 
you have to do the unsigned trick here too.

Giovanni.



More information about the wine-devel mailing list