diff options
author | bunnei <bunneidev@gmail.com> | 2023-02-12 09:18:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-12 09:18:52 +0100 |
commit | f70fcdb873f768403af37622fbc195433b3605ef (patch) | |
tree | b1fbe289c78b39bde41e7a895d8e172d4f3a1927 /src/video_core/texture_cache/texture_cache.h | |
parent | Merge pull request #9781 from ColinKinloch/info_id_typo (diff) | |
parent | texture_cache: OpenGL: Implement MSAA uploads and copies (diff) | |
download | yuzu-f70fcdb873f768403af37622fbc195433b3605ef.tar yuzu-f70fcdb873f768403af37622fbc195433b3605ef.tar.gz yuzu-f70fcdb873f768403af37622fbc195433b3605ef.tar.bz2 yuzu-f70fcdb873f768403af37622fbc195433b3605ef.tar.lz yuzu-f70fcdb873f768403af37622fbc195433b3605ef.tar.xz yuzu-f70fcdb873f768403af37622fbc195433b3605ef.tar.zst yuzu-f70fcdb873f768403af37622fbc195433b3605ef.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 1b01990a4..3e2cbb0b0 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -773,7 +773,7 @@ void TextureCache<P>::RefreshContents(Image& image, ImageId image_id) { image.flags &= ~ImageFlagBits::CpuModified; TrackImage(image, image_id); - if (image.info.num_samples > 1) { + if (image.info.num_samples > 1 && !runtime.CanUploadMSAA()) { LOG_WARNING(HW_GPU, "MSAA image uploads are not implemented"); return; } @@ -1167,14 +1167,14 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA if (True(overlap.flags & ImageFlagBits::GpuModified)) { new_image.flags |= ImageFlagBits::GpuModified; } + const auto& resolution = Settings::values.resolution_info; + const SubresourceBase base = new_image.TryFindBase(overlap.gpu_addr).value(); + const u32 up_scale = can_rescale ? resolution.up_scale : 1; + const u32 down_shift = can_rescale ? resolution.down_shift : 0; + auto copies = MakeShrinkImageCopies(new_info, overlap.info, base, up_scale, down_shift); if (overlap.info.num_samples != new_image.info.num_samples) { - LOG_WARNING(HW_GPU, "Copying between images with different samples is not implemented"); + runtime.CopyImageMSAA(new_image, overlap, std::move(copies)); } else { - const auto& resolution = Settings::values.resolution_info; - const SubresourceBase base = new_image.TryFindBase(overlap.gpu_addr).value(); - const u32 up_scale = can_rescale ? resolution.up_scale : 1; - const u32 down_shift = can_rescale ? resolution.down_shift : 0; - auto copies = MakeShrinkImageCopies(new_info, overlap.info, base, up_scale, down_shift); runtime.CopyImage(new_image, overlap, std::move(copies)); } if (True(overlap.flags & ImageFlagBits::Tracked)) { |