asahi: Run nir_lower_fragcolor during preprocessing
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 29 Nov 2022 03:37:31 +0000 (22:37 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 3 Feb 2023 15:03:06 +0000 (15:03 +0000)
commit6908a0decea295ed9b99825dd8a44bcd3371d059
treeebaa439e21e9781c7d4286fe62ce5cd7cde1f25e
parent071ac599604bf578a7a9c190cd4901c1c5c6a44a
asahi: Run nir_lower_fragcolor during preprocessing

This pass needs to run early (because it depends on early I/O), but it doesn't
actually need the shader key. Why not? If we overestimate the number of render
targets, extra store_output intrinsics will be generated, but they will be
deleted by AGX tilebuffer lowering later.

Note we'll probably want something smarter than this for fragment epilogues in
the future to avoid piles of unnecessary moves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21065>
src/asahi/compiler/agx_compile.c
src/gallium/drivers/asahi/agx_state.c