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

Zebediah Figura (she/her) zfigura at codeweavers.com
Wed Jan 26 15:57:02 CST 2022


On 1/26/22 02:31, Giovanni Mascellani wrote:
> Hi,
> 
> Il 25/01/22 20:06, Zebediah Figura (she/her) ha scritto:
>> 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.
> 
> Actually, a difficulty with this approach is that then, if both 
> destinations are specified, we don't know which one is to be used to map 
> the sources' writemasks. The ways out I see are to add another argument 
> to specify it, to assume that they are identical so either can be used 
> or to keep the current interface with which exactly one destination is 
> non-NULL (it's true that it is more constraining, but my, admittedly 
> probably poor, understanding of Matteo's intentions is that 
> optimizations like the one you say are going to happen at a lower level, 
> so I wouldn't bother for the time being).
> 
> Which one do you prefer?

I guess that optimization would probably have to happen at a lower 
level, as you say, and probably even after register allocation.

In that case I'm not sure I have a preference for design.



More information about the wine-devel mailing list