layers: GH544 Allow INVALID cmd buffers to be reset
authorTobin Ehlis <tobine@google.com>
Mon, 16 May 2016 17:23:01 +0000 (11:23 -0600)
committerTobin Ehlis <tobine@google.com>
Wed, 18 May 2016 15:06:23 +0000 (09:06 -0600)
commitfc39c5b846aecadfc7134ebeb8a26d4a16556f26
treedf7bda17871bea7f25d894f6a4f5d5533c93fbea
parentbe8751322d1c4e175fa40cb8c1a23a65f3db3c4a
layers: GH544 Allow INVALID cmd buffers to be reset

BeginCommandBuffer performs an implicit reset of a command buffer.
This allows command buffers in the INVALID state to undergo this
implicit reset.

In order to make sure that an invalid command buffer in the INVALID
state has had EndCommandBuffer called, this commit adds a CMD_END
command that's inserted at the end of a command. If a command buffer
in the INVALID state has had EndCommandBuffer called and it is now
having BeginCommandBuffer called, it's ok to implicitly reset the
command buffer.
buffer's vector of commands.
layers/core_validation.cpp
layers/core_validation.h