aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorCody Northrop <cnorthrop@google.com>2016-05-09 16:15:57 -0600
committerTobin Ehlis <tobine@google.com>2016-05-12 17:46:33 -0600
commit24fb95c922188b59a1bbf4839ee315266ccbb40c (patch)
tree37cddf918bd45e5295d4b4278e5c506741608d68 /layers/core_validation.cpp
parent743b48215ad6ef3a6cbc876c6009df10dea47bbc (diff)
downloadusermoji-24fb95c922188b59a1bbf4839ee315266ccbb40c.tar.xz
layers: Determine whether command buffer can be ended with active render pass
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 9c33e629..236474e6 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -6182,6 +6182,11 @@ VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) {
std::unique_lock<std::mutex> lock(global_lock);
GLOBAL_CB_NODE *pCB = getCBNode(dev_data, commandBuffer);
if (pCB) {
+ if ((VK_COMMAND_BUFFER_LEVEL_PRIMARY == pCB->createInfo.level) || !(pCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)) {
+ // This needs spec clarification to update valid usage, see comments in PR:
+ // https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/pull/516#discussion_r63013756
+ skipCall |= insideRenderPass(dev_data, pCB, "vkEndCommandBuffer");
+ }
if (pCB->state != CB_RECORDING) {
skipCall |= report_error_no_cb_begin(dev_data, commandBuffer, "vkEndCommandBuffer()");
}