pan/bi: Introduce TEXC_DUAL psuedoinstruction
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 21 Jul 2022 19:59:22 +0000 (15:59 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Sep 2022 16:03:23 +0000 (16:03 +0000)
commit9ec157c48226198e9d29252bccbccc516fa478f0
tree24b0016004a10ff6d984d5a23227f3a9f0922601
parent338f6f903603cc0f17e0b92ade1d7383622adbb5
pan/bi: Introduce TEXC_DUAL psuedoinstruction

There are two "shapes" of TEXC in the IR:

* Regular texturing. This TEXC writes a single set of staging registers.
* Dual texturing. This TEXC writes two sets of staging registers.

Currently we model both with a 2-destination TEXC, with a null second
destination for the usual case where dual texturing isn't used. This is awkward.
To make the "shapes" of instructions more predictable, make TEXC only write a
single set of staging registers (like the hardware instruction) and split off a
TEXC_DUAL pseudoinstruction for the second case, lowered late.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17794>
src/panfrost/bifrost/ISA.xml
src/panfrost/bifrost/bi_helper_invocations.c
src/panfrost/bifrost/bi_opt_dual_tex.c
src/panfrost/bifrost/bi_pack.c
src/panfrost/bifrost/bi_ra.c
src/panfrost/bifrost/bi_schedule.c
src/panfrost/bifrost/bifrost_compile.c
src/panfrost/bifrost/bir.c
src/panfrost/bifrost/test/test-dual-texture.cpp