mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-15 23:35:38 +00:00
Zero out memory region of recreated surface before flushing
This commit is contained in:
parent
bbf3b2da0c
commit
dc85e3bff1
|
@ -1325,6 +1325,8 @@ void RasterizerCacheOpenGL::AccurateCopySurface(const Surface& src_surface,
|
||||||
const Surface& dst_surface) {
|
const Surface& dst_surface) {
|
||||||
const auto& src_params{src_surface->GetSurfaceParams()};
|
const auto& src_params{src_surface->GetSurfaceParams()};
|
||||||
const auto& dst_params{dst_surface->GetSurfaceParams()};
|
const auto& dst_params{dst_surface->GetSurfaceParams()};
|
||||||
|
auto* start = Memory::GetPointer(src_params.addr);
|
||||||
|
std::fill(start, start + dst_params.MemorySize(), 0);
|
||||||
FlushRegion(src_params.addr, dst_params.MemorySize());
|
FlushRegion(src_params.addr, dst_params.MemorySize());
|
||||||
LoadSurface(dst_surface);
|
LoadSurface(dst_surface);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue