layers: MR178, Fix descriptor set in_use tracking
authorTobin Ehlis <tobine@google.com>
Mon, 25 Jan 2016 06:25:31 +0000 (23:25 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Fri, 29 Jan 2016 17:11:01 +0000 (10:11 -0700)
commit01d33c4e0be7b860e52d72424eba1d75e8fe946e
tree30e3d3c2aceeb21bffdd86fd4f6fb2793c143dbb
parent5c9cb2533c71824c1b01868ed2422b74db0971f8
layers: MR178, Fix descriptor set in_use tracking

This breaks descriptor set validation into two cases:
1. If a descriptor set is being used in an in-flight command buffer, immediately
flag an error if that set is destroyed or updated.
2. If a descriptor set bound to a command buffer (but not in-flight) is updated
or destroyed, mark that command buffer as "INVALID" and flag an error if such a
command buffer is submitted.

Fix vkWaitForFences() code to not do any cleanup for the case where some, but not
all, command buffer fences have completed. In this case the app will have to either
check individual fences or use waitAll flag so we will clean up at that point.
layers/draw_state.cpp
layers/draw_state.h