summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-29 16:25:09 +0100
committerGitHub <noreply@github.com>2023-10-29 16:25:09 +0100
commit1f9684eaf9ea9885230cfc3407ee43e23f2efb67 (patch)
tree89df369818cce70e52b98181af163927cae5faa9 /src
parentMerge pull request #11852 from german77/async_brr (diff)
parentAdd missing dowhile loops around FindBuffer calls (diff)
downloadyuzu-1f9684eaf9ea9885230cfc3407ee43e23f2efb67.tar
yuzu-1f9684eaf9ea9885230cfc3407ee43e23f2efb67.tar.gz
yuzu-1f9684eaf9ea9885230cfc3407ee43e23f2efb67.tar.bz2
yuzu-1f9684eaf9ea9885230cfc3407ee43e23f2efb67.tar.lz
yuzu-1f9684eaf9ea9885230cfc3407ee43e23f2efb67.tar.xz
yuzu-1f9684eaf9ea9885230cfc3407ee43e23f2efb67.tar.zst
yuzu-1f9684eaf9ea9885230cfc3407ee43e23f2efb67.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h13
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 9b2698fad..081a574e8 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -1067,8 +1067,7 @@ void BufferCache<P>::BindHostComputeTextureBuffers() {
template <class P>
void BufferCache<P>::DoUpdateGraphicsBuffers(bool is_indexed) {
- do {
- channel_state->has_deleted_buffers = false;
+ BufferOperations([&]() {
if (is_indexed) {
UpdateIndexBuffer();
}
@@ -1082,14 +1081,16 @@ void BufferCache<P>::DoUpdateGraphicsBuffers(bool is_indexed) {
if (current_draw_indirect) {
UpdateDrawIndirect();
}
- } while (channel_state->has_deleted_buffers);
+ });
}
template <class P>
void BufferCache<P>::DoUpdateComputeBuffers() {
- UpdateComputeUniformBuffers();
- UpdateComputeStorageBuffers();
- UpdateComputeTextureBuffers();
+ BufferOperations([&]() {
+ UpdateComputeUniformBuffers();
+ UpdateComputeStorageBuffers();
+ UpdateComputeTextureBuffers();
+ });
}
template <class P>
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 465eac37e..059b7cb40 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -13,6 +13,7 @@
#include "common/microprofile.h"
#include "common/scope_exit.h"
#include "common/settings.h"
+#include "video_core/buffer_cache/buffer_cache.h"
#include "video_core/control/channel_state.h"
#include "video_core/engines/draw_manager.h"
#include "video_core/engines/kepler_compute.h"
@@ -285,6 +286,7 @@ void RasterizerVulkan::DrawTexture() {
query_cache.NotifySegment(true);
+ std::scoped_lock l{texture_cache.mutex};
texture_cache.SynchronizeGraphicsDescriptors();
texture_cache.UpdateRenderTargets(false);