新增交换链创建功能

This commit is contained in:
2026-01-05 17:47:08 +08:00
parent 3f5f4a8cc0
commit fd62137041
11 changed files with 201 additions and 31 deletions

View File

@@ -63,7 +63,7 @@ namespace mirai {
// 创建 RAII 风格的 Allocator
auto [result, allocator] = vma::createAllocator(allocator_info);
if (result != vk::Result::eSuccess) {
return MAKE_ERROR_INFO(error_code::vulkan_init_failed, "Failed to create VMA Allocator: {}", to_string(result));
return MAKE_ERROR_INFO(error_code::vulkan_init_failed, "VMA分配器创建失败: {}", to_string(result));
}
return allocator;
}
@@ -77,7 +77,7 @@ namespace mirai {
auto result = create_vma_allocator(config);
if (!result) {
MIRAI_LOG_ERROR("VMA 分配器初始化失败: {}", result.error().full_description());
throw std::runtime_error("VMA Allocator initialization failed");
throw std::runtime_error("VMA 分配器初始化失败");
}
vma_allocator_ = result.value();
}