diff --git a/.pick_status.json b/.pick_status.json index f50a106538d..55c7780eb69 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1516,7 +1516,7 @@ "description": "panfrost: Don't advertise AFBC mods when the format is not supported", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "44217be92134b03e7426860b42918b1d4602e08e" }, diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 0ad365e602e..9ed17ddbfc7 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -560,6 +560,14 @@ panfrost_walk_dmabuf_modifiers(struct pipe_screen *screen, /* Don't advertise AFBC before T760 */ afbc &= !(dev->quirks & MIDGARD_NO_AFBC); + /* On Bifrost, AFBC is not supported if the format has a non-identity + * swizzle. For internal resources we fix the format at runtime, but + * this fixup is not applicable when we export the resource. Don't + * advertise AFBC modifiers on such formats. + */ + if (panfrost_afbc_format_needs_fixup(dev, format)) + afbc = false; + unsigned count = 0; for (unsigned i = 0; i < PAN_MODIFIER_COUNT; ++i) {