mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
egl: Always record error code.
The error code denotes the success or failure of the most recent function call. A call to _eglError should always update the error code.
This commit is contained in:
parent
aed7358e54
commit
3dee01a692
1 changed files with 5 additions and 4 deletions
|
|
@ -248,19 +248,20 @@ _eglGetCurrentContext(void)
|
|||
|
||||
|
||||
/**
|
||||
* Record EGL error code.
|
||||
* Record EGL error code and return EGL_FALSE.
|
||||
*/
|
||||
EGLBoolean
|
||||
_eglError(EGLint errCode, const char *msg)
|
||||
{
|
||||
_EGLThreadInfo *t = _eglGetCurrentThread();
|
||||
const char *s;
|
||||
|
||||
if (t == &dummy_thread)
|
||||
return EGL_FALSE;
|
||||
|
||||
if (t->LastError == EGL_SUCCESS) {
|
||||
t->LastError = errCode;
|
||||
t->LastError = errCode;
|
||||
|
||||
if (errCode != EGL_SUCCESS) {
|
||||
const char *s;
|
||||
|
||||
switch (errCode) {
|
||||
case EGL_BAD_ACCESS:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue