From fafaba571ba8b42a505a5a1abf7d118fa3eb91ab Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Tue, 29 May 2018 08:54:31 -0700 Subject: Implemened index buffer committing in Vulkan --- Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') 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; -- cgit v1.2.3