How to mix vulkan and opengl in the same render thread in Android ?

278 views
Skip to first unread message

yu guitao

unread,
Jun 13, 2017, 9:47:47 AM6/13/17
to Graphics-dev
Hi,

I got the Android O preview version, and enable vulkan back-end for Android hwui, actually it is already supported by google, I just modify some configurations. Then I got a bit performance improvement. But when I do full test, one critical issue occurred: some webview page can not show, the page is full of RED color, and other android ui is still ok. Please see the below diagram:



I heard Chromium already start Vulkan integration from 2016.3, but is postponed because of some performance gain and gpu architecture issues. Now, the vulkan working group move to long term "raster transport" solution which used to enable vulkan. So, is there any plan to launch it in android webview side ? Any schedule ?

From now on, I change my way to enable parallel vulkan and opengl backend in android's render thread, or use two threads or each context. It is possible to fix it ?

BRs,
Yu Guitao

Bo Liu

unread,
Jun 13, 2017, 9:54:41 AM6/13/17
to yu guitao, Graphics-dev, android-webview-dev
vulkan remains unimlemented in webview. no plans to share

Roger Yi

unread,
Jun 14, 2017, 9:53:41 PM6/14/17
to Graphics-dev
Because WebView's parent compositor and its context both run on android render thread, they share textures through eglimage with chromium's in-process gpu thread. So, it vulkan can share textures through eglimage with gl context, I think it is not difficult to implement a vulkan backing context (command buffer service) used by WebView's parent compositor and keep the others unchanged (child cc, gpu rasterize, webgl, canvas, video, etc...).

在 2017年6月13日星期二 UTC+8下午9:47:47,yu guitao写道:

yu guitao

unread,
Jun 16, 2017, 6:49:07 PM6/16/17
to Graphics-dev

Thanks for your kindly suggestion. I add two modules in upper diagram: GL-> Vulkan, Vulkan Decorder. Because all the pipeline now is using GLES2, if I change something in the pipeline, that means I need to make a parallel Vulkan parser, such as: InProcessCommandBuffer, DeferredGpuCommandService, OpenGLRenderer, HardwareRenderer ... 
So, what about just add a convertor(GL->Vulkan) and vulkan decorder at the end of pipeline ?   Is there any efficient way to do this job ?

BRs,
Yu Guitao
Reply all
Reply to author
Forward
0 new messages