From c61862e7aff836995cfc18c6f471c6828900078d Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 1 Aug 2024 11:18:34 +0100 Subject: [PATCH] gbm/dri: Remove erroneous assert The user is allowed to pass a list of modifiers including DRM_FORMAT_MOD_INVALID, meaning that the user is OK with implicit modifiers. Since merging the DRI interfaces, this assert that we are never returning an implicit modifier is unnecessary and also wrong. It was originally added to be super-safe, but we now know that our drivers work very well with modifiers, so don't need it. Signed-off-by: Daniel Stone Fixes: 0b16d7ebb92e ("dri: Allow INVALID for modifier-less drivers") Closes: mesa/mesa#11591 Part-of: (cherry picked from commit cd961a7e3fa7140f77495fccf9a523c5a3d84a50) --- .pick_status.json | 2 +- src/gbm/backends/dri/gbm_dri.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 64a4b5ffec6..f0cede73b24 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -814,7 +814,7 @@ "description": "gbm/dri: Remove erroneous assert", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0b16d7ebb92e05a5bcdaf70626e0d916551015e1", "notes": null diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 9ab5e452872..2bd1191a195 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -1055,9 +1055,6 @@ gbm_dri_bo_create(struct gbm_device *gbm, free(mods_filtered); mods_filtered = NULL; - if (modifiers) - assert(gbm_dri_bo_get_modifier(&bo->base) != DRM_FORMAT_MOD_INVALID); - dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_HANDLE, &bo->base.v0.handle.s32); dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_STRIDE,