mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-16 03:00:36 +01:00
GS/HW: Abort copy if rect is empty.
This commit is contained in:
1 parent
c13e23ab68
commit
2ef2adf517
5 files changed
+20
No files matched your search
@@ -1229,6 +1229,10 @@ std::unique_ptr<GSDownloadTexture> 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);
|
||||
|
||||
|
||||
@@ -1337,6 +1337,10 @@ std::unique_ptr<GSDownloadTexture> 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<GSTexture12*>(sTex);
|
||||
GSTexture12* const dTex12 = static_cast<GSTexture12*>(dTex);
|
||||
const GSVector4i dst_rect(0, 0, dTex12->GetWidth(), dTex12->GetHeight());
|
||||
|
||||
@@ -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<GSTextureMTL*>(sTex);
|
||||
GSTextureMTL* dT = static_cast<GSTextureMTL*>(dTex);
|
||||
const GSVector4i dst_rect(0, 0, dT->GetWidth(), dT->GetHeight());
|
||||
|
||||
@@ -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<GSTextureOGL*>(sTex)->GetID();
|
||||
const GLuint& did = static_cast<GSTextureOGL*>(dTex)->GetID();
|
||||
const GSVector4i dst_rect(0, 0, dTex->GetWidth(), dTex->GetHeight());
|
||||
|
||||
@@ -2746,6 +2746,10 @@ std::unique_ptr<GSDownloadTexture> 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<GSTextureVK*>(sTex);
|
||||
GSTextureVK* const dTexVK = static_cast<GSTextureVK*>(dTex);
|
||||
const GSVector4i dst_rect(0, 0, dTexVK->GetWidth(), dTexVK->GetHeight());
|
||||
|
||||
Reference in new issue
Block a user