renderer_multi only.Expand description
This module aims to make multi-gpu setups easier to handle for compositors.
Its main entry point is the GpuManager. Initializing this with a
GraphicsApi implementation will allow you to create MultiRenderers.
smithay provides the following graphics apis:
A MultiRenderer gets created using two DrmNodes to identify gpus.
One gpu will be referred to as the render-gpu, the other as the target-gpu.
Note: The render- and target-gpu may be identically to allow the multigpu module to be used on single-gpu systems as well avoiding supporting multiple code-paths. Doing so will not result in worse performance compared to rendering without the multi-gpu module.
A MultiRenderer will support the Renderer-trait as well
as the other corresponding traits of the renderer-module,
if the GraphicsApi allows it.
Any rendering operations will take place on the render-gpu transparently.
Output will be redirected the target gpu, as such any Bind- and Offscreen-implementations
will be allocated on the target-gpu.
The ImportMem-implementation will upload the texture on the render-gpu, failing if
the render-gpu does not support the format as normal. Be careful when mixing gpu’s
with different memory-formats supported, what formats you annouce.
In contrast the ImportDma-implementations will transparently create copies
of client buffers, if necessary, given it is unclear if a dmabuf can be imported on any given gpu.
The implementation strives for the best possible performance for a given setup,
when choosing a copy-path.
Any ExportMem-implementations will originate from the render-gpu, which again
needs to support the requested format directly. No paths across other gpus are tested.
Note: This module will not keep you from selecting sub-optimal configurations. Any heuristics for which render-gpu to use for a given set of client buffers and desired target-gpu are up to be implemented by the compositor. The module only reduces the amount of necessary setup operations.
Modules§
- gbm
backend_gbmandbackend_eglandrenderer_gl - Implementation of the multi-gpu
GraphicsApiusing user provided GBM devices and OpenGL ES for rendering.
Structs§
- GpuManager
- Tracks available gpus from a given
GraphicsApi - Multi
Frame Frameimplementation of aMultiRenderer.- Multi
Framebuffer - A Framebuffer of a
MultiRenderer. - Multi
Renderer - Renderer, that transparently copies rendering results to another gpu, as well as transparently importing client buffers residing on different gpus.
- Multi
Texture Textures produced by aMultiRenderer.- Multi
Texture Mapping TextureMappings produced byExportMem-implementations ofMultiRenderers.
Enums§
- Error
- Errors generated by
GpuManagerandMultiRenderer.
Traits§
- ApiDevice
- A device produced by a
GraphicsApi. - Graphics
Api - A graphics api, that supports enumerating graphics devices