rsx: Properly account for memory sizes of reused surfaces
This commit is contained in:
@@ -113,14 +113,15 @@ namespace rsx
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool is_new_surface = !sink;
|
if (sink)
|
||||||
Traits::clone_surface(cmd, sink, region.source, new_address, region);
|
|
||||||
|
|
||||||
if (is_new_surface)
|
|
||||||
{
|
{
|
||||||
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]]
|
if (invalidated) [[unlikely]]
|
||||||
{
|
{
|
||||||
// Halfplement the merge by crude inheritance. Should recursively split the memory blocks instead.
|
// 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);
|
new_surface = Traits::get(new_surface_storage);
|
||||||
allocate_rsx_memory(new_surface);
|
|
||||||
Traits::invalidate_surface_contents(command_list, new_surface, address, pitch);
|
Traits::invalidate_surface_contents(command_list, new_surface, address, pitch);
|
||||||
Traits::prepare_surface_for_drawing(command_list, new_surface);
|
Traits::prepare_surface_for_drawing(command_list, new_surface);
|
||||||
|
allocate_rsx_memory(new_surface);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user