layers:Remove disturbed descriptor perf warning
authorTobin Ehlis <tobine@google.com>
Tue, 22 Aug 2017 19:11:23 +0000 (13:11 -0600)
committerTobin Ehlis <tobine@google.com>
Tue, 22 Aug 2017 20:36:40 +0000 (14:36 -0600)
Fixes #2020

Support from devs to remove this perf warning so just killing it.
Added a comment for future work where we can track which descriptors
are disturbed and reference that if a user attempts to use a
disturbed descriptor that isn't bound.

Also commented out associated test and filed #2022 to track enhancement
making note of disturbed descriptors if used unbound.

layers/core_validation.cpp
tests/layer_validation_tests.cpp

index 6088f81..9a6dd94 100644 (file)
@@ -5490,14 +5490,8 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer,
                     if (cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[i] &&
                         !verify_set_layout_compatibility(cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[i],
                                                          pipeline_layout, i, error_string)) {
-                        skip |= log_msg(
-                            dev_data->report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
-                            VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT,
-                            HandleToUint64(cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[i]), __LINE__, DRAWSTATE_NONE,
-                            "DS", "DescriptorSet 0x%" PRIxLEAST64
-                                  " previously bound as set #%u was disturbed by newly bound pipelineLayout (0x%" PRIxLEAST64 ")",
-                            HandleToUint64(cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[i]), i,
-                            HandleToUint64(layout));
+                        // TODO: Flag descriptor as disturbed and then if/when attempt to be used when unbound, note that it was
+                        // previously disturbed
                         cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[i] = VK_NULL_HANDLE;
                     }
                 }
index 4b78634..7f3cf16 100644 (file)
@@ -8225,11 +8225,12 @@ TEST_F(VkLayerTest, DescriptorSetCompatibility) {
     // First bind sets 0 & 1
     vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 2, &descriptorSet[0], 0,
                             NULL);
+    // TODO: Removed this perf warning and planning to update to only note disturbed descriptor when used unbound (See #2022)
     // 1. Disturb bound set0 by re-binding set1 w/ updated pipelineLayout
-    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, " previously bound as set #0 was disturbed ");
-    vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_bad_set0, 1, 1,
-                            &descriptorSet[1], 0, NULL);
-    m_errorMonitor->VerifyFound();
+//    m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, " previously bound as set #0 was disturbed ");
+//    vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe_layout_bad_set0, 1, 1,
+//                            &descriptorSet[1], 0, NULL);
+//    m_errorMonitor->VerifyFound();
 
     vkCmdBindDescriptorSets(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, 2, &descriptorSet[0], 0,
                             NULL);