diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-03-07 17:02:28 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-03-07 17:02:28 +0000 |
| commit | 195dfd3a09bc917135deeb4a4450638ae47997d1 (patch) | |
| tree | 5b827c7e71cbc34e7e927d8dc10873acefc3d8a1 /Graphics/GraphicsEngineD3D12 | |
| parent | Improved handling input layout elements in the pipeline state (diff) | |
| download | DiligentCore-195dfd3a09bc917135deeb4a4450638ae47997d1.tar.gz DiligentCore-195dfd3a09bc917135deeb4a4450638ae47997d1.zip | |
Improved buffer stride management in PSO
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp index a1d9db3f..353b9676 100644 --- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp @@ -319,7 +319,6 @@ namespace Diligent // Do not initialize array with zeroes for performance reasons D3D12_VERTEX_BUFFER_VIEW VBViews[MaxBufferSlots];// = {} VERIFY( m_NumVertexStreams <= MaxBufferSlots, "Too many buffers are being set" ); - const auto *Strides = m_pPipelineState->GetBufferStrides(); DEV_CHECK_ERR( m_NumVertexStreams >= m_pPipelineState->GetNumBufferSlotsUsed(), "Currently bound pipeline state '", m_pPipelineState->GetDesc().Name, "' expects ", m_pPipelineState->GetNumBufferSlotsUsed(), " input buffer slots, but only ", m_NumVertexStreams, " is bound"); bool DynamicBufferPresent = false; for( UINT Buff = 0; Buff < m_NumVertexStreams; ++Buff ) @@ -342,7 +341,7 @@ namespace Diligent //GraphicsCtx.AddReferencedObject(pd3d12Resource); VBView.BufferLocation = pBufferD3D12->GetGPUAddress(this) + CurrStream.Offset; - VBView.StrideInBytes = Strides[Buff]; + VBView.StrideInBytes = m_pPipelineState->GetBufferStride(Buff); // Note that for a dynamic buffer, what we use here is the size of the buffer itself, not the upload heap buffer! VBView.SizeInBytes = pBufferD3D12->GetDesc().uiSizeInBytes - CurrStream.Offset; } |
