mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-12-22 10:57:11 +00:00
GS: Abort copy hazard if source and destination texture is the same.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user