Use a VulkanDeviceAllocator for thin3d textures. Many devices have a hard limit on the total number of allocs and it's unnecessary to have the UI put pressure on that.

This commit is contained in:
Henrik Rydgård committed 2017-12-03 10:29:41 +01:00
1 parent 97bdc72d90
commit d0c248368d
9 files changed
+36 -12

No files matched your search

+2 -1
View File
@@ -205,7 +205,8 @@ void FramebufferManagerVulkan::MakePixelTexture(const u8 *srcPixels, GEBufferFor
VkCommandBuffer initCmd = (VkCommandBuffer)draw_->GetNativeObject(Draw::NativeObject::INIT_COMMANDBUFFER);
drawPixelsTex_ = new VulkanTexture(vulkan_);
// There's only ever a few of these alive, don't need to stress the allocator with these big ones.
drawPixelsTex_ = new VulkanTexture(vulkan_, nullptr);
if (!drawPixelsTex_->CreateDirect(initCmd, width, height, 1, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT)) {
// out of memory?
delete drawPixelsTex_;