freedreno: Switch to use nir_foreach_function_impl in tu_shader.cc
authorYonggang Luo <luoyonggang@gmail.com>
Wed, 28 Jun 2023 11:07:12 +0000 (19:07 +0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 25 Jul 2023 12:09:07 +0000 (12:09 +0000)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24316>

src/freedreno/vulkan/tu_shader.cc

index 6620c6c..ffe5d01 100644 (file)
@@ -666,11 +666,8 @@ static void
 gather_push_constants(nir_shader *shader, struct tu_shader *tu_shader)
 {
    uint32_t min = UINT32_MAX, max = 0;
-   nir_foreach_function(function, shader) {
-      if (!function->impl)
-         continue;
-
-      nir_foreach_block(block, function->impl) {
+   nir_foreach_function_impl(impl, shader) {
+      nir_foreach_block(block, impl) {
          nir_foreach_instr_safe(instr, block) {
             if (instr->type != nir_instr_type_intrinsic)
                continue;