GS: Abort copy hazard if source and destination texture is the same.

This commit is contained in:
lightningterror
2025-12-17 15:02:13 +01:00
parent cb026a6946
commit a61dfe5509
5 changed files with 40 additions and 5 deletions

View File

@@ -1233,7 +1233,14 @@ void GSDevice11::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r,
// Empty rect, abort copy.
if (r.rempty())
{
GL_INS("D3D11: CopyRect rect empty.");
GL_INS("D3D11: CopyRect() rect empty, aborting copy.");
return;
}
// sTex and dTex are the same, abort copy.
if (sTex == dTex)
{
GL_INS("D3D11: CopyRect() sTex == dTex, aborting copy.");
return;
}

View File

@@ -1341,7 +1341,14 @@ void GSDevice12::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r,
// Empty rect, abort copy.
if (r.rempty())
{
GL_INS("D3D12: CopyRect rect empty.");
GL_INS("D3D12: CopyRect() rect empty, aborting copy.");
return;
}
// sTex and dTex are the same, abort copy.
if (sTex == dTex)
{
GL_INS("D3D12: CopyRect() sTex == dTex, aborting copy.");
return;
}

View File

@@ -1475,7 +1475,14 @@ void GSDeviceMTL::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r
// Empty rect, abort copy.
if (r.rempty())
{
GL_INS("Metal: CopyRect rect empty.");
GL_INS("Metal: CopyRect() rect empty, aborting copy.");
return;
}
// sTex and dTex are the same, abort copy.
if (sTex == dTex)
{
GL_INS("Metal: CopyRect() sTex == dTex, aborting copy.");
return;
}

View File

@@ -1434,7 +1434,14 @@ void GSDeviceOGL::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r
// Empty rect, abort copy.
if (r.rempty())
{
GL_INS("GL: CopyRect rect empty.");
GL_INS("GL: CopyRect() rect empty, aborting copy.");
return;
}
// sTex and dTex are the same, abort copy.
if (sTex == dTex)
{
GL_INS("GL: CopyRect() sTex == dTex, aborting copy.");
return;
}

View File

@@ -2771,7 +2771,14 @@ void GSDeviceVK::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r,
// Empty rect, abort copy.
if (r.rempty())
{
GL_INS("VK: CopyRect rect empty.");
GL_INS("VK: CopyRect() rect empty, aborting copy.");
return;
}
// sTex and dTex are the same, abort copy.
if (sTex == dTex)
{
GL_INS("VK: CopyRect() sTex == dTex, aborting copy.");
return;
}