From 5f24d585490d76c6a4de63bf6a87594b208540b8 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Mon, 19 Dec 2022 11:03:54 +0800 Subject: [PATCH] nir: add nir_export_amd intrinsic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Timur Kristóf Reviewed-by: Marek Olšák Signed-off-by: Qiang Yu Part-of: --- src/compiler/nir/nir_intrinsics.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index 34b3d2bfd48..9e473893195 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -275,6 +275,9 @@ index("unsigned", "value_id") # Whether to sign-extend offsets in address arithmatic (else zero extend) index("bool", "sign_extend") +# Instruction specific flags +index("unsigned", "flags") + intrinsic("nop", flags=[CAN_ELIMINATE]) intrinsic("convert_alu_types", dest_comp=0, src_comp=[0], @@ -1546,6 +1549,12 @@ system_value("lds_ngg_scratch_base_amd", 1) # LDS offset for NGG GS shader vertex emit system_value("lds_ngg_gs_out_vertex_base_amd", 1) +# AMD GPU shader output export instruction +# src[] = { export_value } +# BASE = export target +# FLAGS = AC_EXP_FLAG_* +intrinsic("export_amd", [0], indices=[BASE, WRITE_MASK, FLAGS]) + # V3D-specific instrinc for tile buffer color reads. # # The hardware requires that we read the samples and components of a pixel