diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 13 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 2 |
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() { | |||
| 1067 | 1067 | ||
| 1068 | template <class P> | 1068 | template <class P> |
| 1069 | void BufferCache<P>::DoUpdateGraphicsBuffers(bool is_indexed) { | 1069 | void BufferCache<P>::DoUpdateGraphicsBuffers(bool is_indexed) { |
| 1070 | do { | 1070 | BufferOperations([&]() { |
| 1071 | channel_state->has_deleted_buffers = false; | ||
| 1072 | if (is_indexed) { | 1071 | if (is_indexed) { |
| 1073 | UpdateIndexBuffer(); | 1072 | UpdateIndexBuffer(); |
| 1074 | } | 1073 | } |
| @@ -1082,14 +1081,16 @@ void BufferCache<P>::DoUpdateGraphicsBuffers(bool is_indexed) { | |||
| 1082 | if (current_draw_indirect) { | 1081 | if (current_draw_indirect) { |
| 1083 | UpdateDrawIndirect(); | 1082 | UpdateDrawIndirect(); |
| 1084 | } | 1083 | } |
| 1085 | } while (channel_state->has_deleted_buffers); | 1084 | }); |
| 1086 | } | 1085 | } |
| 1087 | 1086 | ||
| 1088 | template <class P> | 1087 | template <class P> |
| 1089 | void BufferCache<P>::DoUpdateComputeBuffers() { | 1088 | void BufferCache<P>::DoUpdateComputeBuffers() { |
| 1090 | UpdateComputeUniformBuffers(); | 1089 | BufferOperations([&]() { |
| 1091 | UpdateComputeStorageBuffers(); | 1090 | UpdateComputeUniformBuffers(); |
| 1092 | UpdateComputeTextureBuffers(); | 1091 | UpdateComputeStorageBuffers(); |
| 1092 | UpdateComputeTextureBuffers(); | ||
| 1093 | }); | ||
| 1093 | } | 1094 | } |
| 1094 | 1095 | ||
| 1095 | template <class P> | 1096 | 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 @@ | |||
| 13 | #include "common/microprofile.h" | 13 | #include "common/microprofile.h" |
| 14 | #include "common/scope_exit.h" | 14 | #include "common/scope_exit.h" |
| 15 | #include "common/settings.h" | 15 | #include "common/settings.h" |
| 16 | #include "video_core/buffer_cache/buffer_cache.h" | ||
| 16 | #include "video_core/control/channel_state.h" | 17 | #include "video_core/control/channel_state.h" |
| 17 | #include "video_core/engines/draw_manager.h" | 18 | #include "video_core/engines/draw_manager.h" |
| 18 | #include "video_core/engines/kepler_compute.h" | 19 | #include "video_core/engines/kepler_compute.h" |
| @@ -285,6 +286,7 @@ void RasterizerVulkan::DrawTexture() { | |||
| 285 | 286 | ||
| 286 | query_cache.NotifySegment(true); | 287 | query_cache.NotifySegment(true); |
| 287 | 288 | ||
| 289 | std::scoped_lock l{texture_cache.mutex}; | ||
| 288 | texture_cache.SynchronizeGraphicsDescriptors(); | 290 | texture_cache.SynchronizeGraphicsDescriptors(); |
| 289 | texture_cache.UpdateRenderTargets(false); | 291 | texture_cache.UpdateRenderTargets(false); |
| 290 | 292 | ||