gbm: Introduce modifiers into surface/bo creation
[mesa.git] / src / gbm / main / gbm.h
index 203a23635791d14d9fade133c648502629050d6e..5f588dab58d9f757154cbc3a180e42c54dac36cd 100644 (file)
@@ -243,6 +243,12 @@ gbm_bo_create(struct gbm_device *gbm,
               uint32_t width, uint32_t height,
               uint32_t format, uint32_t flags);
 
+struct gbm_bo *
+gbm_bo_create_with_modifiers(struct gbm_device *gbm,
+                             uint32_t width, uint32_t height,
+                             uint32_t format,
+                             const uint64_t *modifiers,
+                             const unsigned int count);
 #define GBM_BO_IMPORT_WL_BUFFER         0x5501
 #define GBM_BO_IMPORT_EGL_IMAGE         0x5502
 #define GBM_BO_IMPORT_FD                0x5503
@@ -303,9 +309,15 @@ gbm_bo_get_height(struct gbm_bo *bo);
 uint32_t
 gbm_bo_get_stride(struct gbm_bo *bo);
 
+uint32_t
+gbm_bo_get_stride_for_plane(struct gbm_bo *bo, int plane);
+
 uint32_t
 gbm_bo_get_format(struct gbm_bo *bo);
 
+int64_t
+gbm_bo_get_offset(struct gbm_bo *bo, int plane);
+
 struct gbm_device *
 gbm_bo_get_device(struct gbm_bo *bo);
 
@@ -318,6 +330,9 @@ gbm_bo_get_fd(struct gbm_bo *bo);
 int
 gbm_bo_get_plane_count(struct gbm_bo *bo);
 
+union gbm_bo_handle
+gbm_bo_get_handle_for_plane(struct gbm_bo *bo, int plane);
+
 int
 gbm_bo_write(struct gbm_bo *bo, const void *buf, size_t count);
 
@@ -336,6 +351,12 @@ gbm_surface_create(struct gbm_device *gbm,
                    uint32_t width, uint32_t height,
                   uint32_t format, uint32_t flags);
 
+struct gbm_surface *
+gbm_surface_create_with_modifiers(struct gbm_device *gbm,
+                                  uint32_t width, uint32_t height,
+                                  uint32_t format,
+                                  const uint64_t *modifiers,
+                                  const unsigned int count);
 int
 gbm_surface_needs_lock_front_buffer(struct gbm_surface *surface);