diff options
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index 1681b456..76163513 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -1318,6 +1318,16 @@ void DeviceContextVkImpl::MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAG else { VERIFY_EXPR(MapFlags & MAP_FLAG_NO_OVERWRITE); + + if (pBufferVk->m_VulkanBuffer != VK_NULL_HANDLE) + { + LOG_ERROR("Formatted or structured buffers require actual Vulkan backing resource and cannot be suballocated " + "from dynamic heap. In current implementation, the entire contents of the backing buffer is updated when the buffer is unmapped. " + "As a consequence, the buffer cannot be mapped with MAP_FLAG_NO_OVERWRITE flag because updating the whole " + "buffer will overwrite regions that may still be in use by the GPU."); + return; + } + // Reuse the same allocation } |
