Skip to content

Commit

Permalink
Fix "out of memory" errors when the vulkan backend is asked to create…
Browse files Browse the repository at this point in the history
… zero byte sized buffers
  • Loading branch information
dpjudas authored and madame-rachelle committed Sep 25, 2021
1 parent 2535010 commit b59554f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/rendering/vulkan/system/vk_builders.h
Expand Up @@ -571,7 +571,7 @@ inline BufferBuilder::BufferBuilder()

inline void BufferBuilder::setSize(size_t size)
{
bufferInfo.size = size;
bufferInfo.size = std::max(size, (size_t)16);
}

inline void BufferBuilder::setUsage(VkBufferUsageFlags bufferUsage, VmaMemoryUsage memoryUsage, VmaAllocationCreateFlags allocFlags)
Expand Down

0 comments on commit b59554f

Please sign in to comment.