intel/nir: fix potential invalid function impl ptr usage

We keep the nir_builder::impl value around, but we've run some passes
that might have change the main function.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 96fde5518b ("intel/rt: Add a helper to create the raygen trampoline shader")
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16970>
(cherry picked from commit 8d580de4a9)
This commit is contained in:
Lionel Landwerlin
2022-04-21 07:32:51 -07:00
committed by Dylan Baker
parent ce21dde04d
commit 63fc489471
2 changed files with 2 additions and 1 deletions

View File

@@ -481,7 +481,7 @@
"description": "intel/nir: fix potential invalid function impl ptr usage",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "96fde5518b5c47550f0f42f3a0504ccbdc4a4e92"
},

View File

@@ -489,6 +489,7 @@ brw_nir_create_raygen_trampoline(const struct brw_compiler *compiler,
NIR_PASS_V(nir, brw_nir_lower_rt_intrinsics, devinfo);
nir_builder_init(&b, nir_shader_get_entrypoint(b.shader));
/* brw_nir_lower_rt_intrinsics will leave us with a btd_global_arg_addr
* intrinsic which doesn't exist in compute shaders. We also created one
* above when we generated the BTD spawn intrinsic. Now we go through and