mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-11-16 11:03:59 +01:00
video_core: Update surface recycling criteria
Recycled surfaces may only be upscaled, not downscaled. Recycled surfaces should be less than or equal to the requested resolution-scale to ensure we are only upscaling surfaces.
This commit is contained in:
1 parent
ab89916d1a
commit
604ade099d
1 file changed
+3
@@ -1370,6 +1370,9 @@ SurfaceId RasterizerCache<T>::CreateSurface(const SurfaceParams& params,
|
||||
// Try to find a matching texture in the deletion queue
|
||||
const auto it = std::find_if(sentenced.begin(), sentenced.end(), [&](const auto& pair) {
|
||||
return (slot_surfaces[pair.first] == params) &&
|
||||
// Only recycle the texture if its resolution scale is equal or less than the
|
||||
// incoming texture
|
||||
(slot_surfaces[pair.first].res_scale <= params.res_scale) &&
|
||||
// Only recycle the texture if the texture runtime is completely done with it
|
||||
(resource_free_tick > pair.second);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user