From 2727b6278b8b7ddb29936a7cd3199aa249890e78 Mon Sep 17 00:00:00 2001 From: Eugene Golushkov Date: Wed, 25 Sep 2024 02:30:28 +0200 Subject: [PATCH] [Vk] Fixed Validation Error: [ VUID-VkPresentInfoKHR-pImageIndices-01430 ] vkQueuePresentKHR(): pPresentInfo->pSwapchains[0] images passed to present must be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. --- OgreMain/include/Compositor/OgreCompositorWorkspace.h | 2 +- OgreMain/src/Compositor/OgreCompositorWorkspace.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/OgreMain/include/Compositor/OgreCompositorWorkspace.h b/OgreMain/include/Compositor/OgreCompositorWorkspace.h index cb990a0c434..ac60f53f87d 100644 --- a/OgreMain/include/Compositor/OgreCompositorWorkspace.h +++ b/OgreMain/include/Compositor/OgreCompositorWorkspace.h @@ -159,7 +159,7 @@ namespace Ogre /// Only valid workspaces can update without crashing bool isValid() const { return mValid; } - void setEnabled( bool bEnabled ) { mEnabled = bEnabled; } + void setEnabled( bool bEnabled ); bool getEnabled() const { return mEnabled; } /** When building with OGRE_PROFILING enabled, setting this option to true diff --git a/OgreMain/src/Compositor/OgreCompositorWorkspace.cpp b/OgreMain/src/Compositor/OgreCompositorWorkspace.cpp index 208818a291e..5e0131b2403 100644 --- a/OgreMain/src/Compositor/OgreCompositorWorkspace.cpp +++ b/OgreMain/src/Compositor/OgreCompositorWorkspace.cpp @@ -737,6 +737,15 @@ namespace Ogre return finalTarget; } //----------------------------------------------------------------------------------- + void CompositorWorkspace::setEnabled( bool bEnabled ) + { + if( mEnabled != bEnabled ) + { + mEnabled = bEnabled; + _notifyBarriersDirty(); + } + } + //----------------------------------------------------------------------------------- void CompositorWorkspace::_notifyBarriersDirty() { getCompositorManager()->_notifyBarriersDirty(); } //----------------------------------------------------------------------------------- CompositorManager2 *CompositorWorkspace::getCompositorManager()