|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
/** A single DRM format */
|
|
|
|
|
/** A single DRM format, with a set of modifiers attached. */
|
|
|
|
|
struct wlr_drm_format {
|
|
|
|
|
// The actual DRM format, from `drm_fourcc.h`
|
|
|
|
|
uint32_t format;
|
|
|
|
@ -17,7 +17,24 @@ struct wlr_drm_format {
|
|
|
|
|
uint64_t modifiers[];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** A set of DRM formats */
|
|
|
|
|
/**
|
|
|
|
|
* A set of DRM formats and modifiers.
|
|
|
|
|
*
|
|
|
|
|
* This is used to describe the supported format + modifier combinations. For
|
|
|
|
|
* instance, backends will report the set they can display, and renderers will
|
|
|
|
|
* report the set they can render to. For a more general overview of formats
|
|
|
|
|
* and modifiers, see:
|
|
|
|
|
* https://lore.kernel.org/dri-devel/20210905122742.86029-1-daniels@collabora.com/
|
|
|
|
|
*
|
|
|
|
|
* For compatibility with legacy drivers which don't support explicit
|
|
|
|
|
* modifiers, the special modifier DRM_FORMAT_MOD_INVALID is used to indicate
|
|
|
|
|
* that implicit modifiers are supported. Legacy drivers can also support the
|
|
|
|
|
* DRM_FORMAT_MOD_LINEAR modifier, which forces the buffer to have a linear
|
|
|
|
|
* layout.
|
|
|
|
|
*
|
|
|
|
|
* Users must not assume that implicit modifiers are supported unless INVALID
|
|
|
|
|
* is listed in the modifier list.
|
|
|
|
|
*/
|
|
|
|
|
struct wlr_drm_format_set {
|
|
|
|
|
// The number of formats
|
|
|
|
|
size_t len;
|
|
|
|
|