diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-10-05 00:07:14 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-10-05 00:53:47 +0200 |
commit | ab47a660c8abfbfe3f4f4934a76202efd95acf95 (patch) | |
tree | e8c61196b9f551b313ad1ad01776c4d9353cea6f /src | |
parent | TextureCache: Add the ability to deduce if two textures are depth on blit. (diff) | |
download | yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.tar yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.tar.gz yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.tar.bz2 yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.tar.lz yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.tar.xz yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.tar.zst yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 1a2b90e0c..ca2da8f97 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -785,14 +785,14 @@ private: **/ void DeduceBestBlit(SurfaceParams& src_params, SurfaceParams& dst_params, const GPUVAddr src_gpu_addr, const GPUVAddr dst_gpu_addr) { - auto deduc_src = DeduceSurface(src_gpu_addr, src_params); - auto deduc_dst = DeduceSurface(src_gpu_addr, src_params); - if (deduc_src.Failed() || deduc_dst.Failed()) { + auto deduced_src = DeduceSurface(src_gpu_addr, src_params); + auto deduced_dst = DeduceSurface(src_gpu_addr, src_params); + if (deduced_src.Failed() || deduced_dst.Failed()) { return; } - const bool incomplete_src = deduc_src.Incomplete(); - const bool incomplete_dst = deduc_dst.Incomplete(); + const bool incomplete_src = deduced_src.Incomplete(); + const bool incomplete_dst = deduced_dst.Incomplete(); if (incomplete_src && incomplete_dst) { return; @@ -800,16 +800,18 @@ private: const bool any_incomplete = incomplete_src || incomplete_dst; - if (!any_incomplete && !(deduc_src.IsDepth() && deduc_dst.IsDepth())) { - return; - } - - if (incomplete_src && !(deduc_dst.IsDepth())) { - return; - } + if (!any_incomplete) { + if (!(deduced_src.IsDepth() && deduced_dst.IsDepth())) { + return; + } + } else { + if (incomplete_src && !(deduced_dst.IsDepth())) { + return; + } - if (incomplete_dst && !(deduc_src.IsDepth())) { - return; + if (incomplete_dst && !(deduced_src.IsDepth())) { + return; + } } const auto inherit_format = ([](SurfaceParams& to, TSurface from) { @@ -820,14 +822,14 @@ private: }); // Now we got the cases where one or both is Depth and the other is not known if (!incomplete_src) { - inherit_format(src_params, deduc_src.surface); + inherit_format(src_params, deduced_src.surface); } else { - inherit_format(src_params, deduc_dst.surface); + inherit_format(src_params, deduced_dst.surface); } if (!incomplete_dst) { - inherit_format(dst_params, deduc_dst.surface); + inherit_format(dst_params, deduced_dst.surface); } else { - inherit_format(dst_params, deduc_src.surface); + inherit_format(dst_params, deduced_src.surface); } } |