summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-04-14 15:57:17 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-04-14 15:57:17 +0000
commit53e45f6540066115332a1471b98182b3baa82feb (patch)
tree2374329947d5eb318dc72e9fc3d2def0011aba2b /Graphics/GraphicsEngineVulkan
parentImplemented generate PSO cache warmup when texture view is created (diff)
downloadDiligentCore-53e45f6540066115332a1471b98182b3baa82feb.tar.gz
DiligentCore-53e45f6540066115332a1471b98182b3baa82feb.zip
Added comments about Fence thread safety; minor code improvements
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/include/FenceVkImpl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.h b/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.h
index 7004d92e..894451e6 100644
--- a/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/FenceVkImpl.h
@@ -49,6 +49,11 @@ public:
bool IsDeviceInternal = false);
~FenceVkImpl();
+ // Note that this method is not thread-safe. The reason is that VulkanFencePool is not thread
+ // safe, and DeviceContextVkImpl::SignalFence() adds the fence to the pending fences list that
+ // are signalled later by the command context when it submits the command list. So there is no
+ // guarantee that the fence pool is not accessed simultaneously by multiple threads even if the
+ // fence object itself is protected by mutex.
virtual Uint64 GetCompletedValue()override final;
/// Resets the fence to the specified value.