nir: Add store_zs_agx intrinsic
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 17 Dec 2022 04:23:58 +0000 (23:23 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 17 Dec 2022 18:10:28 +0000 (18:10 +0000)
Will be used for frag depth/stencil export with multisampling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20365>

src/compiler/nir/nir_intrinsics.py

index c5b239b..bc98a7a 100644 (file)
@@ -1592,6 +1592,12 @@ load("local_pixel_agx", [1], [BASE, FORMAT], [CAN_REORDER, CAN_ELIMINATE])
 # base = offset
 store("local_pixel_agx", [1], [BASE, WRITE_MASK, FORMAT], [CAN_REORDER])
 
+# Combined depth/stencil emit, applying to a mask of samples. base indicates
+# which to write (1 = depth, 2 = stencil, 3 = both).
+#
+# src[] = { sample mask, depth, stencil }
+intrinsic("store_zs_agx", [1, 1, 1], indices=[BASE], flags=[])
+
 # Store a block from local memory into a bound image. Used to write out render
 # targets within the end-of-tile shader, although it is valid in general compute
 # kernels.