Skip to content

Commit

Permalink
Merge branch 'OGRECave:master' into mosfet80-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mosfet80 authored Dec 30, 2024
2 parents 818af59 + 16a9c7b commit 9498145
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
21 changes: 11 additions & 10 deletions OgreMain/src/OgreRenderQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,20 @@ namespace Ogre
//-----------------------------------------------------------------------
void RenderQueue::_releaseManualHardwareResources()
{
assert( mUsedIndirectBuffers.empty() );

IndirectBufferPackedVec::const_iterator itor = mFreeIndirectBuffers.begin();
IndirectBufferPackedVec::const_iterator endt = mFreeIndirectBuffers.end();

while( itor != endt )
for( IndirectBufferPacked *buf : mUsedIndirectBuffers )
{
if( ( *itor )->getMappingState() != MS_UNMAPPED )
( *itor )->unmap( UO_UNMAP_ALL );
mVaoManager->destroyIndirectBuffer( *itor );
++itor;
if( buf->getMappingState() != MS_UNMAPPED )
buf->unmap( UO_UNMAP_ALL );
mVaoManager->destroyIndirectBuffer( buf );
}
mUsedIndirectBuffers.clear();

for( IndirectBufferPacked *buf : mFreeIndirectBuffers )
{
if( buf->getMappingState() != MS_UNMAPPED )
buf->unmap( UO_UNMAP_ALL );
mVaoManager->destroyIndirectBuffer( buf );
}
mFreeIndirectBuffers.clear();
}
//-----------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ namespace Ogre
mCurrentAutoParamsBufferPtr = 0;
mCurrentAutoParamsBufferSpaceLeft = 0;

mDevice->stall();
if( !mDevice->isDeviceLost() )
mDevice->stall();
}
//-------------------------------------------------------------------------
void VulkanRenderSystem::destroyVkResources1()
Expand Down

0 comments on commit 9498145

Please sign in to comment.