Skip to content

Commit

Permalink
[Vk] write size of loaded or saved pipeline cache to log
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenegff committed Oct 10, 2024
1 parent 4a713b8 commit 7127253
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,18 @@ namespace Ogre
result = vkCreatePipelineCache( mActiveDevice->mDevice, &pipelineCacheCreateInfo,
nullptr, &pipelineCache );
if( VK_SUCCESS == result && pipelineCache != 0 )
{
std::swap( mActiveDevice->mPipelineCache, pipelineCache );
LogManager::getSingleton().logMessage( "[Vulkan] Pipeline cache loaded, " +
StringConverter::toString( buf.size() ) +
" bytes." );
}
else
{
LogManager::getSingleton().logMessage(
"[Vulkan] Pipeline cache loading failed. VkResult = " +
vkResultToString( result ) );
}
if( pipelineCache != 0 )
vkDestroyPipelineCache( mActiveDevice->mDevice, pipelineCache, nullptr );
}
Expand Down Expand Up @@ -567,7 +574,9 @@ namespace Ogre
hdr.dataHash = hashResult[0];

stream->write( buf.data(), buf.size() );
LogManager::getSingleton().logMessage( "[Vulkan] Pipeline cache saved." );
LogManager::getSingleton().logMessage( "[Vulkan] Pipeline cache saved, " +
StringConverter::toString( buf.size() ) +
" bytes." );
}
}
if( result != VK_SUCCESS )
Expand Down

0 comments on commit 7127253

Please sign in to comment.