Skip to content

Commit 8655f6d

Browse files
committed
cameraview.cc: call glFlush after creating fence
1 parent 5264485 commit 8655f6d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

selfdrive/ui/qt/widgets/cameraview.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ void CameraViewWidget::vipcThread() {
309309
assert(glGetError() == GL_NO_ERROR);
310310

311311
wait_fence.reset(new WaitFence());
312+
313+
// Ensure the fence is in the GPU command queue, or waiting on it might block
314+
// https://www.khronos.org/opengl/wiki/Sync_Object#Flushing_and_contexts
315+
glFlush();
312316
}
313317
latest_texture_id = buf->idx;
314318
}

0 commit comments

Comments
 (0)