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

Function GetEglError

tensorflow/lite/delegates/gpu/gl/gl_errors.cc:77–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77Status GetEglError() {
78 EGLint error = eglGetError();
79 switch (error) {
80 case EGL_SUCCESS:
81 return OkStatus();
82 case EGL_NOT_INITIALIZED:
83 return InternalError(
84 "EGL is not initialized, or could not be initialized, for the "
85 "specified EGL display connection.");
86 case EGL_BAD_ACCESS:
87 return InternalError(
88 "EGL cannot access a requested resource (for example a context is "
89 "bound in another thread).");
90 case EGL_BAD_ALLOC:
91 return InternalError(
92 "EGL failed to allocate resources for the requested operation.");
93 case EGL_BAD_ATTRIBUTE:
94 return InternalError(
95 "An unrecognized attribute or attribute value was passed in the "
96 "attribute list.");
97 case EGL_BAD_CONTEXT:
98 return InternalError(
99 "An EGLContext argument does not name a valid EGL rendering "
100 "context.");
101 case EGL_BAD_CONFIG:
102 return InternalError(
103 "An EGLConfig argument does not name a valid EGL frame buffer "
104 "configuration.");
105 case EGL_BAD_CURRENT_SURFACE:
106 return InternalError(
107 "The current surface of the calling thread is a window, pixel buffer "
108 "or pixmap that is no longer valid.");
109 case EGL_BAD_DISPLAY:
110 return InternalError(
111 "An EGLDisplay argument does not name a valid EGL display "
112 "connection.");
113 case EGL_BAD_SURFACE:
114 return InternalError(
115 "An EGLSurface argument does not name a valid surface (window, pixel "
116 "buffer or pixmap) configured for GL rendering.");
117 case EGL_BAD_MATCH:
118 return InternalError(
119 "Arguments are inconsistent (for example, a valid context requires "
120 "buffers not supplied by a valid surface).");
121 case EGL_BAD_PARAMETER:
122 return InternalError("One or more argument values are invalid.");
123 case EGL_BAD_NATIVE_PIXMAP:
124 return InternalError(
125 "A NativePixmapType argument does not refer to a valid native "
126 "pixmap.");
127 case EGL_BAD_NATIVE_WINDOW:
128 return InternalError(
129 "A NativeWindowType argument does not refer to a valid native "
130 "window.");
131 case EGL_CONTEXT_LOST:
132 return InternalError(
133 "A power management event has occurred. The application must destroy "
134 "all contexts and reinitialise OpenGL ES state and objects to "

Callers

nothing calls this directly

Calls 4

OkStatusFunction · 0.85
to_stringFunction · 0.85
InternalErrorFunction · 0.50
UnknownErrorFunction · 0.50

Tested by

no test coverage detected