diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 6e3dd2a9fa..bf246405c7 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -43,7 +43,7 @@ BufferCache

::~BufferCache() = default; template u64 BufferCache

::DeviceUsage(bool force_refresh) { - if (!runtime.CanReportAllocationUsage()) { + if (!runtime.CanReportMemoryUsage()) { return total_used_memory; } if (force_refresh || usage_refresh_countdown == 0) { @@ -61,7 +61,6 @@ u64 BufferCache

::ReclaimMemory(u64 target_bytes, bool allow_download) { return 0; } in_reclaim = true; - sentenced_buffers.Reclaim(runtime.CompletedSyncPoint()); u64 freed = 0; const auto clean_up = [&](BufferId buffer_id) { if (freed >= target_bytes) { @@ -83,7 +82,6 @@ u64 BufferCache

::ReclaimMemory(u64 target_bytes, bool allow_download) { if (freed == 0) { lru_cache.ForEachItemBelow(frame_tick > 0 ? frame_tick - 1 : 0, clean_up); } - sentenced_buffers.Reclaim(runtime.CompletedSyncPoint()); in_reclaim = false; usage_refresh_countdown = 0; reclaim_stalled = freed == 0; diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index e9834b6638..7ee8464c48 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h @@ -142,10 +142,6 @@ public: return GetDeviceMemoryUsage(); } - bool CanReportAllocationUsage() const { - return device.CanReportMemoryUsage(); - } - void BindFastUniformBuffer(size_t stage, u32 binding_index, u32 size) { const GLuint handle = fast_uniforms[stage][binding_index].handle; const GLsizeiptr gl_size = static_cast(size); diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 17f860f910..942ffdd514 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h @@ -91,10 +91,6 @@ public: return GetDeviceMemoryUsage(); } - bool CanReportAllocationUsage() const { - return device.CanReportMemoryUsage(); - } - bool CanReportMemoryUsage() const { return device.CanReportMemoryUsage(); } diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h index 7f097a5fa7..ed45aa7125 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.h +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h @@ -110,10 +110,6 @@ public: u64 GetDeviceAllocationUsage() const; - bool CanReportAllocationUsage() const noexcept { - return true; - } - bool CanReportMemoryUsage() const; u32 GetUniformBufferAlignment() const; diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index dd13aee53b..5fbe72f1a2 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -72,10 +72,6 @@ public: u64 GetDeviceAllocationUsage() const; - bool CanReportAllocationUsage() const noexcept { - return true; - } - bool CanReportMemoryUsage() const; std::optional GetSamplerHeapBudget() const; diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 1dfdd22423..c39b74dfb5 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -153,7 +153,7 @@ u64 TextureCache

::ImageSizeBytes(const ImageBase& image) { template u64 TextureCache

::DeviceUsage(bool force_refresh) { - if (!runtime.CanReportAllocationUsage()) { + if (!runtime.CanReportMemoryUsage()) { return total_used_memory; } if (force_refresh || usage_refresh_countdown == 0) { @@ -171,11 +171,6 @@ u64 TextureCache

::ReclaimMemory(u64 target_bytes, bool allow_download) { return 0; } in_reclaim = true; - const u64 drain_point = runtime.CompletedSyncPoint(); - TickEvictionDownloads(drain_point); - sentenced_images.Reclaim(drain_point); - sentenced_image_view.Reclaim(drain_point); - sentenced_framebuffers.Reclaim(drain_point); u64 freed = 0; const auto evict = [&](ImageId image_id) { if (freed >= target_bytes) { @@ -214,10 +209,6 @@ u64 TextureCache

::ReclaimMemory(u64 target_bytes, bool allow_download) { if (freed == 0) { lru_cache.ForEachItemBelow(frame_tick > 0 ? frame_tick - 1 : 0, evict); } - const u64 exit_point = runtime.CompletedSyncPoint(); - sentenced_images.Reclaim(exit_point); - sentenced_image_view.Reclaim(exit_point); - sentenced_framebuffers.Reclaim(exit_point); in_reclaim = false; usage_refresh_countdown = 0; reclaim_stalled = freed == 0;