@@ -12355,7 +12355,8 @@ TEST_F(VkLayerTest, NumSamplesMismatch) {
1235512355TEST_F(VkLayerTest, RenderPassIncompatible) {
1235612356 TEST_DESCRIPTION(
1235712357 "Hit RenderPass incompatible cases. "
12358- "Initial case is drawing with an active renderpass that's "
12358+ "First attempt BeginRenderPass() with incompatible FrameBuffer,"
12359+ "then attempt to draw with an active renderpass that's "
1235912360 "not compatible with the bound pipeline state object's creation renderpass");
1236012361 VkResult err;
1236112362
@@ -12426,17 +12427,20 @@ TEST_F(VkLayerTest, RenderPassIncompatible) {
1242612427 rpbi.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
1242712428 rpbi.framebuffer = m_framebuffer;
1242812429 rpbi.renderPass = rp;
12430+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_12000710);
1242912431 vkCmdBeginRenderPass(m_commandBuffer->handle(), &rpbi, VK_SUBPASS_CONTENTS_INLINE);
12432+ m_errorMonitor->VerifyFound();
12433+ // Now we want to bind the RenderPass to trigger Draw-time error so allow the error for this call
12434+ // The better way to do this to avoid the error would be to create separate FB with compatible RP
12435+ // and use that FB for this begin instead of m_framebuffer
12436+ m_errorMonitor->SetUnexpectedError("vkCmdBeginRenderPass(): RenderPasses incompatible between ");
12437+ vkCmdBeginRenderPass(m_commandBuffer->handle(), &rpbi, VK_SUBPASS_CONTENTS_INLINE);
12438+ // m_errorMonitor->VerifyFound();
1243012439 vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.handle());
1243112440
1243212441 m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, VALIDATION_ERROR_1a200366);
1243312442 // Render triangle (the error should trigger on the attempt to draw).
1243412443 m_commandBuffer->Draw(3, 1, 0, 0);
12435-
12436- // Finalize recording of the command buffer
12437- m_commandBuffer->EndRenderPass();
12438- m_commandBuffer->end();
12439-
1244012444 m_errorMonitor->VerifyFound();
1244112445
1244212446 vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL);
0 commit comments