diff options
| author | 2019-10-04 18:07:14 -0400 | |
|---|---|---|
| committer | 2019-10-04 18:53:47 -0400 | |
| 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.gz yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.tar.xz yuzu-ab47a660c8abfbfe3f4f4934a76202efd95acf95.zip | |
Texture_Cache: Blit Deduction corrections and simplifications.
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: | |||
| 785 | **/ | 785 | **/ |
| 786 | void DeduceBestBlit(SurfaceParams& src_params, SurfaceParams& dst_params, | 786 | void DeduceBestBlit(SurfaceParams& src_params, SurfaceParams& dst_params, |
| 787 | const GPUVAddr src_gpu_addr, const GPUVAddr dst_gpu_addr) { | 787 | const GPUVAddr src_gpu_addr, const GPUVAddr dst_gpu_addr) { |
| 788 | auto deduc_src = DeduceSurface(src_gpu_addr, src_params); | 788 | auto deduced_src = DeduceSurface(src_gpu_addr, src_params); |
| 789 | auto deduc_dst = DeduceSurface(src_gpu_addr, src_params); | 789 | auto deduced_dst = DeduceSurface(src_gpu_addr, src_params); |
| 790 | if (deduc_src.Failed() || deduc_dst.Failed()) { | 790 | if (deduced_src.Failed() || deduced_dst.Failed()) { |
| 791 | return; | 791 | return; |
| 792 | } | 792 | } |
| 793 | 793 | ||
| 794 | const bool incomplete_src = deduc_src.Incomplete(); | 794 | const bool incomplete_src = deduced_src.Incomplete(); |
| 795 | const bool incomplete_dst = deduc_dst.Incomplete(); | 795 | const bool incomplete_dst = deduced_dst.Incomplete(); |
| 796 | 796 | ||
| 797 | if (incomplete_src && incomplete_dst) { | 797 | if (incomplete_src && incomplete_dst) { |
| 798 | return; | 798 | return; |
| @@ -800,16 +800,18 @@ private: | |||
| 800 | 800 | ||
| 801 | const bool any_incomplete = incomplete_src || incomplete_dst; | 801 | const bool any_incomplete = incomplete_src || incomplete_dst; |
| 802 | 802 | ||
| 803 | if (!any_incomplete && !(deduc_src.IsDepth() && deduc_dst.IsDepth())) { | 803 | if (!any_incomplete) { |
| 804 | return; | 804 | if (!(deduced_src.IsDepth() && deduced_dst.IsDepth())) { |
| 805 | } | 805 | return; |
| 806 | 806 | } | |
| 807 | if (incomplete_src && !(deduc_dst.IsDepth())) { | 807 | } else { |
| 808 | return; | 808 | if (incomplete_src && !(deduced_dst.IsDepth())) { |
| 809 | } | 809 | return; |
| 810 | } | ||
| 810 | 811 | ||
| 811 | if (incomplete_dst && !(deduc_src.IsDepth())) { | 812 | if (incomplete_dst && !(deduced_src.IsDepth())) { |
| 812 | return; | 813 | return; |
| 814 | } | ||
| 813 | } | 815 | } |
| 814 | 816 | ||
| 815 | const auto inherit_format = ([](SurfaceParams& to, TSurface from) { | 817 | const auto inherit_format = ([](SurfaceParams& to, TSurface from) { |
| @@ -820,14 +822,14 @@ private: | |||
| 820 | }); | 822 | }); |
| 821 | // Now we got the cases where one or both is Depth and the other is not known | 823 | // Now we got the cases where one or both is Depth and the other is not known |
| 822 | if (!incomplete_src) { | 824 | if (!incomplete_src) { |
| 823 | inherit_format(src_params, deduc_src.surface); | 825 | inherit_format(src_params, deduced_src.surface); |
| 824 | } else { | 826 | } else { |
| 825 | inherit_format(src_params, deduc_dst.surface); | 827 | inherit_format(src_params, deduced_dst.surface); |
| 826 | } | 828 | } |
| 827 | if (!incomplete_dst) { | 829 | if (!incomplete_dst) { |
| 828 | inherit_format(dst_params, deduc_dst.surface); | 830 | inherit_format(dst_params, deduced_dst.surface); |
| 829 | } else { | 831 | } else { |
| 830 | inherit_format(dst_params, deduc_src.surface); | 832 | inherit_format(dst_params, deduced_src.surface); |
| 831 | } | 833 | } |
| 832 | } | 834 | } |
| 833 | 835 | ||