radv/nir_lower_ray_queries: use nir_foreach_function_impl

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33770>
This commit is contained in:
Georg Lehmann 2025-02-26 17:26:31 +01:00 committed by Marge Bot
parent dec60f3337
commit ea3c04b535

View file

@ -644,13 +644,10 @@ radv_nir_lower_ray_queries(struct nir_shader *shader, struct radv_device *device
progress = true;
}
nir_foreach_function (function, shader) {
if (!function->impl)
continue;
nir_foreach_function_impl (impl, shader) {
nir_builder builder = nir_builder_create(impl);
nir_builder builder = nir_builder_create(function->impl);
nir_foreach_variable_in_list (var, &function->impl->locals) {
nir_foreach_variable_in_list (var, &impl->locals) {
if (!var->data.ray_query)
continue;
@ -659,7 +656,7 @@ radv_nir_lower_ray_queries(struct nir_shader *shader, struct radv_device *device
progress = true;
}
nir_foreach_block (block, function->impl) {
nir_foreach_block (block, impl) {
nir_foreach_instr_safe (instr, block) {
if (instr->type != nir_instr_type_intrinsic)
continue;
@ -719,7 +716,7 @@ radv_nir_lower_ray_queries(struct nir_shader *shader, struct radv_device *device
}
}
nir_progress(true, function->impl, nir_metadata_none);
nir_progress(true, impl, nir_metadata_none);
}
ralloc_free(query_ht);