Skip to content

Commit

Permalink
Merge branch 'v2-3'
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Sep 12, 2023
2 parents 888e3e0 + 4efe057 commit 6ca0bde
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions RenderSystems/Vulkan/src/OgreVulkanQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1066,10 +1066,14 @@ namespace Ogre
if( mEncoderState == EncoderCopyOpen )
{
bool needsToFlush = false;
bool mustRemoveFromBarrier = false;
TextureGpuDownloadMap::const_iterator itor = mCopyDownloadTextures.find( texture );

if( itor != mCopyDownloadTextures.end() )
{
needsToFlush = true;
mustRemoveFromBarrier = true;
}
else
{
FastArray<TextureGpu *>::const_iterator it2 =
Expand All @@ -1087,6 +1091,14 @@ namespace Ogre
OGRE_ASSERT_LOW( texture->mCurrLayout == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL ||
texture->mCurrLayout == VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL );
endCopyEncoder();

if( mustRemoveFromBarrier )
{
// endCopyEncoder() just called solver.assumeTransition() on this texture
// but we're destroying the texture. Remove the dangling pointer.
BarrierSolver &solver = mRenderSystem->getBarrierSolver();
solver.textureDeleted( texture );
}
}
}
}
Expand Down

0 comments on commit 6ca0bde

Please sign in to comment.