panfrost/midgard: Verify SSA claims when pipelining
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 5 Jun 2019 18:51:16 +0000 (18:51 +0000)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 5 Jun 2019 21:40:08 +0000 (14:40 -0700)
commit905d914cb694b90dddd5206eed436d1aae108e8b
tree3f29a1f9190d633e578a08d5e1336ca1c9a6f9b6
parentdcd12aad46fd93f4d10c7fef609540ca27077283
panfrost/midgard: Verify SSA claims when pipelining

The pipeline register creation algorithm is only valid for SSA indices;
NIR registers and such cannot be pipelined without more complex
analysis. However, there are the ocassional class of "liars" -- indices
that claim to be SSA but are not. This occurs in the blend shader
prologue, for example. Detect this and just bail quietly for now.

Eventually we need to rewrite the blend shader prologue to occur in NIR
anyway (which would mitigate the issue), but that's more involved and
depends on a better understanding of pixel formats in blend shaders (for
non-RGBA8888/UNORM cases).

Fixes some blend shader regressions.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/compiler.h
src/gallium/drivers/panfrost/midgard/midgard_liveness.c
src/gallium/drivers/panfrost/midgard/midgard_ra_pipeline.c