nir/lower_blend: Set uses_fbfetch_output conservatively
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 9 Apr 2023 14:14:29 +0000 (10:14 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 11 Apr 2023 04:16:32 +0000 (04:16 +0000)
commita74c2ac40336bdbf9616ea2b9aac9aa29e6d1a2a
tree1ad761363eee45a26db5d238206b7d2e492e2dfc
parentd998217e179641fd6a8e6f18416c549d7a694712
nir/lower_blend: Set uses_fbfetch_output conservatively

Only insert a load_output if we're going to use it, don't rely on it getting
DCE'd since that will mess up the shader info. This does require a bit of logic
to figure out whether we do need it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22385>
src/compiler/nir/nir_lower_blend.c