Skip to content

vulkan/wsi/wayland: implement the full format table

Niklas Haas requested to merge haasn/mesa:wayland30 into main

This code was written but (rightfully) commented out, because it referenced non-existing vulkan formats.

The correct vulkan analogs come in the form _PACK16 and _PACK32, respectively, which have their component ordering in high->low bit order. This is compatible with the DRM format ordering, so we can just implement them all in the obvious way.

I implemented all of the formats I could, while excluding those that either don't map to vulkan at all (e.g. BGRA1010102), and commenting out the ones that require an extra extension (e.g. ARGB4444) because they probably need to be checked for extension presence first.

List slightly re-ordered to make it more neatly organized. Tested working with the 2101010 and 565 variants. Was not able to test the 4444 or 1555 formats, but I verified the channel order was correct so they should be working in theory.

Signed-off-by: Niklas Haas git@haasn.xyz

Merge request reports