radv/rt: Clear NIR metadata after lowering the ABI
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Fri, 9 Jun 2023 08:26:26 +0000 (10:26 +0200)
committerMarge Bot <emma+marge@anholt.net>
Sat, 10 Jun 2023 10:00:27 +0000 (10:00 +0000)
radv_nir_lower_rt_abi inserts instructions and control flow.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23545>

src/amd/vulkan/radv_rt_shader.c

index ca83657..51960c6 100644 (file)
@@ -1732,6 +1732,8 @@ radv_nir_lower_rt_abi(nir_shader *shader, const VkRayTracingPipelineCreateInfoKH
                     nir_load_var(&b, vars.geometry_id_and_flags));
    ac_nir_store_arg(&b, &args->ac, args->ac.rt.hit_kind, nir_load_var(&b, vars.hit_kind));
 
+   nir_metadata_preserve(impl, nir_metadata_none);
+
    /* cleanup passes */
    NIR_PASS_V(shader, nir_lower_global_vars_to_local);
    NIR_PASS_V(shader, nir_lower_vars_to_ssa);