#define GBM_FORMAT_RGBA1010102 __gbm_fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */
#define GBM_FORMAT_BGRA1010102 __gbm_fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */
+/*
+ * Floating point 64bpp RGB
+ * IEEE 754-2008 binary16 half-precision float
+ * [15:0] sign:exponent:mantissa 1:5:10
+ */
+#define GBM_FORMAT_XBGR16161616F __gbm_fourcc_code('X', 'B', '4', 'H') /* [63:0] x:B:G:R 16:16:16:16 little endian */
+
+#define GBM_FORMAT_ABGR16161616F __gbm_fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */
+
/* packed YCbCr */
#define GBM_FORMAT_YUYV __gbm_fourcc_code('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */
#define GBM_FORMAT_YVYU __gbm_fourcc_code('Y', 'V', 'Y', 'U') /* [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian */
#define GBM_FORMAT_YUV444 __gbm_fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
#define GBM_FORMAT_YVU444 __gbm_fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
+struct gbm_format_name_desc {
+ char name[5];
+};
/**
* Flags to indicate the intended use for the buffer - these are passed into
gbm_device_is_format_supported(struct gbm_device *gbm,
uint32_t format, uint32_t usage);
+int
+gbm_device_get_format_modifier_plane_count(struct gbm_device *gbm,
+ uint32_t format,
+ uint64_t modifier);
+
void
gbm_device_destroy(struct gbm_device *gbm);
uint32_t format;
};
+#define GBM_MAX_PLANES 4
+
struct gbm_import_fd_modifier_data {
uint32_t width;
uint32_t height;
uint32_t format;
uint32_t num_fds;
- int fds[4];
- int strides[4];
- int offsets[4];
+ int fds[GBM_MAX_PLANES];
+ int strides[GBM_MAX_PLANES];
+ int offsets[GBM_MAX_PLANES];
uint64_t modifier;
};
uint32_t
gbm_bo_get_format(struct gbm_bo *bo);
+uint32_t
+gbm_bo_get_bpp(struct gbm_bo *bo);
+
uint32_t
gbm_bo_get_offset(struct gbm_bo *bo, int plane);
uint32_t format,
const uint64_t *modifiers,
const unsigned int count);
-int
-gbm_surface_needs_lock_front_buffer(struct gbm_surface *surface);
struct gbm_bo *
gbm_surface_lock_front_buffer(struct gbm_surface *surface);
void
gbm_surface_destroy(struct gbm_surface *surface);
+char *
+gbm_format_get_name(uint32_t gbm_format, struct gbm_format_name_desc *desc);
+
#ifdef __cplusplus
}
#endif