f3d icon indicating copy to clipboard operation
f3d copied to clipboard

Support headless rendering on Windows

Open shan75 opened this issue 1 year ago • 5 comments

Context F3D supports headless rendering with the Linux binary version, but not with the Windows version. While Windows usually alsways have a graphical environnement, access to the GPU can be restricted and require installing a CPU based mesa to work, in that case, it would be beneficial to support headless on Windows too.

Suggested Solution

  • Add Windows support for EGL and osmesa in the f3d-superbuild
  • Enable it in superbuild CI

** Original issue** F3D Not creating images in new windows servers

While trying to use f3d.exe it is not generating the images. It is not throwing any errors either.

There is an article in the f3d website to download three dll files. libgallium_wgl.dll is one of them. After doing it, it now records an entry into the event viewer in the windows server.

It is not very clear what is the problem and how to fix it, Any help is appreciated.

Faulting application name: f3d.exe, version: 0.0.0.0, time stamp: 0x66831ffd Faulting module name: libgallium_wgl.dll, version: 24.0.9.0, time stamp: 0x666295d4 Exception code: 0xc0000005 Fault offset: 0x0000000000d6716a Faulting process ID: 0x229c Faulting application start time: 0x01db471c33429ad0 Faulting application path: C:\Program Files\F3D\bin\f3d.exe Faulting module path: C:\Program Files\F3D\bin\libgallium_wgl.dll Report ID: c16cac79-ca11-48de-809b-d360f5109638 Faulting package full name: Faulting package-relative application ID:

shan75 avatar Dec 06 '24 07:12 shan75

This is the suggestion, I have tried but not working

OpenGL applications like F3D can have issues when launched from Windows Server or from a guest Windows because the access to the GPU is restricted. You can try to use a software implementation of OpenGL, called Mesa.

shan75 avatar Dec 06 '24 07:12 shan75

Indeed, we do not support headless rendering on Windows (yet), you definitely need a mesa implementation, you can follow this guide: https://discourse.paraview.org/t/how-to-run-paraview-including-the-binary-release-using-mesa-on-windows/4321

@Meakk Lets keep this open to think about adding osmesa/egl on Windows at some point

mwestphal avatar Dec 06 '24 07:12 mwestphal

Thanks for the support link, I take it I need to copy three dll files into bin folder where f3d.exe exist? I have done that already. But still it is not working. Or is there anything else do I need to do to make it work?

shan75 avatar Dec 06 '24 08:12 shan75

Thanks for the support link, I take it I need to copy three dll files into bin folder where f3d.exe exist? I have done that already. But still it is not working. Or is there anything else do I need to do to make it work?

Yes, this is what I would expect to work, Ill need to try on my side. This may take a while.

mwestphal avatar Dec 06 '24 08:12 mwestphal

We are literally doing that when running the tests in the Windows CI so I'm confident it's working. You can try that: https://github.com/f3d-app/install-mesa-windows-action/blob/main/action.yml

Meakk avatar Dec 06 '24 10:12 Meakk