From 45b7da6666eaf80780dcd4fcc69eac9b0d7417b1 Mon Sep 17 00:00:00 2001 From: vlj Date: Sat, 27 Jun 2015 02:09:26 +0200 Subject: [PATCH] d3d12: Mipmap offset is 512byte aligned Fix retro city rampage crash at startup --- rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp b/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp index f7c2e15f9b..3dfa45a82f 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12Texture.cpp @@ -170,6 +170,7 @@ writeTexelsGeneric(const char *src, char *dst, size_t widthInBlock, size_t heigh memcpy((char*)dst + offsetInDst + row * rowPitch, (char*)src + offsetInSrc + row * widthInBlock * blockSize, currentWidth * blockSize); offsetInDst += currentHeight * rowPitch; + offsetInDst = align(offsetInDst, 512); offsetInSrc += currentHeight * widthInBlock * blockSize; currentHeight = MAX2(currentHeight / 2, 1); currentWidth = MAX2(currentWidth / 2, 1);