diff --git a/va/va.h b/va/va.h index b95aa4fc5..9fa1e5d14 100644 --- a/va/va.h +++ b/va/va.h @@ -1582,6 +1582,11 @@ typedef enum { /** \brief Surface usage hint, gives the driver a hint of intended usage * to optimize allocation (e.g. tiling) (int, read/write). */ VASurfaceAttribUsageHint, + /** \brief List of possible DRM format modifiers (pointer, write). + * + * The value must be a pointer to a VADRMFormatModifierList. + */ + VASurfaceAttribDRMFormatModifiers, /** \brief Number of surface attributes. */ VASurfaceAttribCount } VASurfaceAttribType; diff --git a/va/va_drmcommon.h b/va/va_drmcommon.h index f51b6ba25..296cfbfce 100644 --- a/va/va_drmcommon.h +++ b/va/va_drmcommon.h @@ -154,5 +154,20 @@ typedef struct _VADRMPRIMESurfaceDescriptor { } layers[4]; } VADRMPRIMESurfaceDescriptor; +/** + * \brief List of DRM format modifiers. + * + * To allocate surfaces with one of the modifiers specified in the array, call + * vaCreateSurfaces() with the VASurfaceAttribDRMFormatModifiers attribute set + * to point to an array of num_surfaces instances of this structure. The driver + * will select the optimal modifier in the list. + */ +typedef struct _VADRMFormatModifierList { + /** Number of modifiers. */ + uint32_t num_modifiers; + /** Array of modifiers. */ + uint64_t *modifiers; +} VADRMFormatModifierList; + #endif /* VA_DRM_COMMON_H */