vulkan: Enable VULKAN_HPP_NO_EXCEPTIONS broadly. (#995)

* vulkan: Enable VULKAN_HPP_NO_EXCEPTIONS broadly.

* vulkan: Use structured bindings for result where possible.
This commit is contained in:
squidbus 2024-09-25 02:19:38 -07:00 committed by GitHub
parent 36ef61908d
commit b2de662d67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 205 additions and 106 deletions

View file

@ -128,7 +128,9 @@ vk::BufferView Buffer::View(u32 offset, u32 size, bool is_written, AmdGpu::DataF
.offset = offset,
.range = size,
};
const auto view = instance->GetDevice().createBufferView(view_ci);
const auto [view_result, view] = instance->GetDevice().createBufferView(view_ci);
ASSERT_MSG(view_result == vk::Result::eSuccess, "Failed to create buffer view: {}",
vk::to_string(view_result));
scheduler->DeferOperation(
[view, device = instance->GetDevice()] { device.destroyBufferView(view); });
return view;