layers:Bind descriptor pool to cmd buffer
Add pool state to DescriptorSet instead of just the pool.
Then, at bind time, create a dual binding between the cmd buffer
and the pool. This correcly puts pool in-use when cmd buffer is
submitted, as well as flagging cmd buffer as INVALID if/when the
pool is destroyed.
diff --git a/layers/descriptor_sets.h b/layers/descriptor_sets.h
index bc58082..8316bbb 100644
--- a/layers/descriptor_sets.h
+++ b/layers/descriptor_sets.h
@@ -374,7 +374,7 @@
void InvalidateBoundCmdBuffers();
bool some_update_; // has any part of the set ever been updated?
VkDescriptorSet set_;
- VkDescriptorPool pool_;
+ DESCRIPTOR_POOL_STATE *pool_state_;
const DescriptorSetLayout *p_layout_;
std::vector<std::unique_ptr<Descriptor>> descriptors_;
// Ptr to device data used for various data look-ups