Skip to content

panfrost: Rework format handling

Alyssa Rosenzweig requested to merge alyssa/mesa:z28 into master

Bifrost v7 handles formats very differently from Midgard (and Bifrost v6), so we need to split out the format table to handle all the weird edge cases. This series cleans up our format handling infrastructure in preparation for the final commit in the series, which rewrites the tables themselves to bake the swizzles into the format.

The old code maps from a PIPE format to an indexed Mali format, and builds a 22-bit pixel format descriptor from the indexed format with swizzle and sRGB flags. With v7 abandoning swizzles for a fixed enum, let's instead map from PIPE formats to 22-bit pixel formats, treating the (swizzle, index, srgb) triple opaquely.

@bbrezillon to review. Cc @chewitt - this should fix Kodi colour issues. Also cc @icecream95 @raster as potentially interested parties.

Merge request reports