From e536b4973f08abaf5863211bd0886ab8cf101775 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 18 Mar 2024 14:50:05 -0400 Subject: [PATCH] nir: add export/load_exported_agx intrinsics for lowering non-monolithic ABI Signed-off-by: Alyssa Rosenzweig 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 2b106981e82..5c0c2de7621 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -2006,6 +2006,15 @@ load("helper_arg_lo_agx", [], [], [CAN_ELIMINATE]) # dst[] = { Helper argument high 32 bits }. load("helper_arg_hi_agx", [], [], [CAN_ELIMINATE]) +# Export a vector. At the end of the shader part, the source is copied to the +# indexed GPRs starting at BASE. Exports must not overlap within a shader part. +# Must only appear in the last block of the shader part. +intrinsic("export_agx", [0], indices=[BASE]) + +# Load an exported vector at the beginning of the shader part from GPRs starting +# at BASE. Must only appear in the first block of the shader part. +load("exported_agx", [], [BASE], [CAN_ELIMINATE]) + # Intel-specific query for loading from the isl_image_param struct passed # into the shader as a uniform. The variable is a deref to the image # variable. The const index specifies which of the six parameters to load.