Skip to content

radv: only set BO metadata for the first plane

Simon Ser requested to merge emersion/mesa:radv-bo-metadata-first-plane into master

To properly support multi-planar images, we don't want to set metadata on anything other than the first plane. To achieve this radv currently checks for the image TILING and assumes LINEAR means it's not the first plane.

However this doesn't account for images with a single LINEAR plane. We still want to set metadata on those, e.g. to properly set the scanout bit in the tiling flags.

Instead of checking for LINEAR, check if the offset is zero. Only the first plane has a zero offset on AMD.

This mirrors the radeonsi logic 1.

While at it, move the metadata declaration into the if block.

Signed-off-by: Simon Ser contact@emersion.fr

cc @bnieuwenhuizen

Should I CC mesa-stable on this one too?

Edited by Simon Ser

Merge request reports