There was a nasty issue when moving the Device -- because the Queue
instances are populated with the Device pointer in the constructor,
moving the Device makes the Queue device pointer invalid and those
instances are useless. Discovered this when using VulkanTester to test
an upcoming Queue::submit() -- until then, the Device pointer in the
Queue wasn't really used for anything and so this wasn't known.
Making the Device immovable is thus the only sane way to keep the
current Queue retrieval workflow, which I'd say is much cleaner than
having to manually query the device for queues later using some
error-prone indices and whatnot. On the other hand, this finally makes
it possible to have a failable device creation, instead of the device
creation failing on an assert (or failing silently when
CORRADE_NO_ASSERT is defined). This is consistent with how the GL
wrapper works.
Also, because all device-dependent objects need to keep a pointer to the
originating Device in order to access Vulkan function pointers, having
it immovable makes it considerably faster. I'll make Instance immovable
with tryCreate() next because it seems like a good thing to do there as
well.
Mostly for consistency with everything else. If it proves to be
annoying, it can get removed again -- but suddenly realizing it's needed
would be much more painful and breaking user code.
Probably a leftover from a refactoring during the initial
implementation. The whole loop is just an assert, so don't compile it
when assertions are disabled.
I was hesitating a bit with the <chrono> include but I can't think of
anything better right now. It's "only" 4k lines on C++11 (and I bet most
of it is <type_traits>), so should be fine.
Well, no wonder it OOMs with 38 parallel jobs on ~10-20 GB RAM depending
on how the VMs are loaded, heh. Will revisit when I get rid of more STL,
this has to suffice for now.
The 5000-line monster took 3.3 second and over 320 MB to compile. While
that may be fine for other projects, that's completely unacceptable here
-- and it seems that this one test is the cause for most of the recent
OOM issues on the CI.
Moreover, I'll be expanding MaterialData with thinfilm, sheen and other
properties that got recently added to glTF and expanding a single test
file with those simply wouldn't scale anymore.