From: "Zebediah Figura (she/her)" Subject: Re: [PATCH vkd3d 1/5] vkd3d-shader: Write SM1 subtraction instructions. Message-Id: Date: Thu, 17 Jun 2021 11:15:58 -0500 In-Reply-To: <20210617094818.1224991-1-mbruni@codeweavers.com> References: <20210601024114.23330-1-zfigura@codeweavers.com> <20210617094818.1224991-1-mbruni@codeweavers.com> On 6/17/21 4:48 AM, Matteo Bruni wrote: > Signed-off-by: Matteo Bruni > --- > Sorry for the delay, I totally missed this patch series... > /me updates his email filtering rules > > We should probably get rid of HLSL_IR_BINOP_SUB at some point: > HLSL_IR_BINOP_ADD + HLSL_IR_UNOP_NEG does the same thing at least as > well and it's one less case to handle in a number of places. Also on > the output side, there is no corresponding SM4+ instruction and IIRC > the native compiler doesn't generate SUB instructions for SM1 either. I actually had an SM4-specific lowering pass for that already, but I figured as long as there's a SUB instruction for SM1 there's no reason not to use it... Turns out you're right, though, it uses add + negative modifier. Guess that's one more instruction we could remove at parse time.