Skip to content

Commit 4b59bf2

Browse files
committed
Fix FenceGl wait
1 parent 34e2c2c commit 4b59bf2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pathfinder/gpu/gl/fence.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,8 @@ FenceGl::~FenceGl() {
99
}
1010

1111
void FenceGl::wait() const {
12-
// Wait indefinitely
13-
while (true) {
14-
GLenum wait_result = glClientWaitSync(fence, GL_SYNC_FLUSH_COMMANDS_BIT, GL_TIMEOUT_IGNORED);
15-
16-
if (wait_result == GL_ALREADY_SIGNALED || wait_result == GL_CONDITION_SATISFIED) {
17-
return;
18-
}
19-
}
12+
GLenum wait_result = glClientWaitSync(fence, GL_SYNC_FLUSH_COMMANDS_BIT, GL_TIMEOUT_IGNORED);
13+
assert(wait_result == GL_ALREADY_SIGNALED || wait_result == GL_CONDITION_SATISFIED);
2014
}
2115

2216
} // namespace Pathfinder

0 commit comments

Comments
 (0)