diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-03-07 16:44:55 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-03-07 16:44:55 +0000 |
| commit | 3f579a5ff60f5e54959abe2c85fc612e674ef91c (patch) | |
| tree | 92e4aabb6997d86698baeaab8c216c8fbdf0caab /Graphics/GraphicsEngineD3DBase | |
| parent | Few minor improvements to shader resource management in Vk backend (diff) | |
| download | DiligentCore-3f579a5ff60f5e54959abe2c85fc612e674ef91c.tar.gz DiligentCore-3f579a5ff60f5e54959abe2c85fc612e674ef91c.zip | |
Improved handling input layout elements in the pipeline state
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
| -rw-r--r-- | Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h b/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h index 3494c317..75233364 100644 --- a/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h +++ b/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h @@ -370,14 +370,14 @@ namespace Diligent template<typename D3D_INPUT_ELEMENT_DESC> - void LayoutElements_To_D3D_INPUT_ELEMENT_DESCs(const std::vector<LayoutElement, STDAllocatorRawMem<LayoutElement> > &LayoutElements, std::vector<D3D_INPUT_ELEMENT_DESC, STDAllocatorRawMem<D3D_INPUT_ELEMENT_DESC>> &D3DInputElements) + void LayoutElements_To_D3D_INPUT_ELEMENT_DESCs(const InputLayoutDesc& InputLayout, + std::vector<D3D_INPUT_ELEMENT_DESC, STDAllocatorRawMem<D3D_INPUT_ELEMENT_DESC>> &D3DInputElements) { // D3D12_INPUT_ELEMENT_DESC and D3D11_INPUT_ELEMENT_DESC are identical - auto NumElements = LayoutElements.size(); - D3DInputElements.resize(NumElements); - for(Uint32 iElem=0; iElem < NumElements; ++iElem) + D3DInputElements.resize(InputLayout.NumElements); + for(Uint32 iElem=0; iElem < InputLayout.NumElements; ++iElem) { - const auto &CurrElem = LayoutElements[iElem]; + const auto &CurrElem = InputLayout.LayoutElements[iElem]; auto &D3DElem = D3DInputElements[iElem]; D3DElem.SemanticName = "ATTRIB"; D3DElem.SemanticIndex = CurrElem.InputIndex; |
