From 823a1047e91d05629f77e776c8d39a5e5722a787 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 29 Jun 2023 01:03:34 +0800 Subject: [PATCH] dxil: Use nir_remove_non_entrypoints Signed-off-by: Yonggang Luo Reviewed-by: Faith Ekstrand Part-of: --- src/microsoft/spirv_to_dxil/dxil_spirv_nir.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c b/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c index a8a6938e5a3..111ba194aaf 100644 --- a/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c +++ b/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c @@ -96,11 +96,7 @@ dxil_spirv_nir_prep(nir_shader *nir) NIR_PASS_V(nir, nir_opt_deref); /* Pick off the single entrypoint that we want */ - foreach_list_typed_safe(nir_function, func, node, &nir->functions) { - if (!func->is_entrypoint) - exec_node_remove(&func->node); - } - assert(exec_list_length(&nir->functions) == 1); + nir_remove_non_entrypoints(nir); /* Now that we've deleted all but the main function, we can go ahead and * lower the rest of the constant initializers. We do this here so that