From fcc7a7452a2d94ffaef366ec51e1c3d541dea09a Mon Sep 17 00:00:00 2001 From: kd-11 Date: Fri, 21 Oct 2022 17:07:57 +0300 Subject: [PATCH] vk: Fix scratch buf size calculation when uploading DSVs --- rpcs3/Emu/RSX/VK/VKTexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/VK/VKTexture.cpp b/rpcs3/Emu/RSX/VK/VKTexture.cpp index bf4cb8e363..bfb8b50494 100644 --- a/rpcs3/Emu/RSX/VK/VKTexture.cpp +++ b/rpcs3/Emu/RSX/VK/VKTexture.cpp @@ -1012,7 +1012,7 @@ namespace vk { // D-S aspect requires a load section that can fit a separated block => D(4) + S(1) // Due to reverse processing of inputs, only enough space to fit one layer is needed here. - scratch_buf_size += dst_image->width() * dst_image->height() * 5; + scratch_buf_size += (image_linear_size * 5) / 4; } // Must acquire scratch buffer owned by the processing command queue!