This allows users to know the capabilities of the buffers that
will be allocated. The buffer capability is important to
know when negotiating buffer formats.
PRIME support for buffer sharing has become mandatory since the renderer
rewrite. Make sure we check for the appropriate capabilities in backend,
allocator and renderer.
See also #2819.
When gbm_bo_create is used and the GBM implementation does support
modifiers, gbm_bo_get_modifier may return something other than
DRM_FORMAT_MOD_INVALID. This can cause issues with the rest of the
stack (e.g. EGL or KMS) in case these don't support modifiers.
Instead, force the modifier to INVALID, to make sure no one uses
modifiers.
Instead of lazily exporting BOs to DMA-BUFs, do it on init. This is
the only way to use the buffer, so there's no point in deferring
that work.
This is preparatory work for the next commit.