mirror of
https://github.com/stenzek/duckstation.git
synced 2024-11-23 05:49:43 +00:00
GPU/HW: Write through VRAM transfers
Some checks failed
Create rolling release / Windows x64 Build (push) Has been cancelled
Create rolling release / Windows x64 SSE2 Build (push) Has been cancelled
Create rolling release / Windows ARM64 Build (push) Has been cancelled
Create rolling release / Linux x64 AppImage (push) Has been cancelled
Create rolling release / Linux x64 SSE2 AppImage (push) Has been cancelled
Create rolling release / Linux Flatpak Build (push) Has been cancelled
Create rolling release / MacOS Universal Build (push) Has been cancelled
Create rolling release / Create Release (push) Has been cancelled
Some checks failed
Create rolling release / Windows x64 Build (push) Has been cancelled
Create rolling release / Windows x64 SSE2 Build (push) Has been cancelled
Create rolling release / Windows ARM64 Build (push) Has been cancelled
Create rolling release / Linux x64 AppImage (push) Has been cancelled
Create rolling release / Linux x64 SSE2 AppImage (push) Has been cancelled
Create rolling release / Linux Flatpak Build (push) Has been cancelled
Create rolling release / MacOS Universal Build (push) Has been cancelled
Create rolling release / Create Release (push) Has been cancelled
Reduces the chances of rendering nothing after device loss.
This commit is contained in:
parent
afd36560c1
commit
219e890da5
@ -3296,12 +3296,7 @@ void GPU_HW::UpdateVRAM(u32 x, u32 y, u32 width, u32 height, const void* data, b
|
||||
DebugAssert(bounds.right <= static_cast<s32>(VRAM_WIDTH) && bounds.bottom <= static_cast<s32>(VRAM_HEIGHT));
|
||||
AddWrittenRectangle(bounds);
|
||||
|
||||
// We want to dump *before* the write goes through, otherwise we dump bad data.
|
||||
if (m_use_texture_cache)
|
||||
{
|
||||
GPUTextureCache::WriteVRAM(x, y, width, height, data, set_mask, check_mask, bounds);
|
||||
}
|
||||
else if (m_sw_renderer)
|
||||
if (m_sw_renderer)
|
||||
{
|
||||
const u32 num_words = width * height;
|
||||
GPUBackendUpdateVRAMCommand* cmd = m_sw_renderer->NewUpdateVRAMCommand(num_words);
|
||||
@ -3315,6 +3310,10 @@ void GPU_HW::UpdateVRAM(u32 x, u32 y, u32 width, u32 height, const void* data, b
|
||||
std::memcpy(cmd->data, data, sizeof(u16) * num_words);
|
||||
m_sw_renderer->PushCommand(cmd);
|
||||
}
|
||||
else
|
||||
{
|
||||
GPUTextureCache::WriteVRAM(x, y, width, height, data, set_mask, check_mask, bounds);
|
||||
}
|
||||
|
||||
if (check_mask)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user