mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-04-03 03:17:54 -06:00
rsx: Add optimization to skip cloning surfaces whose dimensions did not change
- If only the threshold changed or the surface is below threshold anyway, nothing will change - In those cases, just update the internal data and continue
This commit is contained in:
parent
e2dff6bbf8
commit
fe3cbde1d3
@ -1485,6 +1485,21 @@ namespace rsx
|
||||
continue;
|
||||
}
|
||||
|
||||
// Perform a test scaling and check if anything is different after scaling
|
||||
// There are many cases where this will avoid creating new surfaces
|
||||
const auto [new_w, new_h] = rsx::apply_inverse_resolution_scale<true>(
|
||||
active_config,
|
||||
surface->template get_surface_width<>(),
|
||||
surface->template get_surface_height<>());
|
||||
|
||||
if (new_w == surface->width() && new_h == surface->height())
|
||||
{
|
||||
// Not affected by resolution scale. Just update the details and move on.
|
||||
surface->resolution_scaling_config = active_config;
|
||||
++It;
|
||||
continue;
|
||||
}
|
||||
|
||||
surfaces_to_clone.push_back(surface);
|
||||
|
||||
// Invalidate the previous surface
|
||||
|
||||
Loading…
Reference in New Issue
Block a user