From 0a7a12bbff6e34ec897baac5a3429f5b66146843 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 27 Jul 2021 17:51:20 +0200 Subject: [PATCH] RSX: fix 'Working buffer not big enough' --- rpcs3/Emu/RSX/Common/ring_buffer_helper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/ring_buffer_helper.h b/rpcs3/Emu/RSX/Common/ring_buffer_helper.h index 7f434ef1b0..46e99d928a 100644 --- a/rpcs3/Emu/RSX/Common/ring_buffer_helper.h +++ b/rpcs3/Emu/RSX/Common/ring_buffer_helper.h @@ -45,7 +45,7 @@ protected: } } - // Grow the buffer to hold at least size bytes + // Grow the buffer to hold at least size bytes virtual bool grow(usz /*size*/) { // Stub @@ -87,7 +87,7 @@ public: const usz alloc_size = utils::align(size, Alignment); const usz aligned_put_pos = utils::align(m_put_pos, Alignment); - if (!can_alloc(size) && !grow(aligned_put_pos + alloc_size)) + if (!can_alloc(size) && !grow(alloc_size)) { fmt::throw_exception("[%s] Working buffer not big enough, buffer_length=%d allocated=%d requested=%d guard=%d largest_pool=%d", m_name, m_size, m_current_allocated_size, size, m_min_guard_size, m_largest_allocated_pool);