forked from ShuriZma/suyu
1
0
Fork 0

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  to avoid
performance regressions on certain cooking titles.

- Fixes black shadows on Age of Calamity.
This commit is contained in:
ReinUsesLisp 2021-06-01 20:05:55 -03:00
parent 8b53209362
commit cb08e5bdd2
1 changed files with 6 additions and 0 deletions
src/video_core/texture_cache

View File

@ -599,6 +599,12 @@ void TextureCache<P>::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;