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

Francisco Casas fcasas at codeweavers.com
Fri Jan 7 05:51:09 CST 2022


January 7, 2022 6:42 AM, "Giovanni Mascellani" <gmascellani at codeweavers.com> wrote:

> 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.


Good catch! I didn't knew that.

Okay



More information about the wine-devel mailing list