@@ -12424,7 +12424,8 @@ TEST_F(VkLayerTest, NumSamplesMismatch) {
1242412424TEST_F(VkLayerTest, RenderPassIncompatible) {
1242512425 TEST_DESCRIPTION(
1242612426 "Hit RenderPass incompatible cases. "
12427- "Initial case is drawing with an active renderpass that's "
12427+ "First attempt BeginRenderPass() with incompatible FrameBuffer,"
12428+ "then attempt to draw with an active renderpass that's "
1242812429 "not compatible with the bound pipeline state object's creation renderpass");
1242912430 VkResult err;
1243012431
@@ -12495,17 +12496,20 @@ TEST_F(VkLayerTest, RenderPassIncompatible) {
1249512496 rpbi.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
1249612497 rpbi.framebuffer = m_framebuffer;
1249712498 rpbi.renderPass = rp;
12499+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_12000710);
1249812500 vkCmdBeginRenderPass(m_commandBuffer->handle(), &rpbi, VK_SUBPASS_CONTENTS_INLINE);
12501+ m_errorMonitor->VerifyFound();
12502+ // Now we want to bind the RenderPass to trigger Draw-time error so allow the error for this call
12503+ // The better way to do this to avoid the error would be to create separate FB with compatible RP
12504+ // and use that FB for this begin instead of m_framebuffer
12505+ m_errorMonitor->SetUnexpectedError("vkCmdBeginRenderPass(): RenderPasses incompatible between ");
12506+ vkCmdBeginRenderPass(m_commandBuffer->handle(), &rpbi, VK_SUBPASS_CONTENTS_INLINE);
12507+ // m_errorMonitor->VerifyFound();
1249912508 vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle());
1250012509
1250112510 m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1a200366);
1250212511 // Render triangle (the error should trigger on the attempt to draw).
1250312512 m_commandBuffer->Draw(3, 1, 0, 0);
12504-
12505- // Finalize recording of the command buffer
12506- m_commandBuffer->EndRenderPass();
12507- m_commandBuffer->end();
12508-
1250912513 m_errorMonitor->VerifyFound();
1251012514
1251112515 vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL);
0 commit comments