diff --git a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp index 3a76bdc5f1..beea55e8b9 100644 --- a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp @@ -1229,6 +1229,10 @@ std::unique_ptr GSDevice11::CreateDownloadTexture(u32 width, void GSDevice11::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r, u32 destX, u32 destY) { + // Empty rect, abort copy. + if (r.rempty()) + return; + const GSVector4i dst_rect(0, 0, dTex->GetWidth(), dTex->GetHeight()); const bool full_draw_copy = sTex->IsDepthStencil() || dst_rect.eq(r); diff --git a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp index 280194a7dd..5232f04908 100644 --- a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp @@ -1337,6 +1337,10 @@ std::unique_ptr GSDevice12::CreateDownloadTexture(u32 width, void GSDevice12::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r, u32 destX, u32 destY) { + // Empty rect, abort copy. + if (r.rempty()) + return; + GSTexture12* const sTex12 = static_cast(sTex); GSTexture12* const dTex12 = static_cast(dTex); const GSVector4i dst_rect(0, 0, dTex12->GetWidth(), dTex12->GetHeight()); diff --git a/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm b/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm index c1c63f1d43..ddde7f2628 100644 --- a/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm +++ b/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm @@ -1471,6 +1471,10 @@ void GSDeviceMTL::ClearSamplerCache() void GSDeviceMTL::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r, u32 destX, u32 destY) { @autoreleasepool { + // Empty rect, abort copy. + if (r.rempty()) + return; + GSTextureMTL* sT = static_cast(sTex); GSTextureMTL* dT = static_cast(dTex); const GSVector4i dst_rect(0, 0, dT->GetWidth(), dT->GetHeight()); diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index bac7399a19..d114ccbfc6 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -1428,6 +1428,10 @@ void GSDeviceOGL::BlitRect(GSTexture* sTex, const GSVector4i& r, const GSVector2 // Copy a sub part of a texture into another void GSDeviceOGL::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r, u32 destX, u32 destY) { + // Empty rect, abort copy. + if (r.rempty()) + return; + const GLuint& sid = static_cast(sTex)->GetID(); const GLuint& did = static_cast(dTex)->GetID(); const GSVector4i dst_rect(0, 0, dTex->GetWidth(), dTex->GetHeight()); diff --git a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp index 6ac04906c9..53d8be7df8 100644 --- a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp +++ b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp @@ -2746,6 +2746,10 @@ std::unique_ptr GSDeviceVK::CreateDownloadTexture(u32 width, void GSDeviceVK::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r, u32 destX, u32 destY) { + // Empty rect, abort copy. + if (r.rempty()) + return; + GSTextureVK* const sTexVK = static_cast(sTex); GSTextureVK* const dTexVK = static_cast(dTex); const GSVector4i dst_rect(0, 0, dTexVK->GetWidth(), dTexVK->GetHeight());