* This fixes a bug with granular command buffer resetting. On vulkan we assume
each command buffer owns the entirety of the pages it uses, so they can be
reset all together. However there's nothing to stop an application from
allocating from the same pool on the same thread interleaved to two command
buffers. It's unexpected because of the threading rules but perfectly legal.
* In this case we need to ensure that the command buffers have disjoint sets of
pages because they may not be reset together and one may be in used while
another is reset and even re-recorded over. This can't be achieved with a
single allocator, so instead we split the pool (that owns/provides/frees
pages) from the allocator (that grabs whole pages and suballocates for
chunks).
* When resetting pagesets in a granular fashion from the chunk allocator, it's
possible to almost (or completely) exhaust a page but not have it be bumped
out of the free list, then one more new full free pages is pushed. When that
free page is exhausted we'll retire it then assume the next one is usable -
but it is still not valid. We need to loop until we find a page with enough
space.
* During capture we hold the transition lock for writing, so we need to try to
lock that first (if we're going to) before locking the queue's lock. Otherwise
another thread could come in and get the queue's lock while we're holding the
transition lock, then we deadlock against each other.
* This by no means replaces PySide2, but it allows python extensions to write
simple UIs without needing to rely on PySide2, which might not be available
(generally all windows builds have it as well as recent binary linux builds,
but local windows builds may not and most linux builds probably won't).
* For separable programs we'll query out I/O bindings for e.g. only the geometry
pipeline, but we shouldn't try to set those outputs with
glBindFragDataLocation. Normally we'd expect these bindings to be queried as
-1 at capture time, but just be sure.
* Comma operator problems when doing math functions that return two parameters
(e.g quotient).
* Passing bool tag type through varargs - the varargs aren't actually used and
there's an overload for true_type, so we can instead accept false_type.
* gcc seems to declare numeric_limits as a struct, so friend'ing it as a class
throws a warning. Since we only care about C++11 we can omit the tag from the
friend declaration.