From 2b6a43bc5a5ebcb2e46fad395c2778b27d0bdb01 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 25 Nov 2018 13:02:49 -0800 Subject: Closed https://github.com/DiligentGraphics/DiligentCore/issues/15 Fixed issue with mapping dynamic buffer in Vk --- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index 5c3d19ee..71648849 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -1318,7 +1318,7 @@ namespace Diligent } else if (BuffDesc.Usage == USAGE_DYNAMIC) { - DEV_CHECK_ERR((MapFlags & (MAP_FLAG_DISCARD | MAP_FLAG_DO_NOT_SYNCHRONIZE)) == 0, "Failed to map buffer '", + DEV_CHECK_ERR((MapFlags & (MAP_FLAG_DISCARD | MAP_FLAG_DO_NOT_SYNCHRONIZE)) != 0, "Failed to map buffer '", BuffDesc.Name, "': Vk buffer must be mapped for writing with MAP_FLAG_DISCARD or MAP_FLAG_DO_NOT_SYNCHRONIZE flag. Context Id: ", m_ContextId); auto& DynAllocation = pBufferVk->m_DynamicAllocations[m_ContextId]; -- cgit v1.2.3