mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-24 00:42:48 +00:00
Merge pull request #2982 from lioncash/surface
texture_cache: Avoid unnecessary surface copies within PickStrategy() and TryReconstructSurface()
This commit is contained in:
commit
e00b529a89
|
@ -402,7 +402,7 @@ private:
|
||||||
if (params.block_depth > 1 || params.target == SurfaceTarget::Texture3D) {
|
if (params.block_depth > 1 || params.target == SurfaceTarget::Texture3D) {
|
||||||
return RecycleStrategy::Flush;
|
return RecycleStrategy::Flush;
|
||||||
}
|
}
|
||||||
for (auto s : overlaps) {
|
for (const auto& s : overlaps) {
|
||||||
const auto& s_params = s->GetSurfaceParams();
|
const auto& s_params = s->GetSurfaceParams();
|
||||||
if (s_params.block_depth > 1 || s_params.target == SurfaceTarget::Texture3D) {
|
if (s_params.block_depth > 1 || s_params.target == SurfaceTarget::Texture3D) {
|
||||||
return RecycleStrategy::Flush;
|
return RecycleStrategy::Flush;
|
||||||
|
@ -575,7 +575,7 @@ private:
|
||||||
} else if (Settings::values.use_accurate_gpu_emulation && passed_tests != overlaps.size()) {
|
} else if (Settings::values.use_accurate_gpu_emulation && passed_tests != overlaps.size()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
for (auto surface : overlaps) {
|
for (const auto& surface : overlaps) {
|
||||||
Unregister(surface);
|
Unregister(surface);
|
||||||
}
|
}
|
||||||
new_surface->MarkAsModified(modified, Tick());
|
new_surface->MarkAsModified(modified, Tick());
|
||||||
|
|
Loading…
Reference in a new issue