diff --git a/MobileGL/MG_Backend/Init.cpp b/MobileGL/MG_Backend/Init.cpp index e43607e3..1db6bbcc 100644 --- a/MobileGL/MG_Backend/Init.cpp +++ b/MobileGL/MG_Backend/Init.cpp @@ -96,7 +96,7 @@ namespace MobileGL::MG_Backend { // the apply thread reading client memory that has already moved, which renders wrong // rather than aborting. constexpr Bool kMGPipeP5eRunAheadReady = true; - constexpr Bool kMGPipeMagmaRunAheadReady = false; + constexpr Bool kMGPipeMagmaRunAheadReady = true; // The Magma transport now owns buffer stores and consumes their vertex, // index and shader binding records. Both backends publish the resource diff --git a/MobileGL/MG_IntegrationTest/Scenarios/MagmaRunAheadScenario.cpp b/MobileGL/MG_IntegrationTest/Scenarios/MagmaRunAheadScenario.cpp index 23fb5146..b2b66392 100644 --- a/MobileGL/MG_IntegrationTest/Scenarios/MagmaRunAheadScenario.cpp +++ b/MobileGL/MG_IntegrationTest/Scenarios/MagmaRunAheadScenario.cpp @@ -49,7 +49,7 @@ protected: ASSERT_EQ(Gl().BackendName(), "DirectVulkan"); const auto runtime = PeekSplitRuntime(); ASSERT_TRUE(runtime.peekAvailable && runtime.sessionActive && runtime.transportResolved); - ASSERT_TRUE(runtime.runAheadArmed) << "Magma production session did not arm run-ahead"; + RecordProperty("run_ahead_armed", runtime.runAheadArmed ? "1" : "0"); ASSERT_TRUE(runtime.presentCredit == 1 || runtime.presentCredit == 3); target = NewFbo(NewTexture(kWidth, kHeight, nullptr)); glBindFramebuffer(GL_FRAMEBUFFER, target); @@ -131,11 +131,13 @@ protected: glFinish(); ASSERT_TRUE(ArmSplitApplyHoldForTesting()); glClear(GL_COLOR_BUFFER_BIT); - ASSERT_TRUE(WaitForSplitApplyHoldForTesting()) << "server did not enter the scheduling hold"; + ASSERT_TRUE(WaitForSplitApplyHoldForTesting()) + << "the clear waited for apply instead of returning while its server batch was held"; held = PeekSplitRuntime(); } void ExpectQueued(unsigned int minimumRecords) { const auto now = PeekSplitRuntime(); + EXPECT_TRUE(now.runAheadArmed) << "Magma production session did not arm run-ahead"; EXPECT_TRUE(SplitApplyHoldIsActiveForTesting()) << "client waited for apply instead of running ahead"; EXPECT_EQ(now.appliedSeq, held.appliedSeq) << "held server advanced unexpectedly"; EXPECT_GE(now.emitSeq, held.emitSeq + minimumRecords);