From c13519f81f72a5fccd5463bba0ce34093ba92d13 Mon Sep 17 00:00:00 2001 From: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com> Date: Sat, 24 Aug 2024 22:29:58 +0300 Subject: [PATCH] Remove subres tracking * Will be done separately --- src/video_core/page_manager.cpp | 3 ++- src/video_core/texture_cache/image.cpp | 2 -- src/video_core/texture_cache/texture_cache.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/video_core/page_manager.cpp b/src/video_core/page_manager.cpp index eca4b245..18b8aee2 100644 --- a/src/video_core/page_manager.cpp +++ b/src/video_core/page_manager.cpp @@ -200,7 +200,8 @@ struct PageManager::Impl { const greg_t err = ctx->uc_mcontext.gregs[REG_ERR]; #endif if (err & 0x2) { - rasterizer->InvalidateMemory(address, sizeof(u64)); + const VAddr addr_aligned = Common::AlignDown(address, PAGESIZE); + rasterizer->InvalidateMemory(addr_aligned, PAGESIZE); } else { // Read not supported! UNREACHABLE(); diff --git a/src/video_core/texture_cache/image.cpp b/src/video_core/texture_cache/image.cpp index f7ab3712..528dda55 100644 --- a/src/video_core/texture_cache/image.cpp +++ b/src/video_core/texture_cache/image.cpp @@ -117,8 +117,6 @@ Image::Image(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_, : instance{&instance_}, scheduler{&scheduler_}, info{info_}, image{instance->GetDevice(), instance->GetAllocator()}, cpu_addr{info.guest_address}, cpu_addr_end{cpu_addr + info.guest_size_bytes} { - LOG_INFO(Render_Vulkan, "Creating image {}x{} at {:#x} M:{}", info.size.width, info.size.height, - info.guest_address, info.resources.levels); mip_hashes.resize(info.resources.levels); ASSERT(info.pixel_format != vk::Format::eUndefined); // Here we force `eExtendedUsage` as don't know all image usage cases beforehand. In normal case diff --git a/src/video_core/texture_cache/texture_cache.cpp b/src/video_core/texture_cache/texture_cache.cpp index 043caa7a..b7f4fa0d 100644 --- a/src/video_core/texture_cache/texture_cache.cpp +++ b/src/video_core/texture_cache/texture_cache.cpp @@ -26,7 +26,7 @@ TextureCache::TextureCache(const Vulkan::Instance& instance_, Vulkan::Scheduler& info.UpdateSize(); const ImageId null_id = slot_images.insert(instance, scheduler, info); ASSERT(null_id.index == 0); - slot_images[null_id].cpu_modified = 0; + slot_images[null_id].flags = ImageFlagBits{}; ImageViewInfo view_info; void(slot_image_views.insert(instance, view_info, slot_images[null_id], null_id));