From 7fb288819a770eb04cbfd4c7b0a152f1b9ba55dc Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani <gmascellani@codeweavers.com> Date: Tue, 8 Apr 2025 21:32:07 +0200 Subject: [PATCH] vkd3d-shader/msl: Set the prefix to "unknown" for unhandled shader types in msl_generator_init(). Like we do for GLSL; there's no reason to abort compilation here. Note that this also avoids leaking "gen->buffer" and "gen->string_buffers" on the error path. --- libs/vkd3d-shader/msl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/msl.c b/libs/vkd3d-shader/msl.c index a5d952cd5..d477bfa1c 100644 --- a/libs/vkd3d-shader/msl.c +++ b/libs/vkd3d-shader/msl.c @@ -1292,7 +1292,7 @@ static int msl_generator_init(struct msl_generator *gen, struct vsir_program *pr { msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL, "Internal compiler error: Unhandled shader type %#x.", type); - return VKD3D_ERROR_INVALID_SHADER; + gen->prefix = "unknown"; } gen->interface_info = vkd3d_find_struct(compile_info->next, INTERFACE_INFO); -- GitLab