mirror of https://github.com/mosra/magnum.git
Browse Source
Version query. Such a simple and obvious thing and because they forgot to add such function to Vulkan 1.0, the only three possible ways to retrieve a version retrieval function are: 1. with a static constructor that could make a library crash even before main() is reached if the driver is *extra* shitty 2. with a init() function that would cause race conditions if ever called from multiple threads (which of course can happen because you need to know instance version in order to use the correct function pointers and route pNext fields) 3. with a init() function that internally uses std::mutexes and std::call_once and <functional> and atomics and whatnot and thus takes longer to compile than the rest of the engine Approach 2 chosen originally but the race condition countermeasures turned out to be extra annoying to use, so switched to approach 1 now.pull/234/head
4 changed files with 9 additions and 27 deletions
Loading…
Reference in new issue