From: Giovanni Mascellani Subject: Re: [PATCH vkd3d 5/8] vkd3d-shader/hlsl: Support addition for all numeric types in fold_constants(). Message-Id: Date: Fri, 7 Jan 2022 10:36:52 +0100 In-Reply-To: <20220106173949.82958-5-fcasas@codeweavers.com> References: <20220106173949.82958-5-fcasas@codeweavers.com> Hi, On 06/01/22 18:39, Francisco Casas wrote: > + case HLSL_TYPE_INT: > + u1 = src1->value[k].i; > + u2 = src2->value[k].i; > + tgt->value[k].i = (int32_t)(u1 + u2); > + break; Maybe it makes sense to drop a comment here to make it clear why you're doing this? It might not be completely obvious to anybody. Something like /* Using unsigned to avoid undefined behavior on signed overflow. */. Same thing for the other patches. Giovanni.