diff options
| author | 2019-05-22 12:30:53 -0400 | |
|---|---|---|
| committer | 2019-06-20 21:38:33 -0300 | |
| commit | 0966665fc225eee29b3ed87baefd74f79c19d307 (patch) | |
| tree | f4f4f53d55e39ce0b37ad721e26f0f0609e37293 /src/video_core | |
| parent | Fix rebase errors (diff) | |
| download | yuzu-0966665fc225eee29b3ed87baefd74f79c19d307.tar.gz yuzu-0966665fc225eee29b3ed87baefd74f79c19d307.tar.xz yuzu-0966665fc225eee29b3ed87baefd74f79c19d307.zip | |
texture_cache: Only load on recycle with accurate GPU.
Testing so far has proven this to be quite safe as texture memory read
added a 2-5ms load to the current cache.
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index ab4e094ea..685bd28f4 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -342,12 +342,13 @@ private: | |||
| 342 | const SurfaceParams& params, const GPUVAddr gpu_addr, | 342 | const SurfaceParams& params, const GPUVAddr gpu_addr, |
| 343 | const bool preserve_contents, | 343 | const bool preserve_contents, |
| 344 | const bool untopological) { | 344 | const bool untopological) { |
| 345 | const bool do_load = Settings::values.use_accurate_gpu_emulation && preserve_contents; | ||
| 345 | for (auto surface : overlaps) { | 346 | for (auto surface : overlaps) { |
| 346 | Unregister(surface); | 347 | Unregister(surface); |
| 347 | } | 348 | } |
| 348 | switch (PickStrategy(overlaps, params, gpu_addr, untopological)) { | 349 | switch (PickStrategy(overlaps, params, gpu_addr, untopological)) { |
| 349 | case RecycleStrategy::Ignore: { | 350 | case RecycleStrategy::Ignore: { |
| 350 | return InitializeSurface(gpu_addr, params, preserve_contents); | 351 | return InitializeSurface(gpu_addr, params, do_load); |
| 351 | } | 352 | } |
| 352 | case RecycleStrategy::Flush: { | 353 | case RecycleStrategy::Flush: { |
| 353 | std::sort(overlaps.begin(), overlaps.end(), | 354 | std::sort(overlaps.begin(), overlaps.end(), |
| @@ -361,7 +362,7 @@ private: | |||
| 361 | } | 362 | } |
| 362 | default: { | 363 | default: { |
| 363 | UNIMPLEMENTED_MSG("Unimplemented Texture Cache Recycling Strategy!"); | 364 | UNIMPLEMENTED_MSG("Unimplemented Texture Cache Recycling Strategy!"); |
| 364 | return InitializeSurface(gpu_addr, params, preserve_contents); | 365 | return InitializeSurface(gpu_addr, params, do_load); |
| 365 | } | 366 | } |
| 366 | } | 367 | } |
| 367 | } | 368 | } |