Add glUseProgram to the list of GL functions requiring synchronization
We have observed an internal deadlock in libGLESv2_adreno where one thread is in eglCreateContext and another thread in glUseProgram. We have observed similar deadlocks before and started to synchronize all access to the offending GL functions. Calls to eglCreateContext are already synchronized, and this CL synchronizes calls to glUseProgram as well. Bug: b/153513005 Change-Id: I576e564aab44c9e429f2b1407105ed72942c309e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173742 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31118}
This commit is contained in:
committed by
Commit Bot
parent
11f92bc81b
commit
f355e1a0f6
@ -114,7 +114,9 @@ public class GlShader {
|
||||
if (program == -1) {
|
||||
throw new RuntimeException("The program has been released");
|
||||
}
|
||||
GLES20.glUseProgram(program);
|
||||
synchronized (EglBase.lock) {
|
||||
GLES20.glUseProgram(program);
|
||||
}
|
||||
GlUtil.checkNoGLES2Error("glUseProgram");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user