[PATCH vkd3d 1/5] vkd3d-shader: Write SM1 subtraction instructions.

Zebediah Figura (she/her) zfigura at codeweavers.com
Thu Jun 17 11:15:58 CDT 2021


On 6/17/21 4:48 AM, Matteo Bruni wrote:
> Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
> ---
> 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.



More information about the wine-devel mailing list