From c1a55a6e960acc0fa0611a9bce318156992f7968 Mon Sep 17 00:00:00 2001 From: John Zulauf Date: Mon, 29 Oct 2018 14:12:05 -0600 Subject: [PATCH] layers: Fix false error: push descriptor not set Prevent false positive regarding push descriptors that have been set, not being set. This fix avoids the false positive but adds no additional push descriptor validation. Change-Id: I9a75db913927742a1f39e92fbdb177a3ce081117 --- layers/core_validation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index dcc528381d9..fb69eec8072 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -1214,6 +1214,14 @@ static bool ValidateCmdBufDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_nod for (const auto &set_binding_pair : pPipe->active_slots) { uint32_t setIndex = set_binding_pair.first; + + // TODO -- remove this continue path when CmdPushDescriptorSet is implemented, for now it prevents a false positive + if ((setIndex < pipeline_layout.set_layouts.size()) && pipeline_layout.set_layouts[setIndex] && + pipeline_layout.set_layouts[setIndex]->IsPushDescriptor()) { + // Push descriptors currently don't record required state for this validation + continue; + } + // If valid set is not bound throw an error if ((state.boundDescriptorSets.size() <= setIndex) || (!state.boundDescriptorSets[setIndex])) { result |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,