diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-27 23:49:56 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-28 10:53:27 +0100 |
commit | 5a3463bc2b1489dda6b5fe90110f9260f6b68463 (patch) | |
tree | f09fdbee27030910100b631f7182fc7ffa938c1e /src/video_core | |
parent | Texture Cache: Redesigning the blitting system (again). (diff) | |
download | yuzu-5a3463bc2b1489dda6b5fe90110f9260f6b68463.tar yuzu-5a3463bc2b1489dda6b5fe90110f9260f6b68463.tar.gz yuzu-5a3463bc2b1489dda6b5fe90110f9260f6b68463.tar.bz2 yuzu-5a3463bc2b1489dda6b5fe90110f9260f6b68463.tar.lz yuzu-5a3463bc2b1489dda6b5fe90110f9260f6b68463.tar.xz yuzu-5a3463bc2b1489dda6b5fe90110f9260f6b68463.tar.zst yuzu-5a3463bc2b1489dda6b5fe90110f9260f6b68463.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index f24de9a38..565b99254 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1137,8 +1137,11 @@ typename TextureCache<P>::BlitImages TextureCache<P>::GetBlitImages( } while (has_deleted_images); if (GetFormatType(dst_info.format) != SurfaceType::ColorTexture) { // Make sure the images are depth and/or stencil textures. - src_id = FindOrInsertImage(src_info, src_addr, RelaxedOptions{}); - dst_id = FindOrInsertImage(dst_info, dst_addr, RelaxedOptions{}); + do { + has_deleted_images = false; + src_id = FindOrInsertImage(src_info, src_addr, RelaxedOptions{}); + dst_id = FindOrInsertImage(dst_info, dst_addr, RelaxedOptions{}); + } while (has_deleted_images); } return BlitImages{ .dst_id = dst_id, @@ -1196,7 +1199,14 @@ template <class P> ImageViewId TextureCache<P>::FindRenderTargetView(const ImageInfo& info, GPUVAddr gpu_addr, bool is_clear) { const auto options = is_clear ? RelaxedOptions::Samples : RelaxedOptions{}; - const ImageId image_id = FindOrInsertImage(info, gpu_addr, options); + ImageId image_id{}; + bool delete_state = has_deleted_images; + do { + has_deleted_images = false; + image_id = FindOrInsertImage(info, gpu_addr, options); + delete_state |= has_deleted_images; + } while (has_deleted_images); + has_deleted_images = delete_state; if (!image_id) { return NULL_IMAGE_VIEW_ID; } |