vk: DOuble general-purpose heap allocation to 128M and add a better diagnostic message for OOM
This commit is contained in:
@@ -208,7 +208,7 @@ namespace vk
|
|||||||
if (!g_scratch_buffer)
|
if (!g_scratch_buffer)
|
||||||
{
|
{
|
||||||
// 32M disposable scratch memory
|
// 32M disposable scratch memory
|
||||||
g_scratch_buffer = std::make_unique<vk::buffer>(*g_current_renderer, 64 * 0x100000,
|
g_scratch_buffer = std::make_unique<vk::buffer>(*g_current_renderer, 128 * 0x100000,
|
||||||
g_current_renderer->get_memory_mapping().device_local, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT,
|
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);
|
VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ namespace vk
|
|||||||
const u32 in_stencil_size = out_w * out_h;
|
const u32 in_stencil_size = out_w * out_h;
|
||||||
|
|
||||||
const auto allocation_end = region.bufferOffset + packed_length + in_depth_size + in_stencil_size;
|
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<VkDeviceSize>(region.bufferOffset + packed_length, 256);
|
const VkDeviceSize z_offset = align<VkDeviceSize>(region.bufferOffset + packed_length, 256);
|
||||||
const VkDeviceSize s_offset = align<VkDeviceSize>(z_offset + in_depth_size, 256);
|
const VkDeviceSize s_offset = align<VkDeviceSize>(z_offset + in_depth_size, 256);
|
||||||
|
|||||||
Reference in New Issue
Block a user