Mesa (staging/22.1): nir: Add store_combined_output_pan BASE back

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 26 16:40:22 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 2ae3cce8f11df2b26bfad69ff1f89505a84a4a4d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ae3cce8f11df2b26bfad69ff1f89505a84a4a4d

Author: Icecream95 <ixn at disroot.org>
Date:   Tue May 24 16:09:42 2022 +1200

nir: Add store_combined_output_pan BASE back

It's meaningful for this intrinsic and so does not add noise to the
lowering pass.

(Although dual-source writes must be to RT 0, depth and stencil
writes, which store_combined_output_pan is also used for, can still be
done with MRT enabled.)

Fixes: 5c168f09eb9 ("nir: Eliminate store_combined_output_pan BASE")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16685>
(cherry picked from commit 9f9ed959bd0110135ffdd4b98719d734e9c27c2f)

---

 .pick_status.json                      | 2 +-
 src/compiler/nir/nir_intrinsics.py     | 2 +-
 src/panfrost/util/pan_lower_writeout.c | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 366b378b7db..197c33a7cc5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -661,7 +661,7 @@
         "description": "nir: Add store_combined_output_pan BASE back",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "5c168f09eb92af8f12abdafe0f0b9de903330959"
     },
diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py
index f3b4a739054..300cd0884c6 100644
--- a/src/compiler/nir/nir_intrinsics.py
+++ b/src/compiler/nir/nir_intrinsics.py
@@ -1219,7 +1219,7 @@ intrinsic("shared_atomic_comp_swap_dxil", src_comp=[1, 1, 1], dest_comp=1)
 
 # src[] = { value }
 store("raw_output_pan", [], [])
-store("combined_output_pan", [1, 1, 1, 4], [COMPONENT, SRC_TYPE, DEST_TYPE])
+store("combined_output_pan", [1, 1, 1, 4], [BASE, COMPONENT, SRC_TYPE, DEST_TYPE])
 load("raw_output_pan", [1], [BASE], [CAN_ELIMINATE, CAN_REORDER])
 
 # Loads the sampler paramaters <min_lod, max_lod, lod_bias>
diff --git a/src/panfrost/util/pan_lower_writeout.c b/src/panfrost/util/pan_lower_writeout.c
index bce8e3e71c6..ea8fb5f1a55 100644
--- a/src/panfrost/util/pan_lower_writeout.c
+++ b/src/panfrost/util/pan_lower_writeout.c
@@ -55,6 +55,8 @@ pan_nir_emit_combined_store(nir_builder *b,
 
         intr->num_components = rt0_store ? rt0_store->src[0].ssa->num_components : 4;
 
+        if (rt0_store)
+                nir_intrinsic_set_base(intr, nir_intrinsic_base(rt0_store));
         nir_intrinsic_set_src_type(intr, pan_nir_rt_store_type(rt0_store));
         nir_intrinsic_set_dest_type(intr, pan_nir_rt_store_type(stores[2]));
         nir_intrinsic_set_component(intr, writeout);



More information about the mesa-commit mailing list