From b9dc23bb93d56293b505f20dfd30b57fa182cbac Mon Sep 17 00:00:00 2001 From: spencer-lunarg Date: Fri, 7 Jun 2024 09:45:01 -0500 Subject: [PATCH] layers: Fix CI --- layers/core_checks/cc_image.cpp | 21 ++++++++++----------- layers/core_checks/cc_render_pass.cpp | 4 +--- tests/unit/buffer_positive.cpp | 6 ++++-- tests/unit/subgroups.cpp | 2 +- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/layers/core_checks/cc_image.cpp b/layers/core_checks/cc_image.cpp index 4a257275c0e..5935b562b60 100644 --- a/layers/core_checks/cc_image.cpp +++ b/layers/core_checks/cc_image.cpp @@ -1216,16 +1216,6 @@ bool CoreChecks::PreCallValidateCmdClearAttachments(VkCommandBuffer commandBuffe } } - auto describe_color_count = [is_dynamic_rendering, &cb_state]() { - std::stringstream ss; - if (is_dynamic_rendering) { - ss << "VkRenderingInfo::colorAttachmentCount"; - } else { - ss << "pSubpasses[" << cb_state.GetActiveSubpass() << "].colorAttachmentCount"; - } - return ss.str(); - }; - if (aspect_mask & VK_IMAGE_ASPECT_METADATA_BIT) { const LogObjectList objlist(commandBuffer, cb_state.activeRenderPass->Handle()); skip |= LogError("VUID-VkClearAttachment-aspectMask-00020", objlist, attachment_loc.dot(Field::aspectMask), "is %s.", @@ -1240,7 +1230,16 @@ bool CoreChecks::PreCallValidateCmdClearAttachments(VkCommandBuffer commandBuffe const LogObjectList objlist(commandBuffer, cb_state.activeRenderPass->Handle()); skip |= LogError("VUID-vkCmdClearAttachments-aspectMask-07271", objlist, attachment_loc.dot(Field::colorAttachment), "is VK_ATTACHMENT_UNUSED, but aspectMask is VK_IMAGE_ASPECT_COLOR_BIT."); - } else if (clear_desc->colorAttachment >= color_attachment_count) { + } else if (clear_desc->colorAttachment >= color_attachment_count && color_attachment_count > 0) { + auto describe_color_count = [is_dynamic_rendering, &cb_state]() { + std::stringstream ss; + if (is_dynamic_rendering) { + ss << "VkRenderingInfo::colorAttachmentCount"; + } else { + ss << "pSubpasses[" << cb_state.GetActiveSubpass() << "].colorAttachmentCount"; + } + return ss.str(); + }; const LogObjectList objlist(commandBuffer, cb_state.activeRenderPass->Handle()); skip |= LogError("VUID-vkCmdClearAttachments-aspectMask-07271", objlist, attachment_loc.dot(Field::colorAttachment), diff --git a/layers/core_checks/cc_render_pass.cpp b/layers/core_checks/cc_render_pass.cpp index adc1a9727b9..37310c5735a 100644 --- a/layers/core_checks/cc_render_pass.cpp +++ b/layers/core_checks/cc_render_pass.cpp @@ -3973,9 +3973,7 @@ bool CoreChecks::InsideRenderPass(const vvl::CommandBuffer &cb_state, const Loca // routine should ONLY be called inside a render pass. bool CoreChecks::OutsideRenderPass(const vvl::CommandBuffer &cb_state, const Location &loc, const char *vuid) const { bool outside = false; - if ((cb_state.IsPrimary() && (!cb_state.activeRenderPass)) || - (cb_state.IsSeconary() && (!cb_state.activeRenderPass) && - !(cb_state.beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT))) { + if (!cb_state.activeRenderPass && !(cb_state.beginInfo.flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT)) { outside = LogError(vuid, cb_state.Handle(), loc, "This call must be issued inside an active render pass."); } return outside; diff --git a/tests/unit/buffer_positive.cpp b/tests/unit/buffer_positive.cpp index d9579971a52..4979043d278 100644 --- a/tests/unit/buffer_positive.cpp +++ b/tests/unit/buffer_positive.cpp @@ -87,7 +87,8 @@ TEST_F(PositiveBuffer, TexelBufferAlignmentIn13) { CreateBufferViewTest(*this, &buff_view_ci, {}); } -TEST_F(PositiveBuffer, PerfGetBufferAddressWorstCase) { +// The two PerfGetBufferAddress tests are intended to be used locally to monitor performance of the internal address -> buffer map +TEST_F(PositiveBuffer, DISABLED_PerfGetBufferAddressWorstCase) { TEST_DESCRIPTION("Add elements to buffer_address_map, worst case scenario"); SetTargetApiVersion(VK_API_VERSION_1_1); @@ -130,7 +131,8 @@ TEST_F(PositiveBuffer, PerfGetBufferAddressWorstCase) { } } -TEST_F(PositiveBuffer, PerfGetBufferAddressGoodCase) { +// The two PerfGetBufferAddress tests are intended to be used locally to monitor performance of the internal address -> buffer map +TEST_F(PositiveBuffer, DISABLED_PerfGetBufferAddressGoodCase) { TEST_DESCRIPTION("Add elements to buffer_address_map, good case scenario"); SetTargetApiVersion(VK_API_VERSION_1_1); diff --git a/tests/unit/subgroups.cpp b/tests/unit/subgroups.cpp index 3c594fdcaf4..a28fafe8781 100644 --- a/tests/unit/subgroups.cpp +++ b/tests/unit/subgroups.cpp @@ -276,7 +276,7 @@ TEST_F(NegativeSubgroup, PNextDisabled) { VkPhysicalDeviceSubgroupProperties subgroup_prop = vku::InitStructHelper(); VkPhysicalDeviceProperties2 props2 = vku::InitStructHelper(&subgroup_prop); - vk::GetPhysicalDeviceProperties2(gpu_, &props2); + vk::GetPhysicalDeviceProperties2KHR(gpu_, &props2); } TEST_F(NegativeSubgroup, ExtendedTypesEnabled) {