mirror of https://github.com/PCSX2/pcsx2.git
GS/Vulkan: Don't use clear attachments on cleared RT/DS
Redundant.
This commit is contained in:
parent
1677ef3189
commit
1f16adbca7
|
@ -507,8 +507,22 @@ void GSDeviceVK::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r,
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
if (dTexVK->GetState() == GSTexture::State::Cleared)
|
||||
{
|
||||
// destination is cleared, if it's the same colour and rect, we can just avoid this entirely
|
||||
if (dTexVK->IsDepthStencil())
|
||||
{
|
||||
if (dTexVK->GetClearDepth() == sTexVK->GetClearDepth())
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((dTexVK->GetClearColor() == (sTexVK->GetClearColor())).alltrue())
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// otherwise we need to do an attachment clear
|
||||
const bool depth = (dTexVK->GetType() == GSTexture::Type::DepthStencil);
|
||||
OMSetRenderTargets(depth ? nullptr : dTexVK, depth ? dTexVK : nullptr, dtex_rc, false);
|
||||
|
@ -526,7 +540,6 @@ void GSDeviceVK::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r,
|
|||
vkCmdClearAttachments(g_vulkan_context->GetCurrentCommandBuffer(), 1, &ca, 1, &cr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// commit the clear to the source first, then do normal copy
|
||||
sTexVK->CommitClear();
|
||||
|
|
Loading…
Reference in New Issue