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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
3,247 次查看
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 解答
2,211 次查看
pacosandoval
Senior Contributor II
0 项奖励
回复
4 回复数
2,211 次查看
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?

2,211 次查看
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 项奖励
回复
2,211 次查看
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 项奖励
回复
2,212 次查看
pacosandoval
Senior Contributor II
0 项奖励
回复