aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-05-09 13:22:50 -0600
committerTobin Ehlis <tobine@google.com>2016-05-09 15:47:57 -0600
commite55e75356449d1418f586922ab7b52621b216dd3 (patch)
treeff1d0bf33c2b29cc214d46c25b83514e654fc078 /layers/core_validation.cpp
parenta12907853c1f73946c285f50e5564594a5d08c39 (diff)
downloadusermoji-e55e75356449d1418f586922ab7b52621b216dd3.tar.xz
layers: Update behavior for secondary cmdbuffers w/ *_SIMULTANEOUS_USE_BIT set
Spec clarification has been approved and secondary command buffers with VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT may be in flight in multiple primary command buffers at the same time. This changes updates the error concerning secondary command buffers to be in-flight on multiple primary command buffers to only appli if VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT is not set.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 0cdc4b09..ab6328b0 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -4502,12 +4502,14 @@ static bool validatePrimaryCommandBufferState(layer_data *dev_data, GLOBAL_CB_NO
for (auto secondaryCmdBuffer : pCB->secondaryCommandBuffers) {
skipCall |= validateAndIncrementResources(dev_data, dev_data->commandBufferMap[secondaryCmdBuffer]);
GLOBAL_CB_NODE *pSubCB = getCBNode(dev_data, secondaryCmdBuffer);
- if (pSubCB->primaryCommandBuffer != pCB->commandBuffer) {
+ if ((pSubCB->primaryCommandBuffer != pCB->commandBuffer) &&
+ !(pSubCB->beginInfo.flags & VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)) {
log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT, 0,
__LINE__, DRAWSTATE_COMMAND_BUFFER_SINGLE_SUBMIT_VIOLATION, "DS",
"CB %#" PRIxLEAST64 " was submitted with secondary buffer %#" PRIxLEAST64
" but that buffer has subsequently been bound to "
- "primary cmd buffer %#" PRIxLEAST64 ".",
+ "primary cmd buffer %#" PRIxLEAST64
+ " and it does not have VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set.",
reinterpret_cast<uint64_t>(pCB->commandBuffer), reinterpret_cast<uint64_t>(secondaryCmdBuffer),
reinterpret_cast<uint64_t>(pSubCB->primaryCommandBuffer));
}