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 Oct 19, 2023
2 parents 6085437 + 651759e commit b065174
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions RenderSystems/Vulkan/src/OgreVulkanRenderPassDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,17 +694,23 @@ namespace Ogre
//-----------------------------------------------------------------------------------
void VulkanRenderPassDescriptor::notifySwapchainCreated( VulkanWindow *window )
{
if( mNumColourEntries > 0 && mColour[0].texture->isRenderWindowSpecific() &&
mColour[0].texture == window->getTexture() )
if( mNumColourEntries > 0 &&
( ( mColour[0].texture && mColour[0].texture->isRenderWindowSpecific() &&
mColour[0].texture == window->getTexture() ) ||
( mColour[0].resolveTexture && mColour[0].resolveTexture->isRenderWindowSpecific() &&
mColour[0].resolveTexture == window->getTexture() ) ) )
{
entriesModified( RenderPassDescriptor::All );
}
}
//-----------------------------------------------------------------------------------
void VulkanRenderPassDescriptor::notifySwapchainDestroyed( VulkanWindow *window )
{
if( mNumColourEntries > 0 && mColour[0].texture->isRenderWindowSpecific() &&
mColour[0].texture == window->getTexture() )
if( mNumColourEntries > 0 &&
( ( mColour[0].texture && mColour[0].texture->isRenderWindowSpecific() &&
mColour[0].texture == window->getTexture() ) ||
( mColour[0].resolveTexture && mColour[0].resolveTexture->isRenderWindowSpecific() &&
mColour[0].resolveTexture == window->getTexture() ) ) )
{
releaseFbo();
}
Expand Down

0 comments on commit b065174

Please sign in to comment.