From 08c63f77e283dea9eed8303b76750bd1709ca317 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 20 Sep 2026 10:20:36 -0400 Subject: [PATCH] [Test] wait for the drawing Present before sampling strict-arming statistics --- MobileGL/MG_IntegrationTest/Scenarios/TriangleScenario.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MobileGL/MG_IntegrationTest/Scenarios/TriangleScenario.cpp b/MobileGL/MG_IntegrationTest/Scenarios/TriangleScenario.cpp index 76cfa0c0..971aab1f 100644 --- a/MobileGL/MG_IntegrationTest/Scenarios/TriangleScenario.cpp +++ b/MobileGL/MG_IntegrationTest/Scenarios/TriangleScenario.cpp @@ -50,6 +50,7 @@ #include "../Harness/PipeStatsWindow.h" #include "../Harness/ScenarioFixture.h" #include "../Harness/SplitLane.h" +#include "../Harness/SplitRuntimePeek.h" #include "../Harness/WireLedgerChecks.h" #ifdef GLAPI @@ -358,6 +359,10 @@ void main() { oColor = vec4(vColor, 1.0); } EXPECT_EQ(FirstGLError(), 0u); ExpectTriangleInterior(image, "green", "the drawing frame the counters are taken over"); Gl().EndFrame(); + // Run-ahead returns from Present before its stats window is published. + // Wait for this emitted Present, so a fast client cannot sample the + // preceding empty setup frame and falsely report an unarmed server. + ASSERT_TRUE(WaitForSplitAppliedForTesting(PeekSplitRuntime().emitSeq)); const PipeStatsWindow::Window window = PipeStatsWindow::LastFromLaneLog(); ASSERT_TRUE(window.found)