From cb08e5bdd25a448cb44c9fd8f46ef89cfd28e7bc Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 1 Jun 2021 20:05:55 -0300 Subject: texture_cache: Always prepare image views on render targets Images used as render targets were not being "prepared", causing desynchronizations on the texture cache. Needs #6669 to avoid performance regressions on certain cooking titles. - Fixes black shadows on Age of Calamity. --- src/video_core/texture_cache/texture_cache.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 01de2d498..85ce06d56 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -599,6 +599,12 @@ void TextureCache

::UpdateRenderTargets(bool is_clear) { using namespace VideoCommon::Dirty; auto& flags = maxwell3d.dirty.flags; if (!flags[Dirty::RenderTargets]) { + for (size_t index = 0; index < NUM_RT; ++index) { + ImageViewId& color_buffer_id = render_targets.color_buffer_ids[index]; + PrepareImageView(color_buffer_id, true, is_clear && IsFullClear(color_buffer_id)); + } + const ImageViewId depth_buffer_id = render_targets.depth_buffer_id; + PrepareImageView(depth_buffer_id, true, is_clear && IsFullClear(depth_buffer_id)); return; } flags[Dirty::RenderTargets] = false; -- cgit v1.2.3