diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-04-14 18:04:53 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-04-14 18:04:53 +0000 |
| commit | a509e890a55eade6b10a36563f35219b61bf2707 (patch) | |
| tree | 33da45d394e57b9afbeae90e78bcedbafdd320c3 /Graphics/GraphicsEngineD3D11 | |
| parent | Implemented input vertex layout conversion in Vulkan (diff) | |
| download | DiligentCore-a509e890a55eade6b10a36563f35219b61bf2707.tar.gz DiligentCore-a509e890a55eade6b10a36563f35219b61bf2707.zip | |
Moved primitive topology from draw attribs to pipeline state desc
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
| -rw-r--r-- | Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index fd8e58f1..772ea60c 100644 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -117,6 +117,14 @@ namespace Diligent m_pd3d11DeviceContext->IASetInputLayout( pd3d11InputLayout ); m_CommittedD3D11InputLayout = pd3d11InputLayout; } + + auto PrimTopology = Desc.GraphicsPipeline.PrimitiveTopology; + if (m_CommittedPrimitiveTopology != PrimTopology) + { + m_CommittedPrimitiveTopology = PrimTopology; + m_CommittedD3D11PrimTopology = TopologyToD3D11Topology(PrimTopology); + m_pd3d11DeviceContext->IASetPrimitiveTopology(m_CommittedD3D11PrimTopology); + } } } @@ -707,13 +715,6 @@ namespace Diligent } #endif - if(m_CommittedPrimitiveTopology != DrawAttribs.Topology) - { - m_CommittedPrimitiveTopology = DrawAttribs.Topology; - m_CommittedD3D11PrimTopology = TopologyToD3D11Topology( DrawAttribs.Topology ); - m_pd3d11DeviceContext->IASetPrimitiveTopology( m_CommittedD3D11PrimTopology ); - } - if( DrawAttribs.IsIndirect ) { VERIFY( DrawAttribs.pIndirectDrawAttribs, "Indirect draw command attributes buffer is not set" ); |
