nir: add a V3D-specific intrinsic for per-sample color writes
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 16 Jul 2019 07:44:52 +0000 (09:44 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 18 Jul 2019 06:59:35 +0000 (08:59 +0200)
For per-sample color writes we need the output intrinsic to pack the
sample index, which is not provided with regular store_output intrinsics
unless we figured out a way to encode it into the base or the offset.

v2:
 - Drop the writemask (Eric)

Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir_intrinsics.py

index a37297ca44081cecbe0492d19c5d37acf89f2178..0ae5c12a280272668c3366607e540b6142b633f1 100644 (file)
@@ -785,3 +785,12 @@ load("raw_output_pan", 0, [], [CAN_ELIMINATE, CAN_REORDER])
 # src[] = { render_target }
 # BASE = sample index
 load("tlb_color_v3d", 1, [BASE, COMPONENT], [])
+
+# V3D-specific instrinc for per-sample tile buffer color writes.
+#
+# The driver backend needs to identify per-sample color writes and emit
+# specific code for them.
+#
+# src[] = { value, render_target }
+# BASE = sample index
+store("tlb_sample_color_v3d", 2, [BASE, COMPONENT, TYPE], [])