From e3cf3ab6b82530622c69d8350e749eacb9f3c3d4 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Fri, 10 May 2019 10:50:53 +0300 Subject: [PATCH] rsx: Minor fixes - Fix transfer scaling (inverted) - Fix under-estimated typeless acquisition when doing depth format scaling --- rpcs3/Emu/RSX/Common/surface_store.h | 4 ++-- rpcs3/Emu/RSX/VK/VKTexture.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/surface_store.h b/rpcs3/Emu/RSX/Common/surface_store.h index 4871bb3ad5..a24a017267 100644 --- a/rpcs3/Emu/RSX/Common/surface_store.h +++ b/rpcs3/Emu/RSX/Common/surface_store.h @@ -214,8 +214,8 @@ namespace rsx old_contents.dst_x /= bytes_to_texels_x2; old_contents.dst_y /= rows_to_texels_y2; - old_contents.transfer_scale_x = f32(bytes_to_texels_x2) / bytes_to_texels_x; - old_contents.transfer_scale_y = f32(rows_to_texels_y2) / rows_to_texels_y; + old_contents.transfer_scale_x = f32(bytes_to_texels_x) / bytes_to_texels_x2; + old_contents.transfer_scale_y = f32(rows_to_texels_y) / rows_to_texels_y2; } // Apply resolution scale if needed diff --git a/rpcs3/Emu/RSX/VK/VKTexture.cpp b/rpcs3/Emu/RSX/VK/VKTexture.cpp index 93c4d0a953..2f00b3e36b 100644 --- a/rpcs3/Emu/RSX/VK/VKTexture.cpp +++ b/rpcs3/Emu/RSX/VK/VKTexture.cpp @@ -439,7 +439,7 @@ namespace vk vkCmdCopyBufferToImage(cmd, scratch_buf->value, dst, preferred_dst_format, 1, &info); }; - const u32 typeless_w = dst_rect.width(); + const u32 typeless_w = std::max(dst_rect.width(), src_rect.width()); const u32 typeless_h = src_rect.height() + dst_rect.height(); switch (src_format)