diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-22 21:11:46 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-22 21:11:46 +0000 |
| commit | e01e67252da8048423f3f83720073753be4b9450 (patch) | |
| tree | 7b90e53c939a772c177027931400e636916ce9ce /Graphics/GraphicsEngineD3D12 | |
| parent | Implemented mapping with MAP_FLAG_DO_NOT_SYNCHRONIZE flag in Vulkan and D3D12 (diff) | |
| download | DiligentCore-e01e67252da8048423f3f83720073753be4b9450.tar.gz DiligentCore-e01e67252da8048423f3f83720073753be4b9450.zip | |
Fixed few minor issues with MAP_FLAG_DO_NOT_SYNCHRONIZE in D3D12 and Vulkan
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp index 0942014a..dd4e2c81 100644 --- a/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp @@ -409,7 +409,7 @@ void BufferD3D12Impl::Unmap( IDeviceContext* pContext, MAP_TYPE MapType, Uint32 } else if (m_Desc.Usage == USAGE_DYNAMIC) { - VERIFY(MapFlags & MAP_FLAG_DISCARD, "D3D12 buffer must be mapped for writing with MAP_FLAG_DISCARD flag"); + VERIFY(MapFlags & (MAP_FLAG_DISCARD | MAP_FLAG_DO_NOT_SYNCHRONIZE), "D3D12 buffer must be mapped for writing with MAP_FLAG_DISCARD or MAP_FLAG_DO_NOT_SYNCHRONIZE flag"); // Copy data into the resource if (m_pd3d12Resource) { diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp index b07c6067..4484d615 100644 --- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp @@ -206,7 +206,7 @@ namespace Diligent IBView.Format = DXGI_FORMAT_R32_UINT; else { - VERIFY( IndexType == VT_UINT16, "Unsupported index format. Only R16_UINT and R32_UINT are allowed."); + DEV_CHECK_ERR( IndexType == VT_UINT16, "Unsupported index format. Only R16_UINT and R32_UINT are allowed."); IBView.Format = DXGI_FORMAT_R16_UINT; } // Note that for a dynamic buffer, what we use here is the size of the buffer itself, not the upload heap buffer! @@ -267,7 +267,7 @@ namespace Diligent D3D12_VERTEX_BUFFER_VIEW VBViews[MaxBufferSlots];// = {} VERIFY( m_NumVertexStreams <= MaxBufferSlots, "Too many buffers are being set" ); const auto *Strides = pPipelineStateD3D12->GetBufferStrides(); - VERIFY( m_NumVertexStreams >= pPipelineStateD3D12->GetNumBufferSlotsUsed(), "Currently bound pipeline state \"", pPipelineStateD3D12->GetDesc().Name, "\" expects ", pPipelineStateD3D12->GetNumBufferSlotsUsed(), " input buffer slots, but only ", m_NumVertexStreams, " is bound"); + DEV_CHECK_ERR( m_NumVertexStreams >= pPipelineStateD3D12->GetNumBufferSlotsUsed(), "Currently bound pipeline state \"", pPipelineStateD3D12->GetDesc().Name, "\" expects ", pPipelineStateD3D12->GetNumBufferSlotsUsed(), " input buffer slots, but only ", m_NumVertexStreams, " is bound"); bool DynamicBufferPresent = false; for( UINT Buff = 0; Buff < m_NumVertexStreams; ++Buff ) { |
