GS/HW: Reuse texture for RT copy in DX12/GL/Vulkan

Fixes VRAM usage blowing out with high blending.
This commit is contained in:
Connor McLaughlin 2022-12-22 20:39:07 +10:00 committed by lightningterror
parent 269d3d22b5
commit b1b3f0dbac
3 changed files with 3 additions and 3 deletions

View File

@ -2626,7 +2626,7 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
else if (config.require_one_barrier)
{
// requires a copy of the RT
draw_rt_clone = static_cast<GSTexture12*>(CreateTexture(rtsize.x, rtsize.y, 1, GSTexture::Format::Color, false));
draw_rt_clone = static_cast<GSTexture12*>(CreateTexture(rtsize.x, rtsize.y, 1, GSTexture::Format::Color, true));
if (draw_rt_clone)
{
EndRenderPass();

View File

@ -1868,7 +1868,7 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
else if (config.require_one_barrier && !m_features.texture_barrier)
{
// Requires a copy of the RT
draw_rt_clone = CreateTexture(rtsize.x, rtsize.y, 1, GSTexture::Format::Color, false);
draw_rt_clone = CreateTexture(rtsize.x, rtsize.y, 1, GSTexture::Format::Color, true);
GL_PUSH("Copy RT to temp texture for fbmask {%d,%d %dx%d}",
config.drawarea.left, config.drawarea.top,
config.drawarea.width(), config.drawarea.height());

View File

@ -3114,7 +3114,7 @@ void GSDeviceVK::RenderHW(GSHWDrawConfig& config)
else if (config.require_one_barrier && !m_features.texture_barrier)
{
// requires a copy of the RT
draw_rt_clone = static_cast<GSTextureVK*>(CreateTexture(rtsize.x, rtsize.y, 1, GSTexture::Format::Color, false));
draw_rt_clone = static_cast<GSTextureVK*>(CreateTexture(rtsize.x, rtsize.y, 1, GSTexture::Format::Color, true));
if (draw_rt_clone)
{
EndRenderPass();