diff --git a/src/video_core/buffer_cache/buffer_cache.cpp b/src/video_core/buffer_cache/buffer_cache.cpp index 27d4ca149d..62b5c89d64 100644 --- a/src/video_core/buffer_cache/buffer_cache.cpp +++ b/src/video_core/buffer_cache/buffer_cache.cpp @@ -623,8 +623,7 @@ bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, VAddr device_addr, TextureCache::BaseDesc desc{}; desc.info.guest_address = device_addr; desc.info.guest_size_bytes = size; - desc.flags = find_flags; - const ImageId image_id = texture_cache.FindImage(desc); + const ImageId image_id = texture_cache.FindImage(desc, find_flags); if (!image_id) { return false; } diff --git a/src/video_core/texture_cache/texture_cache.cpp b/src/video_core/texture_cache/texture_cache.cpp index 0e2c2a58c8..d83b67e8cb 100644 --- a/src/video_core/texture_cache/texture_cache.cpp +++ b/src/video_core/texture_cache/texture_cache.cpp @@ -257,9 +257,8 @@ ImageId TextureCache::ExpandImage(const ImageInfo& info, ImageId image_id) { return new_image_id; } -ImageId TextureCache::FindImage(BaseDesc& desc) { +ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) { const auto& info = desc.info; - const auto& flags = desc.flags; if (info.guest_address == 0) [[unlikely]] { return NULL_IMAGE_ID; diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 4e00ca2020..d7ded9d238 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -55,7 +55,6 @@ class TextureCache { ImageInfo info; ImageViewInfo view_info; BindingType type{BindingType::Texture}; - FindFlags flags{}; BaseDesc() = default; BaseDesc(BindingType type_, ImageInfo info_, ImageViewInfo view_info_) noexcept @@ -106,7 +105,7 @@ class TextureCache { void UnmapMemory(VAddr cpu_addr, size_t size); /// Retrieves the image handle of the image with the provided attributes. - [[nodiscard]] ImageId FindImage(BaseDesc& desc); + [[nodiscard]] ImageId FindImage(BaseDesc& desc, FindFlags flags = {}); /// Retrieves an image view with the properties of the specified image id. [[nodiscard]] ImageView& FindTexture(ImageId image_id, const ImageViewInfo& view_info);