[Mesa-dev] [PATCH 0/2] Add inverted bitwise forms to NIR

Ilia Mirkin imirkin at alum.mit.edu
Fri Apr 26 00:24:46 UTC 2019


On Thu, Apr 25, 2019 at 6:37 PM Alyssa Rosenzweig <alyssa at rosenzweig.io> wrote:
> Various combinations of these instructions are found on many
> architectures. They appear directly as-is on Midgard; some of them
> should be implementable on Intel Gen8+ via the source modifiers; I was
> told over IRC that AMD/Nouveau might have some of these as well. Rather

FWIW, many instructions NVIDIA GPUs support modifiers on either or
both parameters to an operation (esp the bitwise and arithmetic ops).
Whether the modifier is supported depends on various oddness (e.g.
whether the second arg is GPR vs const/imm20 vs imm32), so I doubt
this would be particularly useful there. Furthermore, the nouveau
compiler already has a modifier propagation pass which attempts to
combine the NOT/NEG/SAT ops with uses that can consume them directly.

It's unclear to me whether NIR should directly support all 16 boolean
operations or not. I can see arguments both for and against. Just
wanted to point out the NVIDIA situation since it was referenced
explicitly.

Cheers,

  -ilia


More information about the mesa-dev mailing list