[PATCH vkd3d v3 01/12] vkd3d-shader/hlsl: Add support for sm4 instruction modifiers.

Henri Verbeet hverbeet at gmail.com
Wed Jan 19 07:06:59 CST 2022


On Wed, 19 Jan 2022 at 13:48, Giovanni Mascellani
<gmascellani at codeweavers.com> wrote:
> Il 19/01/22 13:02, Matteo Bruni ha scritto:
> >> Ech, this is hard to read, how about a simpler:
> >>
> >>       if (instr->modifier_count > 0)
> >>           token |= VKD3D_SM4_INSTRUCTION_MODIFIER;
> > Or even
> >
> > if (instr->modifier_count)
> >      token |= VKD3D_SM4_INSTRUCTION_MODIFIER;
>
> Not a big deal, but between these two I like Zeb's version more, in that
> it makes more explicit that we're dealing with a number and not with a
> boolean condition.
>
Actually, that's the reason I prefer the other variant; "Does the
instruction have modifiers?" vs "Is the number of modifiers larger
than <x>?".



More information about the wine-devel mailing list