diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index 6de02192e7..fc3f2eca23 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -1135,9 +1135,9 @@ bool GSHwHack::OI_SonicUnleashed(GSRendererHW& r, GSTexture* rt, GSTexture* ds, rt_again->m_valid.y /= 2; rt_again->m_valid.w /= 2; rt_again->m_TEX0.PSM = PSMCT32; - GSTexture* tex = g_gs_device->CreateRenderTarget( - rt_again->m_unscaled_size.x * rt_again->m_scale, rt_again->m_unscaled_size.y * rt_again->m_scale, - GSTexture::Format::Color, false); + GSTexture* tex = g_gs_device->CreateCompatible(rt_again->m_texture, + static_cast(rt_again->m_unscaled_size.x * rt_again->m_scale), + static_cast(rt_again->m_unscaled_size.y * rt_again->m_scale), false); if (!tex) return false; diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index aedca6db0f..eec6797aa2 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -4142,7 +4142,7 @@ void GSTextureCache::Target::ScaleRTAlpha() const GSVector4i valid_rect = GSVector4i(GSVector4(m_valid) * GSVector4(m_scale)); GL_PUSH("TC: ScaleRTAlpha(valid=(%dx%d %d,%d=>%d,%d))", m_valid.width(), m_valid.height(), m_valid.x, m_valid.y, m_valid.z, m_valid.w); - if (GSTexture* temp_rt = g_gs_device->CreateRenderTarget(rtsize, GSTexture::Format::Color, !GSVector4i::loadh(rtsize).eq(valid_rect))) + if (GSTexture* temp_rt = g_gs_device->CreateCompatible(m_texture, rtsize, !GSVector4i::loadh(rtsize).eq(valid_rect))) { // Only copy up the valid area, since there's no point in "correcting" nothing. const GSVector4 dRect(m_texture->GetRect().rintersect(valid_rect)); @@ -4167,7 +4167,7 @@ void GSTextureCache::Target::UnscaleRTAlpha() const GSVector4i valid_rect = GSVector4i(GSVector4(m_valid) * GSVector4(m_scale)); GL_PUSH("TC: UnscaleRTAlpha(valid=(%dx%d %d,%d=>%d,%d))", valid_rect.width(), valid_rect.height(), valid_rect.x, valid_rect.y, valid_rect.z, valid_rect.w); - if (GSTexture* temp_rt = g_gs_device->CreateRenderTarget(rtsize, GSTexture::Format::Color, !GSVector4i::loadh(rtsize).eq(valid_rect))) + if (GSTexture* temp_rt = g_gs_device->CreateCompatible(m_texture, rtsize, !GSVector4i::loadh(rtsize).eq(valid_rect))) { // Only copy up the valid area, since there's no point in "correcting" nothing. const GSVector4 dRect(m_texture->GetRect().rintersect(valid_rect)); @@ -4220,7 +4220,7 @@ void GSTextureCache::ScaleTargetForDisplay(Target* t, const GIFRegTEX0& dispfb, const int new_width = std::max(t->m_unscaled_size.x, needed_width); const int scaled_new_height = static_cast(std::ceil(static_cast(new_height) * scale)); const int scaled_new_width = static_cast(std::ceil(static_cast(new_width) * scale)); - GSTexture* new_texture = g_gs_device->CreateRenderTarget(scaled_new_width, scaled_new_height, GSTexture::Format::Color, false); + GSTexture* new_texture = g_gs_device->CreateCompatible(old_texture, scaled_new_width, scaled_new_height, false); if (!new_texture) { // Memory allocation failure, do our best to hobble along. @@ -4329,7 +4329,7 @@ bool GSTextureCache::CopyRGBFromDepthToColor(Target* dst, Target* depth_src) GSTexture* tex = dst->m_texture; if (needs_new_tex) { - tex = g_gs_device->CreateRenderTarget(new_scaled_size, GSTexture::Format::Color, + tex = g_gs_device->CreateCompatible(dst->m_texture, new_scaled_size, new_size != dst->m_unscaled_size || new_size != depth_src->m_unscaled_size); if (!tex) return false;