const uint64_t *modifiers,
const unsigned int count)
{
+ return gbm_bo_create_with_modifiers2(gbm, width, height, format, modifiers,
+ count, 0);
+}
+
+GBM_EXPORT struct gbm_bo *
+gbm_bo_create_with_modifiers2(struct gbm_device *gbm,
+ uint32_t width, uint32_t height,
+ uint32_t format,
+ const uint64_t *modifiers,
+ const unsigned int count,
+ uint32_t flags)
+{
if (width == 0 || height == 0) {
errno = EINVAL;
return NULL;
return NULL;
}
- return gbm->v0.bo_create(gbm, width, height, format, 0, modifiers, count);
+ if (modifiers && (flags & GBM_BO_USE_LINEAR)) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ return gbm->v0.bo_create(gbm, width, height, format, flags, modifiers, count);
}
/**
const uint64_t *modifiers,
const unsigned int count)
{
+ return gbm_surface_create_with_modifiers2(gbm, width, height, format,
+ modifiers, count, 0);
+}
+
+GBM_EXPORT struct gbm_surface *
+gbm_surface_create_with_modifiers2(struct gbm_device *gbm,
+ uint32_t width, uint32_t height,
+ uint32_t format,
+ const uint64_t *modifiers,
+ const unsigned int count,
+ uint32_t flags)
+{
if ((count && !modifiers) || (modifiers && !count)) {
errno = EINVAL;
return NULL;
}
- return gbm->v0.surface_create(gbm, width, height, format, 0,
+ if (modifiers && (flags & GBM_BO_USE_LINEAR)) {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ return gbm->v0.surface_create(gbm, width, height, format, flags,
modifiers, count);
}
uint32_t format,
const uint64_t *modifiers,
const unsigned int count);
+
+struct gbm_bo *
+gbm_bo_create_with_modifiers2(struct gbm_device *gbm,
+ uint32_t width, uint32_t height,
+ uint32_t format,
+ const uint64_t *modifiers,
+ const unsigned int count,
+ uint32_t flags);
+
#define GBM_BO_IMPORT_WL_BUFFER 0x5501
#define GBM_BO_IMPORT_EGL_IMAGE 0x5502
#define GBM_BO_IMPORT_FD 0x5503
const uint64_t *modifiers,
const unsigned int count);
+struct gbm_surface *
+gbm_surface_create_with_modifiers2(struct gbm_device *gbm,
+ uint32_t width, uint32_t height,
+ uint32_t format,
+ const uint64_t *modifiers,
+ const unsigned int count,
+ uint32_t flags);
+
struct gbm_bo *
gbm_surface_lock_front_buffer(struct gbm_surface *surface);