summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-04-14 23:21:00 -0400
committerGravatar GitHub2020-04-14 23:21:00 -0400
commitdaddbeffd1f10f3ae456ffcf04bc7bb33251f9db (patch)
treea6af3853723b7a753067a614c5ac6c2d1e1a82dc /src
parentMerge pull request #3660 from bunnei/friend-blocked-users (diff)
downloadyuzu-daddbeffd1f10f3ae456ffcf04bc7bb33251f9db.tar.gz
yuzu-daddbeffd1f10f3ae456ffcf04bc7bb33251f9db.tar.xz
yuzu-daddbeffd1f10f3ae456ffcf04bc7bb33251f9db.zip
Texture Cache: Only do buffer copies on accurate GPU. (#3634)
This is a simple optimization as Buffer Copies are mostly used for texture recycling. They are, however, useful when games abuse undefined behavior but most 3D APIs forbid it.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/texture_cache/texture_cache.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index cfc7fe6e9..4edd4313b 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -509,7 +509,9 @@ private:
509 } 509 }
510 const auto& final_params = new_surface->GetSurfaceParams(); 510 const auto& final_params = new_surface->GetSurfaceParams();
511 if (cr_params.type != final_params.type) { 511 if (cr_params.type != final_params.type) {
512 BufferCopy(current_surface, new_surface); 512 if (Settings::values.use_accurate_gpu_emulation) {
513 BufferCopy(current_surface, new_surface);
514 }
513 } else { 515 } else {
514 std::vector<CopyParams> bricks = current_surface->BreakDown(final_params); 516 std::vector<CopyParams> bricks = current_surface->BreakDown(final_params);
515 for (auto& brick : bricks) { 517 for (auto& brick : bricks) {