Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.

Commit

Permalink
layers:Remove disturbed descriptor perf warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tobine committed Aug 22, 2017
1 parent 57f0da9 commit 8440cb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
10 changes: 2 additions & 8 deletions layers/core_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
9 changes: 5 additions & 4 deletions tests/layer_validation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8440cb7

Please sign in to comment.