zink: run bo lowering passes for separate shader compile with uniform inlining
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 7 Apr 2023 16:18:19 +0000 (12:18 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 24 Apr 2023 02:49:19 +0000 (02:49 +0000)
this is otherwise unable to pass ntv

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22612>

src/gallium/drivers/zink/zink_compiler.c

index 1d4c3b4..ddbaf8c 100644 (file)
@@ -3656,6 +3656,11 @@ zink_shader_compile_separate(struct zink_screen *screen, struct zink_shader *zs)
       default: break;
       }
    }
+   if (screen->driconf.inline_uniforms) {
+      NIR_PASS_V(nir, nir_lower_io_to_scalar, nir_var_mem_global | nir_var_mem_ubo | nir_var_mem_ssbo | nir_var_mem_shared);
+      NIR_PASS_V(nir, rewrite_bo_access, screen);
+      NIR_PASS_V(nir, remove_bo_access, zs);
+   }
    optimize_nir(nir, zs);
    zink_descriptor_shader_init(screen, zs);
    struct zink_shader_object obj = compile_module(screen, zs, nir, true);