diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-25 05:21:40 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-25 05:21:40 +0000 |
| commit | 7cf190803b1eee946e068d0c92d383d9e17e8e97 (patch) | |
| tree | c3fdd336683b96ceaf8a80bb5a98884348beb493 /Graphics/GraphicsEngineVulkan | |
| parent | Updated VertexStreamInfo to use final buffer implementation type (diff) | |
| download | DiligentCore-7cf190803b1eee946e068d0c92d383d9e17e8e97.tar.gz DiligentCore-7cf190803b1eee946e068d0c92d383d9e17e8e97.zip | |
Removed unnecessary conversion from m_pPipelineState to target implementation type in device context implementations
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index 5cbd0ada..4b0af79e 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -397,8 +397,6 @@ namespace Diligent } #endif - auto *pPipelineStateVk = m_pPipelineState.RawPtr(); - EnsureVkCmdBuffer(); if ( DrawAttribs.IsIndexed ) @@ -426,13 +424,13 @@ namespace Diligent CommitVkVertexBuffers(); if (m_DesrSetBindInfo.DynamicOffsetCount != 0) - pPipelineStateVk->BindDescriptorSetsWithDynamicOffsets(this, m_DesrSetBindInfo); + m_pPipelineState->BindDescriptorSetsWithDynamicOffsets(this, m_DesrSetBindInfo); #if 0 #ifdef _DEBUG else { - if ( pPipelineStateVk->dbgContainsShaderResources() ) - LOG_ERROR_MESSAGE("Pipeline state \"", pPipelineStateVk->GetDesc().Name, "\" contains shader resources, but IDeviceContext::CommitShaderResources() was not called" ); + if ( m_pPipelineState->dbgContainsShaderResources() ) + LOG_ERROR_MESSAGE("Pipeline state \"", m_pPipelineState->GetDesc().Name, "\" contains shader resources, but IDeviceContext::CommitShaderResources() was not called" ); } #endif #endif @@ -454,7 +452,7 @@ namespace Diligent } #ifdef DEVELOPMENT - if (pPipelineStateVk->GetVkRenderPass() != m_RenderPass) + if (m_pPipelineState->GetVkRenderPass() != m_RenderPass) { DvpLogRenderPass_PSOMismatch(); } @@ -505,8 +503,6 @@ namespace Diligent } #endif - auto *pPipelineStateVk = m_pPipelineState.RawPtr(); - EnsureVkCmdBuffer(); // Dispatch commands must be executed outside of render pass @@ -514,13 +510,13 @@ namespace Diligent m_CommandBuffer.EndRenderPass(); if (m_DesrSetBindInfo.DynamicOffsetCount != 0) - pPipelineStateVk->BindDescriptorSetsWithDynamicOffsets(this, m_DesrSetBindInfo); + m_pPipelineState->BindDescriptorSetsWithDynamicOffsets(this, m_DesrSetBindInfo); #if 0 #ifdef _DEBUG else { - if ( pPipelineStateVk->dbgContainsShaderResources() ) - LOG_ERROR_MESSAGE("Pipeline state \"", pPipelineStateVk->GetDesc().Name, "\" contains shader resources, but IDeviceContext::CommitShaderResources() was not called" ); + if ( m_pPipelineState->dbgContainsShaderResources() ) + LOG_ERROR_MESSAGE("Pipeline state \"", m_pPipelineState->GetDesc().Name, "\" contains shader resources, but IDeviceContext::CommitShaderResources() was not called" ); } #endif #endif @@ -844,7 +840,7 @@ namespace Diligent m_State = ContextState{}; m_DesrSetBindInfo.Reset(); m_CommandBuffer.Reset(); - m_pPipelineState.Release(); + m_pPipelineState = nullptr; } void DeviceContextVkImpl::SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pOffsets, Uint32 Flags ) @@ -1233,7 +1229,7 @@ namespace Diligent m_CommandBuffer.Reset(); m_State = ContextState{}; m_DesrSetBindInfo.Reset(); - m_pPipelineState.Release(); + m_pPipelineState = nullptr; InvalidateState(); } |
