Skip to content

Introduce MetaRenderDevice

Jonas Ådahl requested to merge jadahl/mutter:wip/render-device into main

This branch aims to be the beginning of migrating functionality away from meta-renderer-native.c and friends. It starts with abstracting away things related to gbm_device and EGLDevice as well as an abstract "surfaceless" device behind a MetaRenderDevice type. It has three implementations: MetaRenderDeviceGbm (the regular gbm_device stuff), MetaRenderDeviceEglStream (for EGLDevice/EGLStream tunneling) and MetaRenderDeviceSurfaceless for the equivalent of using the surfaceless EGL extension.

A MetaRenderDevice for now deals with:

  • EGLDisplay creation
  • DMA buffer allocation where possible
  • Dumb buffer allocation where possible

It currently has a short lived life time, compared to e.g. MetaKmsDevice, i.e. it's destroyed when there are no onscreens needing it; but this might need to change at a later point, as the aim is to replace the usage of MetaGpu and MetaKmsDevice as none of them reflects where functionality can be located (e.g. on render drm nodes vs primary drm nodes).

To summarize the plan:

  • MetaGpu will be used primarily for monitor configuration in the generic backend layer
  • MetaKmsDevice will only be created for mode setting capable devices, and used for mode setting related things
  • MetaRenderDevice will be used for per device EGL things, buffer allocations, etc.

This is marked as draft as it includes !1828 (merged) and thus !1822 (merged).

Edited by Jonas Ådahl

Merge request reports