Skip to content

Commit

Permalink
layers: Fix Multiview VU for 07908
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Mar 1, 2024
1 parent f29e86b commit 5add1c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion layers/core_checks/cc_render_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3303,7 +3303,7 @@ bool CoreChecks::ValidateBeginRenderingFragmentDensityMap(VkCommandBuffer comman
string_VkImageCreateFlags(fragment_density_map_view_state->image_state->createInfo.flags).c_str());
}
int32_t layer_count = static_cast<int32_t>(fragment_density_map_view_state->normalized_subresource_range.layerCount);
if (layer_count != 1) {
if (layer_count != 1 && !enabled_features.multiview) {
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);
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/dynamic_rendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3422,7 +3422,6 @@ TEST_F(NegativeDynamicRendering, RenderingFragmentDensityMapAttachment) {
vkt::Image image2(*m_device, image_create_info, vkt::set_layout);
vkt::ImageView image_view2 = image2.CreateView(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();
Expand Down Expand Up @@ -3496,7 +3495,6 @@ TEST_F(NegativeDynamicRendering, FragmentDensityMapAttachmentCreateFlags) {
TEST_F(NegativeDynamicRendering, FragmentDensityMapAttachmentLayerCount) {
TEST_DESCRIPTION("Use VkRenderingFragmentDensityMapAttachmentInfoEXT with invalid layer count");
AddRequiredExtensions(VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME);
AddRequiredFeature(vkt::Feature::multiview);
RETURN_IF_SKIP(InitBasicDynamicRendering());

if (!FormatFeaturesAreSupported(gpu(), VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_TILING_OPTIMAL,
Expand Down Expand Up @@ -3528,6 +3526,7 @@ TEST_F(NegativeDynamicRendering, FragmentDensityMapAttachmentLayerCount) {

m_commandBuffer->begin();
m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-apiVersion-07908");
m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-VkRenderingInfo-multiview-06127");
m_commandBuffer->BeginRendering(begin_rendering_info);
m_errorMonitor->VerifyFound();
m_commandBuffer->end();
Expand Down

0 comments on commit 5add1c5

Please sign in to comment.