From 611ed96557d0455f9a9b080fcefeb89a83c60b6b Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:53:18 -0600 Subject: [PATCH] nvk: Pass an actual nak_compiler to nak_compile_shader() Part-of: --- src/nouveau/vulkan/nvk_shader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nouveau/vulkan/nvk_shader.c b/src/nouveau/vulkan/nvk_shader.c index 5f75317e8c5..bb6ab54fca6 100644 --- a/src/nouveau/vulkan/nvk_shader.c +++ b/src/nouveau/vulkan/nvk_shader.c @@ -1210,7 +1210,9 @@ nvk_compile_nir_with_nak(struct nvk_physical_device *pdev, const struct nvk_fs_key *fs_key, struct nvk_shader *shader) { - struct nak_shader_bin *bin = nak_compile_shader(nir, NULL); + struct nak_compiler *nak = nak_compiler_create(&pdev->info); + + struct nak_shader_bin *bin = nak_compile_shader(nir, nak); shader->stage = nir->info.stage; @@ -1237,6 +1239,8 @@ nvk_compile_nir_with_nak(struct nvk_physical_device *pdev, nvk_shader_dump(shader); #endif + nak_compiler_destroy(nak); + return VK_SUCCESS; }