Clear all EGL errors when entering EGL funcs.

This changes the clearError function in the EGL wrapper layer to simply
call eglGetError().  That should clear any pending errors from all the
underlying EGL implementations, which is needed to correctly report the
error for the most recently called EGL function.

Change-Id: Iad19c69f0c5305e873f3c2f96d353280d31f7b61
This commit is contained in:
Jamie Gennis 2011-01-30 16:50:04 -08:00
parent a2e8538a87
commit f1cde8e0ed
1 changed files with 3 additions and 4 deletions

View File

@ -389,10 +389,9 @@ static tls_t* getTLS()
}
static inline void clearError() {
if (gEGLThreadLocalStorageKey != -1) {
tls_t* tls = getTLS();
tls->error = EGL_SUCCESS;
}
// This must clear the error from all the underlying EGL implementations as
// well as the EGL wrapper layer.
eglGetError();
}
template<typename T>