From 4dd67cdd5427e2a6287b1c474c54ad07ca4a5480 Mon Sep 17 00:00:00 2001 From: raven02 Date: Thu, 4 Aug 2016 17:54:34 +0800 Subject: [PATCH] texture: ignore when texture width > pitch --- rpcs3/Emu/RSX/Common/TextureUtils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpcs3/Emu/RSX/Common/TextureUtils.cpp b/rpcs3/Emu/RSX/Common/TextureUtils.cpp index 15769117be..9d1627716c 100644 --- a/rpcs3/Emu/RSX/Common/TextureUtils.cpp +++ b/rpcs3/Emu/RSX/Common/TextureUtils.cpp @@ -201,6 +201,12 @@ void upload_texture_subresource(gsl::span dst_buffer, const rsx_subre u16 w = src_layout.width_in_block; u16 h = src_layout.height_in_block; u16 depth = src_layout.depth; + u32 pitch = src_layout.pitch_in_bytes; + + // Ignore when texture width > pitch + if (w > pitch) + return; + switch (format) { case CELL_GCM_TEXTURE_B8: