Skip to content

Commit

Permalink
layers: Fix dynamic state error message
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Jun 5, 2024
1 parent 9161600 commit 15380fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
21 changes: 9 additions & 12 deletions layers/core_checks/cc_pipeline_graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,18 +1489,15 @@ bool CoreChecks::ValidateGraphicsPipelineColorBlendAttachmentState(const vvl::Pi
const Location &color_loc) const {
bool skip = false;
const auto &attachment_states = pipeline.AttachmentStates();
if (attachment_states.empty()) {
return skip;
}
if (!enabled_features.independentBlend) {
if (attachment_states.size() > 1) {
for (size_t i = 1; i < attachment_states.size(); i++) {
if (!ComparePipelineColorBlendAttachmentState(attachment_states[0], attachment_states[i])) {
skip |= LogError("VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605", device,
color_loc.dot(Field::pAttachments, (uint32_t)i),
"is different than pAttachments[0] and independentBlend feature was not enabled.");
break;
}
if (attachment_states.empty()) return skip;

if (!enabled_features.independentBlend && attachment_states.size() > 1) {
for (size_t i = 1; i < attachment_states.size(); i++) {
if (!ComparePipelineColorBlendAttachmentState(attachment_states[0], attachment_states[i])) {
skip |= LogError("VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605", device,
color_loc.dot(Field::pAttachments, (uint32_t)i),
"is different than pAttachments[0] and independentBlend feature was not enabled.");
break;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions layers/state_tracker/cmd_buffer_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1871,13 +1871,13 @@ std::string CommandBuffer::GetDebugRegionName(const std::vector<LabelCommand> &l

std::string CommandBuffer::DescribeInvalidatedState(CBDynamicState dynamic_state) const {
std::stringstream ss;
if (dynamic_state_status.history[dynamic_state]) {
if (dynamic_state_status.history[dynamic_state] && !dynamic_state_status.cb[dynamic_state]) {
ss << " (There was a call to vkCmdBindPipeline";
if (auto pipeline = dev_data.Get<vvl::Pipeline>(invalidated_state_pipe[dynamic_state])) {
ss << " with " << dev_data.FormatHandle(*pipeline);
}
ss << " that didn't have the dynamic state and invalidated the prior " << DescribeDynamicStateCommand(dynamic_state)
<< " call)";
ss << " that didn't have " << DynamicStateToString(dynamic_state) << " and invalidated the prior "
<< DescribeDynamicStateCommand(dynamic_state) << " call)";
}
return ss.str();
}
Expand Down

0 comments on commit 15380fc

Please sign in to comment.