mirror of https://github.com/PCSX2/pcsx2.git
GS/HW: Resize target in Ico move fix
This commit is contained in:
parent
f887eae0f7
commit
a997845604
|
@ -1327,7 +1327,6 @@ static bool GetMoveTargetPair(GSRendererHW& r, GSTextureCache::Target** src, GIF
|
|||
return true;
|
||||
}
|
||||
|
||||
// Disabled to avoid compiler warnings, enable when it is needed.
|
||||
static bool GetMoveTargetPair(GSRendererHW& r, GSTextureCache::Target** src, GSTextureCache::Target** dst,
|
||||
bool req_target = false, bool preserve_target = false)
|
||||
{
|
||||
|
@ -1404,12 +1403,18 @@ bool GSHwHack::MV_Ico(GSRendererHW& r)
|
|||
if (!palette)
|
||||
return false;
|
||||
|
||||
const GSVector4i draw_rc = GSVector4i(0, 0, RWIDTH, RHEIGHT);
|
||||
if (dst->GetUnscaledWidth() < static_cast<int>(RWIDTH) || dst->GetUnscaledHeight() < static_cast<int>(RHEIGHT))
|
||||
{
|
||||
if (!dst->ResizeTexture(dst->GetUnscaledWidth(), static_cast<int>(RWIDTH), std::max(dst->GetUnscaledHeight(), static_cast<int>(RHEIGHT))))
|
||||
return false;
|
||||
}
|
||||
|
||||
const GSVector4i draw_rc = GSVector4i(0, 0, RWIDTH, RHEIGHT).rintersect(dst->GetUnscaledRect());
|
||||
dst->UpdateValidChannels(PSMCT32, 0);
|
||||
dst->UpdateValidity(draw_rc);
|
||||
|
||||
GSHWDrawConfig& config = GSRendererHW::GetInstance()->BeginHLEHardwareDraw(dst->GetTexture(), nullptr,
|
||||
dst->GetScale(), src->GetTexture(), src->GetScale(), draw_rc);
|
||||
GSHWDrawConfig& config = GSRendererHW::GetInstance()->BeginHLEHardwareDraw(
|
||||
dst->GetTexture(), nullptr, dst->GetScale(), src->GetTexture(), src->GetScale(), draw_rc);
|
||||
config.pal = palette->GetPaletteGSTexture();
|
||||
config.ps.channel = ChannelFetch_BLUE;
|
||||
config.ps.depth_fmt = 1;
|
||||
|
|
Loading…
Reference in New Issue