diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-01 19:49:01 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-01 19:49:01 +0000 |
| commit | 0b97399336ea8892418fcbaadcde311900396ce6 (patch) | |
| tree | 43cc86b9a225d45545fe5677395e24ced353d779 /Tests/TestApp/src | |
| parent | Fixed minor issue (diff) | |
| download | DiligentEngine-0b97399336ea8892418fcbaadcde311900396ce6.tar.gz DiligentEngine-0b97399336ea8892418fcbaadcde311900396ce6.zip | |
Added explicit state transition control flags to CLEAR_DEPTH_STENCIL_FLAGS
Diffstat (limited to 'Tests/TestApp/src')
| -rw-r--r-- | Tests/TestApp/src/TestApp.cpp | 4 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestShaderVarAccess.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp index 01eb2ae..a4b0519 100644 --- a/Tests/TestApp/src/TestApp.cpp +++ b/Tests/TestApp/src/TestApp.cpp @@ -533,7 +533,7 @@ void TestApp::InitializeRenderers() // This adds transition barrier for pTex1 m_pImmediateContext->SetRenderTargets(1, pRTVs, pDSV, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL); m_pImmediateContext->ClearRenderTarget(pRTVs[0], ClearColor, CLEAR_RENDER_TARGET_VERIFY_STATE); - m_pImmediateContext->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG); + m_pImmediateContext->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG | CLEAR_DEPTH_STENCIL_VERIFY_STATE_FLAG); // Generate draw command to the bound render target m_pImmediateContext->Draw(DrawAttrs); m_pImmediateContext->SetRenderTargets(0, nullptr, nullptr, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL); @@ -633,7 +633,7 @@ void TestApp::Render() m_pImmediateContext->SetRenderTargets(0, nullptr, nullptr, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL); float ClearColor[] = {0.1f, 0.2f, 0.4f, 1.0f}; m_pImmediateContext->ClearRenderTarget(nullptr, ClearColor, CLEAR_RENDER_TARGET_VERIFY_STATE); - m_pImmediateContext->ClearDepthStencil(nullptr, CLEAR_DEPTH_FLAG, 1.f); + m_pImmediateContext->ClearDepthStencil(nullptr, CLEAR_DEPTH_FLAG| CLEAR_DEPTH_STENCIL_VERIFY_STATE_FLAG, 1.f); double dCurrTime = m_CurrTime; diff --git a/Tests/TestApp/src/TestShaderVarAccess.cpp b/Tests/TestApp/src/TestShaderVarAccess.cpp index dce6440..00efe34 100644 --- a/Tests/TestApp/src/TestShaderVarAccess.cpp +++ b/Tests/TestApp/src/TestShaderVarAccess.cpp @@ -555,7 +555,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext m_pDeviceContext->SetRenderTargets(1, &pRTV, pDSV, SET_RENDER_TARGETS_FLAG_TRANSITION_ALL); float Zero[4] = {}; m_pDeviceContext->ClearRenderTarget(pRTV, Zero, CLEAR_RENDER_TARGET_VERIFY_STATE); - m_pDeviceContext->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG); + m_pDeviceContext->ClearDepthStencil(pDSV, CLEAR_DEPTH_FLAG | CLEAR_DEPTH_STENCIL_VERIFY_STATE_FLAG); pContext->CommitShaderResources(pSRB, COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES); pContext->Draw(DrawAttrs); |
