tests: Track whether desc sets are allocated from dynamic pools

We are calling vkFree* on sets allocated in pools
created with usage *_ONE_SHOT.  Correct usage is clear in spec:

   The intended usage for the pool is specified in poolUsage. If
   poolUsage is VK_DESCRIPTOR_POOL_USAGE_DYNAMIC, then allocated
   descriptor sets may return their individual allocations to the
   pool, i.e. all of vkAllocDescriptorSets, vkFreeDescriptorSets,
   and vkResetDescriptorPool may be used. If poolUsage is
   VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT then descriptor sets allocated
   from the pool cannot be individually freed back to the pool,
   i.e. only vkAllocDescriptorSets and vkResetDescriptorPool may
   be used.

We need to track how a pool was created before deciding how
to treat desc sets within it.

This patch achieves it in the test framework, although it isn't
a natural fit for how things have worked so far.

object_tracker layer will throw errors until a follow up patch
adds similar functionality.
2 files changed