Does iMX6 support shared resource(such as texture) between two egl context?

cancel
Showing results for 
Search instead for 
Did you mean: 

Does iMX6 support shared resource(such as texture) between two egl context?

Jump to solution
1,193 Views
rocwzp
Contributor II

Hi,

Currently I used Vivante OpenGLES 2.0 and EGL 1.4 library in i.MX6 platform, and I want to share resource(such as texture) between two egl context in one thread.

Here is what I am doing:

mSharedContext = eglCreateContext( mEglDisplay, mEglConfig, EGL_NO_CONTEXT, contextAttribs);

......

mMainContext = eglCreateContext( mEglDisplay, mEglConfig, mSharedContext , contextAttribs);


on the shared context, I call eglMakeCurrent() and render to a texture. The contenet of the texture is right.

on the main contexnt, I draw the texture which was rendered in shared context to the screen, but the screen is blank.


If I draw the texture on the shared context, I could see the context of the texture on the screen.


So I wonder whether i.MX6 platform or Vivante OpenGLES 2.0 library could support shared resources(such as texture) between two egl context.

Could anyone have any ideas about it?


Thanks,




1 Solution
157 Views
pacosandoval
Senior Contributor II
0 Kudos
4 Replies
157 Views
pacosandoval
Senior Contributor II

Hello,

As of our latest GPU driver, texture object sharing between context is supported. Frame Buffer Objects (FBO) are supported as well, but sharing Vertex Buffer Objects (VBO) is not supported.

Do you have a simple test case you could share so I can provide better help?

157 Views
rocwzp
Contributor II

Hi,

As you said, latest GPU driver support shared resource between contexts, but I still confuse the sharing relationship of two contexts.

I want to know whether the sharing releationship is bidirectional.

For example,

If mMainContext has texture object "T1" and mSharedContext has texture object "T2", I could use "T1" on mSharedContext and use "T2" on mMainContext.

Is it right? If not, which is right?


Thanks,

0 Kudos
157 Views
rocwzp
Contributor II

Hi,

Thanks for your reply.

All what I need is to share texture between context, so the latest GPU driver could satisfy my requirement.

But I don't have a simple test case for you to test till now.

Could you please tell me the version of Linux BSP which includes the latest GPU driver to support shared texture between context?

Thanks,

0 Kudos
158 Views
pacosandoval
Senior Contributor II
0 Kudos