diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-05-04 03:16:57 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-05-07 23:46:12 +0200 |
commit | 6f90dff2938b5bd5e9311e924e8a29945f16ac18 (patch) | |
tree | 60d757ecc85615cf846b20a8d392261645a997ab /src/video_core | |
parent | Query cache: stop updating pages as it's not affected by cpu writes (diff) | |
download | yuzu-6f90dff2938b5bd5e9311e924e8a29945f16ac18.tar yuzu-6f90dff2938b5bd5e9311e924e8a29945f16ac18.tar.gz yuzu-6f90dff2938b5bd5e9311e924e8a29945f16ac18.tar.bz2 yuzu-6f90dff2938b5bd5e9311e924e8a29945f16ac18.tar.lz yuzu-6f90dff2938b5bd5e9311e924e8a29945f16ac18.tar.xz yuzu-6f90dff2938b5bd5e9311e924e8a29945f16ac18.tar.zst yuzu-6f90dff2938b5bd5e9311e924e8a29945f16ac18.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/fence_manager.h | 7 | ||||
-rw-r--r-- | src/video_core/rasterizer_download_area.h | 3 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 4 | ||||
-rw-r--r-- | src/video_core/texture_cache/image_view_base.cpp | 3 |
4 files changed, 13 insertions, 4 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h index 850d6f27d..35d699bbf 100644 --- a/src/video_core/fence_manager.h +++ b/src/video_core/fence_manager.h @@ -55,7 +55,12 @@ public: // Unlike other fences, this one doesn't void SignalOrdering() { - std::function<void()> do_nothing([]{}); + std::scoped_lock lock{buffer_cache.mutex}; + buffer_cache.AccumulateFlushes(); + } + + void SignalReference() { + std::function<void()> do_nothing([] {}); SignalFence(std::move(do_nothing)); } diff --git a/src/video_core/rasterizer_download_area.h b/src/video_core/rasterizer_download_area.h index 771ce903d..2d7425c79 100644 --- a/src/video_core/rasterizer_download_area.h +++ b/src/video_core/rasterizer_download_area.h @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + #pragma once #include "common/common_types.h" diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index bae4aa611..2beb0efea 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -621,7 +621,7 @@ void RasterizerVulkan::SignalSyncPoint(u32 value) { } void RasterizerVulkan::SignalReference() { - fence_manager.SignalOrdering(); + fence_manager.SignalReference(); } void RasterizerVulkan::ReleaseFences() { @@ -654,7 +654,7 @@ void RasterizerVulkan::WaitForIdle() { cmdbuf.SetEvent(event, flags); cmdbuf.WaitEvents(event, flags, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, {}, {}, {}); }); - SignalReference(); + fence_manager.SignalOrdering(); } void RasterizerVulkan::FragmentBarrier() { diff --git a/src/video_core/texture_cache/image_view_base.cpp b/src/video_core/texture_cache/image_view_base.cpp index 30a7c11f5..c3b2b196d 100644 --- a/src/video_core/texture_cache/image_view_base.cpp +++ b/src/video_core/texture_cache/image_view_base.cpp @@ -26,7 +26,8 @@ ImageViewBase::ImageViewBase(const ImageViewInfo& info, const ImageInfo& image_i ASSERT_MSG(VideoCore::Surface::IsViewCompatible(image_info.format, info.format, false, true), "Image view format {} is incompatible with image format {}", info.format, image_info.format); - const bool preemptive = !Settings::values.use_reactive_flushing.GetValue() && image_info.type == ImageType::Linear; + const bool preemptive = + !Settings::values.use_reactive_flushing.GetValue() && image_info.type == ImageType::Linear; if (image_info.forced_flushed || preemptive) { flags |= ImageViewFlagBits::PreemtiveDownload; } |