This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[GLES] Render thread is blocked on glMapbufferRanger when render thread waits on worker thread with glWaitSync


Environment - Odin MC10 

 We meet the issue like the title, and the flow is below.

Render and worker thread shares the context.

We expect the render thread waits on APIs like glBindframebuffer/glClear/eglswapbuffer etc… that APIs trigger GPU HW.

Render thread now is blocked in glMapbufferrange(GL_PIXEL_PACK_BUFFER, GL_MAP_READ_BIT).

We think this API only waits on resources, not GPU workload.

We’re confusing why it’s blocked here.

Please help on this :P

  • The glMapBufferRange call will block until the mapped resource is no longer used by a pending rendering command unless you specify GL_MAP_UNSYNCHRONIZED_BIT (but you then have to manage synchronization yourself).