1
0
Fork 0
forked from suyu/suyu

Merge pull request #2982 from lioncash/surface

texture_cache: Avoid unnecessary surface copies within PickStrategy() and TryReconstructSurface()
This commit is contained in:
Rodrigo Locatti 2019-10-16 19:43:32 -03:00 committed by GitHub
commit e00b529a89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -402,7 +402,7 @@ private:
if (params.block_depth > 1 || params.target == SurfaceTarget::Texture3D) {
return RecycleStrategy::Flush;
}
for (auto s : overlaps) {
for (const auto& s : overlaps) {
const auto& s_params = s->GetSurfaceParams();
if (s_params.block_depth > 1 || s_params.target == SurfaceTarget::Texture3D) {
return RecycleStrategy::Flush;
@ -575,7 +575,7 @@ private:
} else if (Settings::values.use_accurate_gpu_emulation && passed_tests != overlaps.size()) {
return {};
}
for (auto surface : overlaps) {
for (const auto& surface : overlaps) {
Unregister(surface);
}
new_surface->MarkAsModified(modified, Tick());