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.