From e01e67252da8048423f3f83720073753be4b9450 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 22 Jul 2018 14:11:46 -0700 Subject: Fixed few minor issues with MAP_FLAG_DO_NOT_SYNCHRONIZE in D3D12 and Vulkan --- Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp | 2 +- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') 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); } -- cgit v1.2.3