const unsigned int count)
{
return gbm_bo_create_with_modifiers2(gbm, width, height, format, modifiers,
- count, 0);
+ count, GBM_BO_USE_SCANOUT);
}
GBM_EXPORT struct gbm_bo *
const unsigned int count)
{
return gbm_surface_create_with_modifiers2(gbm, width, height, format,
- modifiers, count, 0);
+ modifiers, count,
+ GBM_BO_USE_SCANOUT);
}
GBM_EXPORT struct gbm_surface *
* -Add a new block of checks in main()
*/
-/* From: 49a7331cb02 - James Jones - gbm: Version the backend interface */
-#define GBM_BACKEND_ABI_VERSION_abi0 0
+/*
+ * From: Simon Ser - "gbm: assume USE_SCANOUT in create_with_modifiers"
+ *
+ * Note: ABI 1 is identical to ABI 0, except gbm_device_v0.bo_create can
+ * provide both modifiers and usage.
+ */
+#define GBM_BACKEND_ABI_VERSION_abi0 1
struct gbm_device_v0_abi0 {
const struct gbm_backend_desc *backend_desc;
uint32_t backend_version;
* Core ABI version: 4
* ABI version of a buffer object created by a device from the backend: 4
*/
-#define GBM_BACKEND_ABI_VERSION 0
+#define GBM_BACKEND_ABI_VERSION 1
/**
* GBM device interface corresponding to GBM_BACKEND_ABI_VERSION = 0
uint32_t format,
uint64_t modifier);
+ /**
+ * Since version 1, usage is properly populated when modifiers are
+ * supplied. Version 0 always set usage to 0 in this case.
+ */
struct gbm_bo *(*bo_create)(struct gbm_device *gbm,
uint32_t width, uint32_t height,
uint32_t format,
uint64_t (*bo_get_modifier)(struct gbm_bo *bo);
void (*bo_destroy)(struct gbm_bo *bo);
+ /**
+ * Since version 1, flags are properly populated when modifiers are
+ * supplied. Version 0 always set flags to 0 in this case.
+ */
struct gbm_surface *(*surface_create)(struct gbm_device *gbm,
uint32_t width, uint32_t height,
uint32_t format, uint32_t flags,