mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-31 20:41:45 +01:00
rsx: Properly account for memory sizes of reused surfaces
This commit is contained in:
parent
b353bf6c56
commit
26b2e4253d
@ -113,14 +113,15 @@ namespace rsx
|
||||
}
|
||||
}
|
||||
|
||||
const bool is_new_surface = !sink;
|
||||
Traits::clone_surface(cmd, sink, region.source, new_address, region);
|
||||
|
||||
if (is_new_surface)
|
||||
if (sink)
|
||||
{
|
||||
allocate_rsx_memory(Traits::get(sink));
|
||||
// Memory requirements can be altered when cloning
|
||||
free_rsx_memory(Traits::get(sink));
|
||||
}
|
||||
|
||||
Traits::clone_surface(cmd, sink, region.source, new_address, region);
|
||||
allocate_rsx_memory(Traits::get(sink));
|
||||
|
||||
if (invalidated) [[unlikely]]
|
||||
{
|
||||
// Halfplement the merge by crude inheritance. Should recursively split the memory blocks instead.
|
||||
@ -509,9 +510,9 @@ namespace rsx
|
||||
}
|
||||
|
||||
new_surface = Traits::get(new_surface_storage);
|
||||
allocate_rsx_memory(new_surface);
|
||||
Traits::invalidate_surface_contents(command_list, new_surface, address, pitch);
|
||||
Traits::prepare_surface_for_drawing(command_list, new_surface);
|
||||
allocate_rsx_memory(new_surface);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user