am 5c6c5c7a: fix [3028370] GL get error should return a valid error if no context is bound.
Merge commit '5c6c5c7a43d44316395f5c35ab713372124b8b4c' into gingerbread-plus-aosp * commit '5c6c5c7a43d44316395f5c35ab713372124b8b4c': fix [3028370] GL get error should return a valid error if no context is bound.
This commit is contained in:
@@ -437,6 +437,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)
|
static void early_egl_init(void)
|
||||||
{
|
{
|
||||||
#if !USE_FAST_TLS_KEY
|
#if !USE_FAST_TLS_KEY
|
||||||
@@ -447,6 +453,9 @@ static void early_egl_init(void)
|
|||||||
(uint32_t*)(void*)&gHooksNoContext,
|
(uint32_t*)(void*)&gHooksNoContext,
|
||||||
addr,
|
addr,
|
||||||
sizeof(gHooksNoContext));
|
sizeof(gHooksNoContext));
|
||||||
|
|
||||||
|
gHooksNoContext.gl.glGetError = gl_no_context_glGetError;
|
||||||
|
|
||||||
setGlThreadSpecific(&gHooksNoContext);
|
setGlThreadSpecific(&gHooksNoContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user