layers: GH849: Defend against poorly-written applications
authorIan Elliott <ianelliott@google.com>
Wed, 24 Aug 2016 17:30:45 +0000 (11:30 -0600)
committerIan Elliott <ianelliott@google.com>
Wed, 24 Aug 2016 22:21:56 +0000 (16:21 -0600)
commited59f841f0499529a292c1206766471a5a69121e
treebed28b55f62cdead12d9adf7651828b857505db2
parentd0a33d72b45719cde2f7a5c74333e3d45b16e984
layers: GH849: Defend against poorly-written applications

A test application was written that didn't properly call some count-based query
commands.  In this particular case, they always hard-coded the count variable
to 1 the 2nd time the query was called.  The swapchain layer was only recording
the 1st count value in this case, and this caused a seg fault when the
vkCreateSwapchainKHR command validation code was run.

This commit better defends against such poorly-written applications, so that
the vkCreateSwapchainKHR command validation code won't seg fault.  This
includes looking for VK_INCOMPLETE as a successful return code from the ICD.
layers/swapchain.cpp