From: Giovanni Mascellani Subject: Re: [PATCH vkd3d 3/6] vkd3d-shader/hlsl: Write SM4 unsigned multiplication instructions. Message-Id: Date: Wed, 26 Jan 2022 09:31:09 +0100 In-Reply-To: <4aa2945e-be6c-52f4-e130-94c7848f93c4@codeweavers.com> References: <20220125110753.1358613-1-gmascellani@codeweavers.com> <20220125110753.1358613-3-gmascellani@codeweavers.com> <4aa2945e-be6c-52f4-e130-94c7848f93c4@codeweavers.com> 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? Giovanni.