Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecc875e2 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 9c4d7d67: am 5c6c5c7a: fix [3028370] GL get error should return a valid...

am 9c4d7d67: am 5c6c5c7a: fix [3028370] GL get error should return a valid error if no context is bound.

Merge commit '9c4d7d67'

* commit '9c4d7d67':
  fix [3028370] GL get error should return a valid error if no context is bound.
parents 9c7bec25 9c4d7d67
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -453,6 +453,12 @@ static void gl_no_context() {
    }
}

// Always return GL_INVALID_OPERATION from glGetError() when called from
// a thread without a bound context.
static GLenum gl_no_context_glGetError() {
    return GL_INVALID_OPERATION;
}

static void early_egl_init(void) 
{
#if !USE_FAST_TLS_KEY
@@ -463,6 +469,9 @@ static void early_egl_init(void)
            (uint32_t*)(void*)&gHooksNoContext, 
            addr, 
            sizeof(gHooksNoContext));

    gHooksNoContext.gl.glGetError = gl_no_context_glGetError;

    setGlThreadSpecific(&gHooksNoContext);
}