nir: add nir_export_dual_src_blend_amd intrinsic
authorQiang Yu <yuq825@gmail.com>
Sun, 23 Apr 2023 03:49:26 +0000 (11:49 +0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 26 Apr 2023 03:27:26 +0000 (03:27 +0000)
For GFX11 export dual source blend outputs when ACO.
ACO need a pseudo instruction to emit a block of
code which can't be done in nir currently.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199>

src/compiler/nir/nir_intrinsics.py

index 837803c..5a52503 100644 (file)
@@ -1607,6 +1607,10 @@ system_value("lds_ngg_gs_out_vertex_base_amd", 1)
 # FLAGS = AC_EXP_FLAG_*
 intrinsic("export_amd", [0], indices=[BASE, WRITE_MASK, FLAGS])
 
+# Export dual source blend outputs with swizzle operation
+# src[] = { mrt0, mrt1 }
+intrinsic("export_dual_src_blend_amd", [0, 0], indices=[WRITE_MASK])
+
 # Alpha test reference value
 system_value("alpha_reference_amd", 1)