GS: Fix crash if FXAA/Shadeboost enabled with Bilinear Sharp

This commit is contained in:
refractionpcsx2 2022-12-13 00:20:50 +00:00
parent 8254ff078e
commit a7687947e6
1 changed files with 4 additions and 3 deletions

View File

@ -422,6 +422,7 @@ void GSDevice::ShadeBoost()
void GSDevice::Resize(int width, int height)
{
GSTexture*& dTex = (m_current == m_target_tmp) ? m_merge : m_target_tmp;
GSVector2i s = m_current->GetSize();
int multiplier = 1;
@ -430,12 +431,12 @@ void GSDevice::Resize(int width, int height)
s = m_current->GetSize() * GSVector2i(++multiplier);
}
if (ResizeTexture(&m_target_tmp, GSTexture::Type::RenderTarget, s.x, s.y, false))
if (ResizeTexture(&dTex, GSTexture::Type::RenderTarget, s.x, s.y, false))
{
const GSVector4 sRect(0, 0, 1, 1);
const GSVector4 dRect(0, 0, s.x, s.y);
StretchRect(m_current, sRect, m_target_tmp, dRect, ShaderConvert::COPY, false);
m_current = m_target_tmp;
StretchRect(m_current, sRect, dTex, dRect, ShaderConvert::COPY, false);
m_current = dTex;
}
}