Mesa (staging/22.0): intel/nir: fix shader call lowering

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 8 17:25:13 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: a910e58ad8b674cda1ff26264a44cb88c1e9efa6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a910e58ad8b674cda1ff26264a44cb88c1e9efa6

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Tue Jan 18 10:05:22 2022 +0200

intel/nir: fix shader call lowering

We're replacing a generic instruction by an intel specific one, we
need to remove the previous instruction.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: c5a42e401036 ("intel/fs: fix shader call lowering pass")
Reviewed-by: Caio Oliveira <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13719>
(cherry picked from commit 39f6cd5d799ad077ad41d920dc31c5da1fae3c24)

---

 .pick_status.json                               | 2 +-
 src/intel/compiler/brw_nir_lower_shader_calls.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index ae93e3bf3b8..d01c432ab78 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -202,7 +202,7 @@
         "description": "intel/nir: fix shader call lowering",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "c5a42e401036eb2eecf8798c103f8ae2cce08eab"
     },
diff --git a/src/intel/compiler/brw_nir_lower_shader_calls.c b/src/intel/compiler/brw_nir_lower_shader_calls.c
index 1b04be14fa0..b4c40b112bd 100644
--- a/src/intel/compiler/brw_nir_lower_shader_calls.c
+++ b/src/intel/compiler/brw_nir_lower_shader_calls.c
@@ -137,6 +137,8 @@ lower_shader_calls_instr(struct nir_builder *b, nir_instr *instr, void *data)
 
    switch (call->intrinsic) {
    case nir_intrinsic_rt_trace_ray: {
+      b->cursor = nir_instr_remove(instr);
+
       store_resume_addr(b, call);
 
       nir_ssa_def *as_addr = call->src[0].ssa;
@@ -217,6 +219,8 @@ lower_shader_calls_instr(struct nir_builder *b, nir_instr *instr, void *data)
    }
 
    case nir_intrinsic_rt_execute_callable: {
+      b->cursor = nir_instr_remove(instr);
+
       store_resume_addr(b, call);
 
       nir_ssa_def *sbt_offset32 =



More information about the mesa-commit mailing list