diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-11-24 19:15:28 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-11-24 19:15:28 +0000 |
| commit | 82198dc5b8284382d27d5f6776fb2531b805a83e (patch) | |
| tree | 6734be86fdf30c87a7d244e13133bc2bcf7452d2 /Tests/TestApp/src/TestTexturing.cpp | |
| parent | Updated core (fixed state transiton issue in D3D11) (diff) | |
| download | DiligentEngine-82198dc5b8284382d27d5f6776fb2531b805a83e.tar.gz DiligentEngine-82198dc5b8284382d27d5f6776fb2531b805a83e.zip | |
Added explicit control over resource transitions in draw command
Added explicit static resource binding initialization in SRB objects
Diffstat (limited to 'Tests/TestApp/src/TestTexturing.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestTexturing.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Tests/TestApp/src/TestTexturing.cpp b/Tests/TestApp/src/TestTexturing.cpp index 23292c6..4bb53c6 100644 --- a/Tests/TestApp/src/TestTexturing.cpp +++ b/Tests/TestApp/src/TestTexturing.cpp @@ -268,10 +268,12 @@ void TestTexturing::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext PSODesc.GraphicsPipeline.InputLayout.LayoutElements = Elems; PSODesc.GraphicsPipeline.InputLayout.NumElements = _countof( Elems ); pDevice->CreatePipelineState(PSODesc, &m_pPSO); - + pVS->BindResources(m_pResourceMapping, 0); pPS->BindResources(m_pResourceMapping, 0); + m_pPSO->CreateShaderResourceBinding(&m_pSRB, true); + auto *FmtName = pDevice->GetTextureFormatInfo(TexFormat).Name; m_TestName.append(" ("); m_TestName.append(FmtName); @@ -281,8 +283,8 @@ void TestTexturing::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext void TestTexturing::Draw() { m_pDeviceContext->SetPipelineState(m_pPSO); - m_pDeviceContext->TransitionShaderResources(m_pPSO, nullptr); - m_pDeviceContext->CommitShaderResources(nullptr, COMMIT_SHADER_RESOURCES_FLAG_VERIFY_STATES); + m_pDeviceContext->TransitionShaderResources(m_pPSO, m_pSRB); + m_pDeviceContext->CommitShaderResources(m_pSRB, COMMIT_SHADER_RESOURCES_FLAG_VERIFY_STATES); IBuffer *pBuffs[] = {m_pVertexBuff}; Uint32 Offsets[] = {0}; |
