diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-05-29 15:54:31 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-05-29 15:54:31 +0000 |
| commit | fafaba571ba8b42a505a5a1abf7d118fa3eb91ab (patch) | |
| tree | bb3940789e74fb9a801695869583b1711b6555a7 /Graphics/GraphicsEngineD3D12 | |
| parent | Moved vertex buffer stride definition from IDeviceContext::SetVertexBuffers()... (diff) | |
| download | DiligentCore-fafaba571ba8b42a505a5a1abf7d118fa3eb91ab.tar.gz DiligentCore-fafaba571ba8b42a505a5a1abf7d118fa3eb91ab.zip | |
Implemened index buffer committing in Vulkan
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp index 8b10da01..7db39b9e 100644 --- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp @@ -199,11 +199,10 @@ namespace Diligent IBView.BufferLocation = pBuffD3D12->GetGPUAddress(m_ContextId) + m_IndexDataStartOffset; if( IndexType == VT_UINT32 ) IBView.Format = DXGI_FORMAT_R32_UINT; - else if( IndexType == VT_UINT16 ) - IBView.Format = DXGI_FORMAT_R16_UINT; else { - UNEXPECTED( "Unsupported index format. Only R16_UINT and R32_UINT are allowed." ); + VERIFY( 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! IBView.SizeInBytes = pBuffD3D12->GetDesc().uiSizeInBytes - m_IndexDataStartOffset; |
