diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-02 23:44:56 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-02 23:44:56 +0000 |
| commit | c7db634ec3e350b9cf665ec0f75455189a8eaace (patch) | |
| tree | 35ad25a85cdf99242bf8af3b8cd3c036654c05d1 /Tests/TestApp/src/TestTextureCreation.cpp | |
| parent | Brought back MapType paramter to UnmapBuffer() function. (diff) | |
| download | DiligentEngine-c7db634ec3e350b9cf665ec0f75455189a8eaace.tar.gz DiligentEngine-c7db634ec3e350b9cf665ec0f75455189a8eaace.zip | |
Added explicit state transition control to CopyBuffer and CopyTexture methods
Replaced CLEAR_RENDER_TARGET_TRANSITION_MODE with RESOURCE_STATE_TRANSITION_MODE
Diffstat (limited to 'Tests/TestApp/src/TestTextureCreation.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestTextureCreation.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Tests/TestApp/src/TestTextureCreation.cpp b/Tests/TestApp/src/TestTextureCreation.cpp index 71efb5f..11a0a48 100644 --- a/Tests/TestApp/src/TestTextureCreation.cpp +++ b/Tests/TestApp/src/TestTextureCreation.cpp @@ -273,7 +273,8 @@ private: { // In D3D11 if CopySubresourceRegion is used with Multisampled or D3D11_BIND_DEPTH_STENCIL Resources, // then the whole Subresource must be copied. - m_pDeviceContext->CopyTexture(pTestTex2, 0, 0, nullptr, pTestTex, 0, 0, 0,0,0); + CopyTextureAttribs CopyAttribs(pTestTex2, RESOURCE_STATE_TRANSITION_MODE_TRANSITION, pTestTex, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); + m_pDeviceContext->CopyTexture(CopyAttribs); } else { @@ -285,7 +286,9 @@ private: SrcBox.MaxY = std::max(TexDesc.Height/3, SrcBox.MinY+1); SrcBox.MaxZ = ( TexDesc.Type == RESOURCE_DIM_TEX_3D ) ? std::max(TexDesc.Depth/3, SrcBox.MinZ+1) : 1; //pTestTex2->UpdateData(m_pDeviceContext, 0, 0, DstBox, SubResources[0]); - m_pDeviceContext->CopyTexture(pTestTex2, 0, 0, &SrcBox, pTestTex, 0, 0, 0,0,0); + CopyTextureAttribs CopyAttribs(pTestTex2, RESOURCE_STATE_TRANSITION_MODE_TRANSITION, pTestTex, RESOURCE_STATE_TRANSITION_MODE_TRANSITION); + CopyAttribs.pSrcBox = &SrcBox; + m_pDeviceContext->CopyTexture(CopyAttribs); } } |
