diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-03-04 20:12:25 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-03-04 20:14:49 +0100 |
commit | 5213f702307e43520ad5f264e613acdfec597077 (patch) | |
tree | 038455c37e70b4bfeb2bc2085fe131df0cd06dac /src/video_core/texture_cache/util.cpp | |
parent | renderer_opengl: Swizzle BGR textures on copy (diff) | |
download | yuzu-5213f702307e43520ad5f264e613acdfec597077.tar yuzu-5213f702307e43520ad5f264e613acdfec597077.tar.gz yuzu-5213f702307e43520ad5f264e613acdfec597077.tar.bz2 yuzu-5213f702307e43520ad5f264e613acdfec597077.tar.lz yuzu-5213f702307e43520ad5f264e613acdfec597077.tar.xz yuzu-5213f702307e43520ad5f264e613acdfec597077.tar.zst yuzu-5213f702307e43520ad5f264e613acdfec597077.zip |
Diffstat (limited to 'src/video_core/texture_cache/util.cpp')
-rw-r--r-- | src/video_core/texture_cache/util.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index a0bc1f7b6..2c42d1449 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -1035,13 +1035,13 @@ bool IsPitchLinearSameSize(const ImageInfo& lhs, const ImageInfo& rhs, bool stri std::optional<OverlapResult> ResolveOverlap(const ImageInfo& new_info, GPUVAddr gpu_addr, VAddr cpu_addr, const ImageBase& overlap, - bool strict_size, bool broken_views) { + bool strict_size, bool broken_views, bool native_bgr) { ASSERT(new_info.type != ImageType::Linear); ASSERT(overlap.info.type != ImageType::Linear); if (!IsLayerStrideCompatible(new_info, overlap.info)) { return std::nullopt; } - if (!IsViewCompatible(overlap.info.format, new_info.format, broken_views)) { + if (!IsViewCompatible(overlap.info.format, new_info.format, broken_views, native_bgr)) { return std::nullopt; } if (gpu_addr == overlap.gpu_addr) { @@ -1085,14 +1085,14 @@ bool IsLayerStrideCompatible(const ImageInfo& lhs, const ImageInfo& rhs) { std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const ImageBase& image, GPUVAddr candidate_addr, RelaxedOptions options, - bool broken_views) { + bool broken_views, bool native_bgr) { const std::optional<SubresourceBase> base = image.TryFindBase(candidate_addr); if (!base) { return std::nullopt; } const ImageInfo& existing = image.info; if (False(options & RelaxedOptions::Format)) { - if (!IsViewCompatible(existing.format, candidate.format, broken_views)) { + if (!IsViewCompatible(existing.format, candidate.format, broken_views, native_bgr)) { return std::nullopt; } } @@ -1129,8 +1129,9 @@ std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const } bool IsSubresource(const ImageInfo& candidate, const ImageBase& image, GPUVAddr candidate_addr, - RelaxedOptions options, bool broken_views) { - return FindSubresource(candidate, image, candidate_addr, options, broken_views).has_value(); + RelaxedOptions options, bool broken_views, bool native_bgr) { + return FindSubresource(candidate, image, candidate_addr, options, broken_views, native_bgr) + .has_value(); } void DeduceBlitImages(ImageInfo& dst_info, ImageInfo& src_info, const ImageBase* dst, |