layers: MR139, draw_state VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT checks
authorTobin Ehlis <tobine@google.com>
Fri, 15 Jan 2016 20:34:44 +0000 (13:34 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Fri, 22 Jan 2016 20:49:50 +0000 (13:49 -0700)
commite22b00057b9d0de018e364c12707ce77abed6b86
treed4d1510c0bdefd02e62b6be548755ede0a8ef6cf
parent8da0d32769f16ee5151ee45772e4887e73416ca6
layers: MR139, draw_state VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT checks

Added a set to track which secondary cmdBuffers are contained within a primary cmdBuffer.
Added new DRAWSTATE_INVALID_CB_SIMULTANEOUS_USE enum value for new error/warning
cases, along with line in documentation.
New validation issues and state updates are listed below.

While tracking cmdBuffers at QueueSubmit time:
 1. Flag an error if a cmdBuffer is already in flight and does not have
    VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set
 2. Account for tracking of secondary cmdBuffers (and their in_use resources)
    that are submitted within a primary command buffer

When submitting secondary command buffers into primary command buffer at
    CmdExecuteCommands time:
 1. Flag an error if secondary cmdBuffer is in flight and doesn't have
 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set.
 2. Warn user if secondary cmdBuffer doesn't have
 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set but primary cmdBuffer does.
 This causes primary cmdBuffer to be treated as if
 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT isn't set.
 3. Add secondary cmdBuffers to set off of primary cmdBuffer for tracking purposes
 4. Add secondary cmdBuffers to inFlight set
layers/draw_state.cpp
layers/draw_state.h
layers/vk_validation_layer_details.md