Skip to content

Commit d6b269b

Browse files
disable synchronization validation in examples due to Timeline Semaphore non-support
1 parent 9765466 commit d6b269b

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

include/nbl/video/surface/ISurface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ class ISurface : public core::IReferenceCounted
8383
hlsl::SurfaceTransform::FLAG_BITS currentTransform = hlsl::SurfaceTransform::FLAG_BITS::NONE;
8484
};
8585

86+
inline IAPIConnection* getAPIConnection() const { return m_api.get(); }
87+
8688
inline E_API_TYPE getAPIType() const { return m_api->getAPIType(); }
8789

8890
virtual bool isSupportedForPhysicalDevice(const IPhysicalDevice* dev, const uint32_t _queueFamIx) const = 0;

include/nbl/video/utilities/CSmoothResizeSurface.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,25 @@ class NBL_API2 ISmoothResizeSurface : public ISimpleManagedSurface
171171
}
172172

173173
protected:
174-
inline void setSwapchainRecreator() {static_cast<ICallback*>(m_cb)->m_recreator=this;}
175-
176-
using ISimpleManagedSurface::ISimpleManagedSurface;
174+
inline ISmoothResizeSurface(core::smart_refctd_ptr<ISurface>&& _surface, ICallback* _cb) : ISimpleManagedSurface(std::move(_surface),_cb)
175+
{
176+
auto api = getSurface()->getAPIConnection();
177+
auto dcb = api->getDebugCallback();
178+
if (api->getEnabledFeatures().synchronizationValidation && dcb)
179+
{
180+
auto logger = dcb->getLogger();
181+
if (logger)
182+
logger->log("You're about to get a ton of False Positive Synchronization Errors from the Validation Layer due it Ignoring Queue Family Ownership Transfers (https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/7024)",system::ILogger::ELL_WARNING);
183+
}
184+
}
177185
virtual inline ~ISmoothResizeSurface()
178186
{
179187
// stop any calls into explicit resizes
180188
deinit_impl();
181189
}
190+
191+
//
192+
inline void setSwapchainRecreator() {static_cast<ICallback*>(m_cb)->m_recreator=this;}
182193

183194
//
184195
inline void deinit_impl() override final
@@ -372,8 +383,6 @@ class NBL_API2 ISmoothResizeSurface : public ISimpleManagedSurface
372383

373384
// Because the surface can start minimized (extent={0,0}) we might not be able to create the swapchain right away, so store creation parameters until we can create it.
374385
ISwapchain::SSharedCreationParams m_sharedParams = {};
375-
376-
protected:
377386
// Have to use a second semaphore to make acquire-present pairs independent of each other, also because there can be no ordering ensured between present->acquire
378387
core::smart_refctd_ptr<ISemaphore> m_presentSemaphore;
379388
// Command Buffers for blitting/copying the Triple Buffers to Swapchain Images

0 commit comments

Comments
 (0)