summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-14 23:21:00 -0400
committerGitHub <noreply@github.com>2020-04-14 23:21:00 -0400
commitdaddbeffd1f10f3ae456ffcf04bc7bb33251f9db (patch)
treea6af3853723b7a753067a614c5ac6c2d1e1a82dc
parente366b4ee1f3c29858614689396d302c96aee14f1 (diff)
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.
-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:
}
const auto& final_params = new_surface->GetSurfaceParams();
if (cr_params.type != final_params.type) {
- BufferCopy(current_surface, new_surface);
+ if (Settings::values.use_accurate_gpu_emulation) {
+ BufferCopy(current_surface, new_surface);
+ }
} else {
std::vector<CopyParams> bricks = current_surface->BreakDown(final_params);
for (auto& brick : bricks) {