layers: Enhancements to MemTracker and DrawState
DrawState flags error when Descriptor Set that hasn't had "EndUpdate" called is bound to cmd buffer.
Moved MemTracker struct defines to header.
Added State to memory objects and flag state transition errors at prepare time
Added CreateInfo for all object types that can be bound to memory
diff --git a/layers/draw_state.c b/layers/draw_state.c
index 0c4efc0..ded7279 100644
--- a/layers/draw_state.c
+++ b/layers/draw_state.c
@@ -1557,6 +1557,11 @@
{
if (getDS(descriptorSet)) {
assert(index < XGL_MAX_DESCRIPTOR_SETS);
+ if (dsUpdate(descriptorSet)) {
+ char str[1024];
+ sprintf(str, "You must call xglEndDescriptorSetUpdate(%p) before this call to xglCmdBindDescriptorSet()!", (void*)descriptorSet);
+ layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, descriptorSet, 0, DRAWSTATE_BINDING_DS_NO_END_UPDATE, "DS", str);
+ }
pthread_mutex_lock(&globalLock);
lastBoundDS[index] = descriptorSet;
lastBoundSlotOffset[index] = slotOffset;