vkd3d-shader: Do not dump the target shader if compilation failed.

Otherwise we'd use unitialized data.
This commit is contained in:
Giovanni Mascellani 2024-10-19 20:59:56 +02:00 committed by Henri Verbeet
parent a1f712d100
commit 6a03369f84
Notes: Henri Verbeet 2024-10-23 16:18:57 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1220

View File

@ -1746,6 +1746,7 @@ int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
} }
} }
if (ret >= 0)
vkd3d_shader_dump_shader(&dump_data, out->code, out->size, false); vkd3d_shader_dump_shader(&dump_data, out->code, out->size, false);
vkd3d_shader_message_context_trace_messages(&message_context); vkd3d_shader_message_context_trace_messages(&message_context);