Page MenuHome

OpenGL headless rendering
Open, NormalPublic

Description

This depends on T54633 and should be tackled afterwards.

We should allow OpenGL rendering on headless system (servers without display setup).

Resources on the subject are few but it seems our best shot is to use EGL. We need to assess the support of EGL across our target platforms, and the opengl features it provides.

Details

Type
Bug

Event Timeline

Clément Foucault (fclem) triaged this task as Normal priority.
Dalai Felinto (dfelinto) renamed this task from Opengl headless rendering to OpenGL headless rendering.Apr 16 2018, 12:25 PM

So after trying a few things on a standalone test application, we manage to create a EGL context with GL 4.6 on an Nvidia + Linux + Proprietary drivers workstation.
But we did not succeed on a AMD + Linux + Opensource drivers, only giving us a GL 3.0 context at most.

So this is highly platform dependant and might need more work to get it working nicely.

There is already an EGL backend to GHOST but it's targeted at GLES and outdated.

So we can divide this into 2 tasks:

  • Create compatible GL > 3.3 context with EGL (with maximum platform compatibility).
  • Add offscreen context functions to EGL backends.

This is not a really hard task but it is not a priority for now. So postponing for now.

Here is the test application we used : P671

Thanks @Sergey Sharybin (sergey) for helping me on this one.

AMD guy here.

You need to request the Core profile for older versions of our open source driver. If you don't, you'll get the compatibility profile which is mainly used by legacy applications.

The original plan was to keep the Core profile version at GL 4.5 and the Compatibility profile version at GL 3.0 forever, but we changed our minds and started adding Compatibility profile support last year:
Mesa 18.0: OpenGL 3.0
Mesa 18.1: OpenGL 3.1
Mesa 18.2: OpenGL 4.4
Mesa 18.3: OpenGL 4.5

You are shooting yourselves in the foot by using the Compatibility (default) profile. The Core profile is slightly faster if you are CPU-bound.