pan/bi: Lower sample mask writes in NIR
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 6 Feb 2023 15:49:47 +0000 (10:49 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 23 Mar 2023 23:53:45 +0000 (23:53 +0000)
commit5c9ffaad8fefbd0b89137afe4e137486ad11b000
treed06f36a245e8e8c04e0b24336cbc00e63da72212
parent6f3a761e813491f08af32be232f199dc0d74068a
pan/bi: Lower sample mask writes in NIR

This uses the new NIR sysvals to avoid materializing magic sysvals in the
driver, getting us closer to the Ekstrand Rule.

v2: Only lower for fragment shaders. Lowering in vertex shaders should be a
no-op, except that FRAG_RESULT_SAMPLE_MASK shadows a VARYING_SLOT for fog
coords, causing v1 of this patch to regress fog. Caught by the G52 piglit job in
CI. Thank you, Marge.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906>
src/panfrost/compiler/bifrost_compile.c
src/panfrost/util/pan_sysval.c