layers: GH773 Check improper renderpass layout for only first use
Only verify that a LOAD_OP attachment does not have first layout of *READ_ONLY*
type on its first use. The spec language this is checking is from section
"7.1 Render Pass Creation" :
The first use of an attachment must not specify a layout equal to
VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
if the attachment specifies that the loadOp is VK_ATTACHMENT_LOAD_OP_CLEAR.
Previously we were checking this condition on all uses of an attachment
which would incorrectly flag errors on proper uses beyond the first use by
later subpasses.
Note that validation for CreateRenderPass has a fair amount of duplication and
still needs to be cleaned up to consolidate work that's currently being done
before and after the call down the chain. This is simply a singular bug fix.