Resolve a validation layer warnings on destruction order of Image/Buffer and bound DeviceMemory. (#1636)

This commit is contained in:
Andreas Süßenbach
2023-08-08 13:40:56 +02:00
committed by GitHub
parent 0e3e8967be
commit 87936f9bc8
6 changed files with 26 additions and 15 deletions

View File

@@ -78,6 +78,10 @@ int main( int /*argc*/, char ** /*argv*/ )
uniformDataBuffer.bindMemory( *uniformDataMemory, 0 );
// while all vk::raii objects are automatically destroyed on scope leave, the Buffer should to be destroyed before the bound DeviceMemory
// but the standard destruction order would destroy the DeviceMemory before the Buffer, so destroy the Buffer here
uniformDataBuffer.clear();
/* VULKAN_HPP_KEY_END */
}
catch ( vk::SystemError & err )