Directly render to OpenGL/Vulkan

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Directly render to OpenGL/Vulkan

Postby x1ma » Sun Oct 21, 2018 9:47 am

Hi,

I try to create a vulkan experiment where CEF is rendered on top of a scene.
I got this working with VK_KHR_external_memory and GL_EXT_external_objects, though the performance is not optimal yet.

I manually copy CEF's texture into the GL texture (using glTexSubImage2D) which is shared with Vulkan, but it adds too much load on CPU and GPU.
I expected the dirtyRects in onPaint to be more precise (as shown https://blog.chromium.org/2017/01/performance-improvements-in-chromes.html, but they seem not. When there are animated HUDs in a game, I expect the performance to be unacceptable.

To get to my question, is it possible to share a texture without copying? I found PR #158, but it's using D3D11 and I'm wondering if there is a way to use OpenGL or directly Vulkan.

Having this option would be the holy grail for me!

Anyway, awesome project and thanks for your time :)
x1ma
Newbie
 
Posts: 3
Joined: Sun Oct 21, 2018 9:27 am

Re: Directly render to OpenGL/Vulkan

Postby magreenblatt » Sun Oct 21, 2018 10:58 am

Such functionality does not exist yet, but perhaps you can develop it based on the D3D11 surface sharing changes.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Directly render to OpenGL/Vulkan

Postby x1ma » Sun Oct 21, 2018 11:13 am

magreenblatt wrote:Such functionality does not exist yet, but perhaps you can develop it based on the D3D11 surface sharing changes.


D3D11 Vulkan interop seems possible: https://developer.nvidia.com/getting-vulkan-ready-vr

Is the file in tests/cefclient/browser/osr_d3d11_win.cc testing shared textures with D3D11?
x1ma
Newbie
 
Posts: 3
Joined: Sun Oct 21, 2018 9:27 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 21 guests