[MG_Backend] (Disaggregated): arm Magma run-ahead after queued-state validation

This commit is contained in:
2026-09-20 04:33:01 -04:00
parent b010b5f0ac
commit 1164ff45b7
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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
@@ -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);