mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Test] (MG_Remote): read the fence counters before the fence exists, its report can beat a later snapshot
This commit is contained in:
@@ -130,10 +130,14 @@ namespace MGITest {
|
||||
if (!Ready()) return;
|
||||
const std::string why = SplitRuntimeSkipReason();
|
||||
if (!why.empty()) GTEST_SKIP() << why;
|
||||
// The counters are read BEFORE the fence exists: the server may report it while
|
||||
// glFenceSync's own record is still being applied, and a client call drains the event
|
||||
// ring, so a snapshot taken after glFenceSync could already include the report and the
|
||||
// delta below would read 0 for a fence that WAS reported (seen on the verify-split lane).
|
||||
const SplitRuntimeState before = PeekSplitRuntime();
|
||||
QueueWork();
|
||||
GLsync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
ASSERT_NE(sync, nullptr);
|
||||
const SplitRuntimeState before = PeekSplitRuntime();
|
||||
const auto start = Clock::now();
|
||||
GLenum status = GL_TIMEOUT_EXPIRED;
|
||||
while ((status = glClientWaitSync(sync, 0, 0)) == GL_TIMEOUT_EXPIRED &&
|
||||
|
||||
Reference in New Issue
Block a user