summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-05-29 15:54:31 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-05-29 15:54:31 +0000
commitfafaba571ba8b42a505a5a1abf7d118fa3eb91ab (patch)
treebb3940789e74fb9a801695869583b1711b6555a7 /Graphics/GraphicsEngineD3D12
parentMoved vertex buffer stride definition from IDeviceContext::SetVertexBuffers()... (diff)
downloadDiligentCore-fafaba571ba8b42a505a5a1abf7d118fa3eb91ab.tar.gz
DiligentCore-fafaba571ba8b42a505a5a1abf7d118fa3eb91ab.zip
Implemened index buffer committing in Vulkan
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp5
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;