diff --git a/.pick_status.json b/.pick_status.json index 7df28ed3427..954649af5bd 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -474,7 +474,7 @@ "description": "dri: revert INVALID modifier special-casing", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "361f3622587e5bc452a62dbd671969b713273b79", "notes": null diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index d8ee9536479..18baf444f82 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -1130,26 +1130,8 @@ dri_create_image(struct dri_screen *screen, if (!map) return NULL; - if (count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID) { - count = 0; - modifiers = NULL; - } - - if (!pscreen->resource_create_with_modifiers && count > 0) { - bool invalid_ok = false; - - for (unsigned i = 0; i < _count; i++) { - if (modifiers[i] == DRM_FORMAT_MOD_INVALID) - invalid_ok = true; - } - - if (invalid_ok) { - count = 0; - modifiers = NULL; - } else { - return NULL; - } - } + if (!pscreen->resource_create_with_modifiers && count > 0) + return NULL; if (pscreen->is_format_supported(pscreen, map->pipe_format, screen->target, 0, 0, PIPE_BIND_RENDER_TARGET))