nir: Add layer_id_written_agx sysval
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Wed, 16 Aug 2023 21:58:27 +0000 (17:58 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 1 Oct 2023 16:32:11 +0000 (12:32 -0400)
commitf4042afd5779f6e98b4369e90e9af4952bb0161c
tree5ccd79a5184ecf2c9e1819f3b9b5d061b1d2f542
parentd83d24e96af1dd82360fce5361c9fef25d3e657c
nir: Add layer_id_written_agx sysval

We'll implement layer ID reads in the frag shader with a varying read, but if
the VS doesn't write the varying we need to return 0 per the spec. Add a sysval
to detect that case so we can handle it at runtime without keys.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/compiler/nir/nir_intrinsics.py