wip
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
light7734 2025-10-09 13:39:59 +03:30
parent 13ed750f68
commit a1bdb0005f
Signed by: light7734
GPG key ID: 8C30176798F1A6BA
2 changed files with 20 additions and 12 deletions

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(),