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@intel.com>
Fixes: c5a42e4010 ("intel/fs: fix shader call lowering pass")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13719>
(cherry picked from commit 39f6cd5d79)
This commit is contained in:
Lionel Landwerlin 2022-01-18 10:05:22 +02:00 committed by Eric Engestrom
parent caf19bcf7b
commit b680bd0656
2 changed files with 5 additions and 1 deletions

View file

@ -247,7 +247,7 @@
"description": "intel/nir: fix shader call lowering",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c5a42e401036eb2eecf8798c103f8ae2cce08eab"
},

View file

@ -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 =