GPU: Move background dumping to HW+GPU thread
And only dump when the mask bit check is not enabled. The replacements are gated by the mask bit check anyway, so there's no point dumping anything that can't be replaced.
This commit is contained in:
parent
6f3e9913f5
commit
b03127b206
|
@ -5,7 +5,6 @@
|
||||||
#include "gpu.h"
|
#include "gpu.h"
|
||||||
#include "gpu_backend.h"
|
#include "gpu_backend.h"
|
||||||
#include "gpu_dump.h"
|
#include "gpu_dump.h"
|
||||||
#include "gpu_hw_texture_cache.h"
|
|
||||||
#include "gpu_thread_commands.h"
|
#include "gpu_thread_commands.h"
|
||||||
#include "interrupt_controller.h"
|
#include "interrupt_controller.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
@ -1048,12 +1047,6 @@ void GPU::FinishVRAMWrite()
|
||||||
m_vram_transfer.height, sizeof(u16) * m_vram_transfer.width, m_blit_buffer.data(), true);
|
m_vram_transfer.height, sizeof(u16) * m_vram_transfer.width, m_blit_buffer.data(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GPUTextureCache::ShouldDumpVRAMWrite(m_vram_transfer.width, m_vram_transfer.height))
|
|
||||||
{
|
|
||||||
GPUTextureCache::DumpVRAMWrite(m_vram_transfer.width, m_vram_transfer.height,
|
|
||||||
reinterpret_cast<const u16*>(m_blit_buffer.data()));
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateVRAM(m_vram_transfer.x, m_vram_transfer.y, m_vram_transfer.width, m_vram_transfer.height,
|
UpdateVRAM(m_vram_transfer.x, m_vram_transfer.y, m_vram_transfer.width, m_vram_transfer.height,
|
||||||
m_blit_buffer.data(), m_GPUSTAT.set_mask_while_drawing, m_GPUSTAT.check_mask_before_draw);
|
m_blit_buffer.data(), m_GPUSTAT.set_mask_while_drawing, m_GPUSTAT.check_mask_before_draw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3243,6 +3243,10 @@ void GPU_HW::UpdateVRAM(u32 x, u32 y, u32 width, u32 height, const void* data, b
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// no point dumping things we can't replace, so put it after the mask check
|
||||||
|
if (GPUTextureCache::ShouldDumpVRAMWrite(width, height))
|
||||||
|
GPUTextureCache::DumpVRAMWrite(width, height, data);
|
||||||
|
|
||||||
GPUTexture* rtex = GPUTextureCache::GetVRAMReplacement(width, height, data);
|
GPUTexture* rtex = GPUTextureCache::GetVRAMReplacement(width, height, data);
|
||||||
if (rtex && BlitVRAMReplacementTexture(rtex, x * m_resolution_scale, y * m_resolution_scale,
|
if (rtex && BlitVRAMReplacementTexture(rtex, x * m_resolution_scale, y * m_resolution_scale,
|
||||||
width * m_resolution_scale, height * m_resolution_scale))
|
width * m_resolution_scale, height * m_resolution_scale))
|
||||||
|
|
Loading…
Reference in New Issue