GPU/HW: Use texture instead of RTs for rewind/runahead w/o MSAA

This commit is contained in:
Stenzek 2024-08-10 01:24:37 +10:00
parent 76f6eafdbc
commit 98b1a703f3
No known key found for this signature in database

View file

@ -340,11 +340,13 @@ bool GPU_HW::DoState(StateWrapper& sw, GPUTexture** host_texture, bool update_di
{ {
delete tex; delete tex;
tex = // We copy to/from the save state texture, but we can't have multisampled non-RTs.
g_gpu_device tex = g_gpu_device
->FetchTexture(m_vram_texture->GetWidth(), m_vram_texture->GetHeight(), 1, 1, m_vram_texture->GetSamples(), ->FetchTexture(
GPUTexture::Type::RenderTarget, GPUTexture::Format::RGBA8, nullptr, 0) m_vram_texture->GetWidth(), m_vram_texture->GetHeight(), 1, 1, m_vram_texture->GetSamples(),
.release(); m_vram_texture->IsMultisampled() ? GPUTexture::Type::RenderTarget : GPUTexture::Type::Texture,
GPUTexture::Format::RGBA8, nullptr, 0)
.release();
*host_texture = tex; *host_texture = tex;
if (!tex) if (!tex)
return false; return false;