GPU Rendering fails when subprocess host path is specified

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

GPU Rendering fails when subprocess host path is specified

Postby callum » Tue Feb 23, 2021 8:43 pm

I am updating a CEF 81/Win64 based app to 88.0.4324.182

I believe the host helper process path name that is set via CefSettings::browser_subprocess_path needs to be an absolute path as of CEF 83 so I changed my code accordingly. In my test app, the host helper is along side the executable and things work as expected. In my main application, the code is in a DLL and the host helper is in a different directory. In this case, there are no crashes but nothing is rendered. The CEF log file contains:
Code: Select all
    [0223/172646.997:VERBOSE1:gpu_init.cc(354)] gl::init::InitializeStaticGLBindingsOneOff failed
    [0223/172647.009:ERROR:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization
    [0223/172647.168:VERBOSE1:gpu_init.cc(354)] gl::init::InitializeStaticGLBindingsOneOff failed
    [0223/172647.180:ERROR:viz_main_impl.cc(150)] Exiting GPU process due to errors during initialization
    [0223/172647.185:ERROR:browser_gpu_channel_host_factory.cc(168)] Failed to launch GPU process.


so I tried turning off the GPU via the --disable-gpu command line parameter. That makes things work correctly but WebGL pages no longer work of course and that's an issue for us.

I don't know of a way to try this configuration in cefclient - it uses itself for the host process if I remember correctly.

Is this maybe a known issue or is there a way I can try to debug what's going on ? I tried looking at the Chromium source https://chromium.googlesource.com/chrom ... nit.cc#354 but that didn't help *me* much.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: GPU Rendering fails when subprocess host path is specifi

Postby magreenblatt » Tue Feb 23, 2021 8:53 pm

Where is the sub-process exe relative to libcef.dll and the CEF resource files?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: GPU Rendering fails when subprocess host path is specifi

Postby callum » Tue Feb 23, 2021 9:38 pm

magreenblatt wrote:Where is the sub-process exe relative to libcef.dll and the CEF resource files?

They're all the same directory along with my DLL that contains the CEF code. The executable that loads my DLL is in a different directory.

I think I found a way to make it work but I'm not sure why - I don't ship the SwiftShader directory alongside everything else as per the README.txt
Code: Select all
* SwiftShader support.
  * swiftshader/libEGL.dll
  * swiftshader/libGLESv2.dll
  Without these files WebGL will not function in software-only mode when the GPU
  is not available or disabled.

since we don't care about software rendering but copying that over manually makes things work again.

Should that be there even if you don't need it or is there some rogue dependency?
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: GPU Rendering fails when subprocess host path is specifi

Postby magreenblatt » Tue Feb 23, 2021 9:45 pm

Does your test app render correctly without the swiftshader directory?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: GPU Rendering fails when subprocess host path is specifi

Postby callum » Tue Feb 23, 2021 11:03 pm

magreenblatt wrote:Does your test app render correctly without the swiftshader directory?


It does not. Fails in the same way (doesn't render anything but keeping running). If I navigate to a different URL after it starts, it appears to recover and behaves normally for the rest of the session. That is identical behavior to my main app.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: GPU Rendering fails when subprocess host path is specifi

Postby amaitland » Wed Feb 24, 2021 10:46 pm

What does chrome://gpu have to say if you load the url in a CefBrowser instance?
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: GPU Rendering fails when subprocess host path is specifi

Postby callum » Thu Feb 25, 2021 11:31 am

amaitland wrote:What does chrome://gpu have to say if you load the url in a CefBrowser instance?


https://pastebin.com/k9H2Vijk

Tells me it's using software rendering which explains the requirement for the SwiftShader directory I guess.

It was very slow rendering WebGL but I assumed that was because I am on a loaner machine while mine is being repaired and this one is 6-7 years old.

My desktop Chrome (same version) also says the same thing so maybe this old machine just has it's GPU blacklisted ?
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 72 guests