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; }