ci(amd64/clang/lsan): fix leak sanitizer errors #57

Merged
light7734 merged 35 commits from ci/leak_sanatizer_fix into main 2025-10-09 14:08:14 +00:00
2 changed files with 20 additions and 12 deletions
Showing only changes of commit a1bdb0005f - Show all commits

View file

@ -40,8 +40,16 @@ Device::~Device()
return;
}
vkc(vk_device_wait_idle(m_device));
vk_destroy_device(m_device, nullptr);
try
{
vkc(vk_device_wait_idle(m_device));
vk_destroy_device(m_device, nullptr);
}
catch (const std::exception &exp)
{
log_err("Failed to destroy vk device:");
log_err("\twhat: {}", exp.what());
}
}
void Device::initialize_logical_device()

View file

@ -10,7 +10,15 @@ Pass::Pass(
const lt::assets::ShaderAsset &vertex_shader,
const lt::assets::ShaderAsset &fragment_shader
)
: m_device(static_cast<Device *>(device))
: m_device(static_cast<Device *>(device)), m_layout(m_device->create_pipeline_layout(
VkPipelineLayoutCreateInfo {
.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
.setLayoutCount = 0u,
.pSetLayouts = nullptr,
.pushConstantRangeCount = 0u,
.pPushConstantRanges = nullptr,
}
))
{
auto *vertex_module = create_module(
vertex_shader.unpack(lt::assets::ShaderAsset::BlobTag::code)
@ -103,15 +111,7 @@ Pass::Pass(
.blendConstants = { 0.0f, 0.0, 0.0, 0.0 },
};
m_layout = m_device->create_pipeline_layout(
VkPipelineLayoutCreateInfo {
.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO,
.setLayoutCount = 0u,
.pSetLayouts = nullptr,
.pushConstantRangeCount = 0u,
.pPushConstantRanges = nullptr,
}
);
auto attachment_description = VkAttachmentDescription {
.format = static_cast<Swapchain *>(swapchain)->get_format(),