summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-07-22 21:11:46 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-07-22 21:11:46 +0000
commite01e67252da8048423f3f83720073753be4b9450 (patch)
tree7b90e53c939a772c177027931400e636916ce9ce /Graphics/GraphicsEngineVulkan
parentImplemented mapping with MAP_FLAG_DO_NOT_SYNCHRONIZE flag in Vulkan and D3D12 (diff)
downloadDiligentCore-e01e67252da8048423f3f83720073753be4b9450.tar.gz
DiligentCore-e01e67252da8048423f3f83720073753be4b9450.zip
Fixed few minor issues with MAP_FLAG_DO_NOT_SYNCHRONIZE in D3D12 and Vulkan
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
index c81361d8..4a55a902 100644
--- a/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
@@ -417,7 +417,7 @@ void BufferVkImpl::Unmap( IDeviceContext* pContext, MAP_TYPE MapType, Uint32 Map
}
else if (m_Desc.Usage == USAGE_DYNAMIC)
{
- VERIFY(MapFlags & MAP_FLAG_DISCARD, "Vk buffer must be mapped for writing with MAP_FLAG_DISCARD flag");
+ VERIFY( MapFlags & (MAP_FLAG_DISCARD | MAP_FLAG_DO_NOT_SYNCHRONIZE), "Vk buffer must be mapped for writing with MAP_FLAG_DISCARD or MAP_FLAG_DO_NOT_SYNCHRONIZE flag");
if(m_VulkanBuffer != VK_NULL_HANDLE)
{
auto &DynAlloc = m_DynamicAllocations[CtxId];
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index bb7acaf7..beadb78d 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -403,7 +403,7 @@ namespace Diligent
if (!pBuffVk->CheckAccessFlags(VK_ACCESS_INDEX_READ_BIT))
BufferMemoryBarrier(*pBuffVk, VK_ACCESS_INDEX_READ_BIT);
- VERIFY(DrawAttribs.IndexType == VT_UINT16 || DrawAttribs.IndexType == VT_UINT32, "Unsupported index format. Only R16_UINT and R32_UINT are allowed.");
+ DEV_CHECK_ERR(DrawAttribs.IndexType == VT_UINT16 || DrawAttribs.IndexType == VT_UINT32, "Unsupported index format. Only R16_UINT and R32_UINT are allowed.");
VkIndexType vkIndexType = DrawAttribs.IndexType == VT_UINT16 ? VK_INDEX_TYPE_UINT16 : VK_INDEX_TYPE_UINT32;
m_CommandBuffer.BindIndexBuffer(pBuffVk->GetVkBuffer(), m_IndexDataStartOffset + pBuffVk->GetDynamicOffset(m_ContextId), vkIndexType);
}