diff --git a/.pick_status.json b/.pick_status.json index 7d32e2d93ab..b9252324bc2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -34,7 +34,7 @@ "description": "gbm: fix get_back_bo() failure with gbm_surface and implicit modifiers", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "105fcb9cfdb4fc28de99f9647ed3d370393058f0", "notes": null diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 9e2761c33b0..316b251dd74 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -1078,11 +1078,17 @@ gbm_dri_surface_create(struct gbm_device *gbm, uint32_t format, uint32_t flags, const uint64_t *modifiers, const unsigned count) { + struct gbm_dri_device *dri = gbm_dri_device(gbm); struct gbm_dri_surface *surf; if (count) assert(modifiers); + if (count > 0 && !dri->screen->base.screen->resource_create_with_modifiers) { + errno = ENOSYS; + return NULL; + } + /* It's acceptable to create an image with INVALID modifier in the list, * but it cannot be on the only modifier (since it will certainly fail * later). While we could easily catch this after modifier creation, doing