From c738b90da3d7da063e09f0c2ad6fea3de356da21 Mon Sep 17 00:00:00 2001 From: Aitor Camacho Date: Thu, 9 Nov 2023 15:16:10 -0700 Subject: [PATCH 1/2] layers: Fix check for VUID-07908 Extension and api version was missing from the check --- layers/core_checks/cc_render_pass.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layers/core_checks/cc_render_pass.cpp b/layers/core_checks/cc_render_pass.cpp index f3b711c08c9..149c4bb315c 100644 --- a/layers/core_checks/cc_render_pass.cpp +++ b/layers/core_checks/cc_render_pass.cpp @@ -3359,7 +3359,8 @@ bool CoreChecks::PreCallValidateCmdBeginRendering(VkCommandBuffer commandBuffer, string_VkImageCreateFlags(fragment_density_map_view_state->image_state->createInfo.flags).c_str()); } int32_t layer_count = static_cast(fragment_density_map_view_state->normalized_subresource_range.layerCount); - if (layer_count != 1) { + if (!IsExtEnabled(device_extensions.vk_khr_multiview) && (phys_dev_props.apiVersion < VK_API_VERSION_1_1) && + layer_count != 1) { const LogObjectList objlist(commandBuffer, fragment_density_map_attachment_info->imageView); skip |= LogError("VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-apiVersion-07908", objlist, view_loc, "must have a layer count (%" PRId32 ") equal to 1.", layer_count); From 9ead60adfe95b78d68088b2a1dab371f20f66a7a Mon Sep 17 00:00:00 2001 From: Aitor Camacho Date: Mon, 13 Nov 2023 13:12:20 +0100 Subject: [PATCH 2/2] tests: Fix VUID-07908 tests Remove VUID-07908 from NegativeDynamicRendering.RenderingFragmentDensityMapAttachment Account for VUID-07908 changes in NegativeDynamicRendering.FragmentDensityMapAttachmentLayerCount --- tests/unit/dynamic_rendering.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/dynamic_rendering.cpp b/tests/unit/dynamic_rendering.cpp index bad153d6f55..c41709c0d8e 100644 --- a/tests/unit/dynamic_rendering.cpp +++ b/tests/unit/dynamic_rendering.cpp @@ -3598,7 +3598,6 @@ TEST_F(NegativeDynamicRendering, RenderingFragmentDensityMapAttachment) { VkImageView image_view2 = image2.targetView(VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_ASPECT_COLOR_BIT, 0, VK_REMAINING_MIP_LEVELS, 0, VK_REMAINING_ARRAY_LAYERS, VK_IMAGE_VIEW_TYPE_2D_ARRAY); rendering_fragment_density.imageView = image_view2; - m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-apiVersion-07908"); m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-VkRenderingInfo-imageView-06109"); m_commandBuffer->BeginRendering(begin_rendering_info); m_errorMonitor->VerifyFound(); @@ -3680,8 +3679,8 @@ TEST_F(NegativeDynamicRendering, FragmentDensityMapAttachmentLayerCount) { VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT)) { GTEST_SKIP() << "VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT not supported"; } - if (!multiview_features.multiview) { - GTEST_SKIP() << "Test requires (unsupported) multiview"; + if (DeviceValidationVersion() != VK_API_VERSION_1_0) { + GTEST_SKIP() << "Tests for 1.0 only"; } InitRenderTarget(); @@ -3713,6 +3712,7 @@ TEST_F(NegativeDynamicRendering, FragmentDensityMapAttachmentLayerCount) { m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-apiVersion-07908"); m_commandBuffer->BeginRendering(begin_rendering_info); m_errorMonitor->VerifyFound(); + m_commandBuffer->EndRendering(); m_commandBuffer->end(); }