asahi: Don't crash on <4 channel render targets
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 10 Sep 2022 21:56:10 +0000 (17:56 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Sep 2022 16:04:29 +0000 (16:04 +0000)
commite1715c6a4f0548078d80047dd41388bf372a3366
tree8cb162c0c075efd8f425f47a004f950abe56aa81
parent89e0f544223034a902f5459103e66ce3f245bc95
asahi: Don't crash on <4 channel render targets

It doesn't matter what we put in the swizzle for the unused components,
but if we try to stuff out-of-bounds PIPE_SWIZZLE_0/1/NONE values,
we'll crash in GenXML. Fixes failing tests in

   dEQP-GLES3.functional.fragment_out.basic.fixed.*

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