[PATCH vkd3d 3/6] vkd3d-shader/hlsl: Write SM4 unsigned multiplication instructions.

Zebediah Figura (she/her) zfigura at codeweavers.com
Tue Jan 25 15:26:12 CST 2022


On 1/25/22 14:19, Giovanni Mascellani wrote:
> Hi,
> 
> Il 25/01/22 20:06, Zebediah Figura (she/her) ha scritto:
>> I want to find some way to put "2 dsts" in the function name, because 
>> as it is I can't tell just from reading.
> 
> Might that be "write_sm4_binary_op_with_two_destinations"?

Yes, although that's a bit unfortunately long.

>> I'd also suggest specifying both dsts as optional hlsl_ir_node 
>> pointers, where NULL translates to SM4_RT_NULL. That would allow you 
>> to use this helper even if both dsts are used.
> 
> Ok, good idea. Even though in later patches I am always using just one 
> result (and given how our IR is structured, I can't see how it can be 
> different), but generalizing anyway doesn't seem to hurt anybody.

We'll probably want to find a way to combine things via peepholes, at 
least for things like div/mod and sin/cos. That's not exactly easy to do 
but shouldn't be too hard either. It's also not really a priority, though.



More information about the wine-devel mailing list