MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GlSyncWait

Function GlSyncWait

tensorflow/lite/delegates/gpu/gl/gl_sync.cc:28–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace gl {
27
28Status GlSyncWait() {
29 GlSync sync;
30 RETURN_IF_ERROR(GlSync::NewSync(&sync));
31 // Flush sync and loop afterwards without it.
32 GLenum status = glClientWaitSync(sync.sync(), GL_SYNC_FLUSH_COMMANDS_BIT,
33 /* timeout ns = */ 0);
34 while (true) {
35 switch (status) {
36 case GL_TIMEOUT_EXPIRED:
37 break;
38 case GL_CONDITION_SATISFIED:
39 case GL_ALREADY_SIGNALED:
40 return OkStatus();
41 case GL_WAIT_FAILED:
42 return GetOpenGlErrors();
43 }
44 status = glClientWaitSync(sync.sync(), 0, /* timeout ns = */ 10000000);
45 }
46 return OkStatus();
47}
48
49Status GlActiveSyncWait() {
50 GlSync sync;

Callers

nothing calls this directly

Calls 3

OkStatusFunction · 0.85
GetOpenGlErrorsFunction · 0.85
syncMethod · 0.45

Tested by

no test coverage detected