Make vk_allocator a singleton

This commit is contained in:
Patrick Nicolas
2024-02-07 18:25:54 +01:00
parent 595d27f8dc
commit df394ec079
15 changed files with 163 additions and 96 deletions
+4 -2
View File
@@ -140,7 +140,8 @@ text_rasterizer::text_rasterizer(vk::raii::Device & device, vk::raii::PhysicalDe
image_allocation text_rasterizer::create_image(vk::Extent2D size)
{
image_allocation alloc{vk::ImageCreateInfo{
image_allocation alloc{device,
vk::ImageCreateInfo{
.imageType = vk::ImageType::e2D,
.format = text::format,
.extent = {
@@ -167,7 +168,8 @@ image_allocation text_rasterizer::create_image(vk::Extent2D size)
buffer_allocation text_rasterizer::create_buffer(size_t size)
{
buffer_allocation alloc{vk::BufferCreateInfo{
buffer_allocation alloc{device,
vk::BufferCreateInfo{
.size = size,
.usage = vk::BufferUsageFlagBits::eTransferSrc,
},