From a245d9fb24f1cc336ed077f30ead80117d0b2337 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 18 May 2019 10:23:28 +0300 Subject: [PATCH] vk: DOuble general-purpose heap allocation to 128M and add a better diagnostic message for OOM --- rpcs3/Emu/RSX/VK/VKHelpers.cpp | 2 +- rpcs3/Emu/RSX/VK/VKTexture.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.cpp b/rpcs3/Emu/RSX/VK/VKHelpers.cpp index fda79477fa..3adc3e6a03 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.cpp +++ b/rpcs3/Emu/RSX/VK/VKHelpers.cpp @@ -208,7 +208,7 @@ namespace vk if (!g_scratch_buffer) { // 32M disposable scratch memory - g_scratch_buffer = std::make_unique(*g_current_renderer, 64 * 0x100000, + g_scratch_buffer = std::make_unique(*g_current_renderer, 128 * 0x100000, g_current_renderer->get_memory_mapping().device_local, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, 0); } diff --git a/rpcs3/Emu/RSX/VK/VKTexture.cpp b/rpcs3/Emu/RSX/VK/VKTexture.cpp index 2f00b3e36b..961c72d907 100644 --- a/rpcs3/Emu/RSX/VK/VKTexture.cpp +++ b/rpcs3/Emu/RSX/VK/VKTexture.cpp @@ -143,7 +143,7 @@ namespace vk const u32 in_stencil_size = out_w * out_h; const auto allocation_end = region.bufferOffset + packed_length + in_depth_size + in_stencil_size; - verify(HERE), src->size() >= allocation_end; + verify("Out of memory (compute heap). Lower your resolution scale setting." HERE), src->size() >= allocation_end; const VkDeviceSize z_offset = align(region.bufferOffset + packed_length, 256); const VkDeviceSize s_offset = align(z_offset + in_depth_size, 256);