Skip to content

radv: Do not use extra descriptor space for the 3rd plane.

While ImageFormatProperties returns the number of internal descriptors, it turns out that applications do not need to actually allocate more descriptors in the descriptor pool.

So if we make descriptors with more planes larger we have to be convervative and always allocate space for the larger descriptors which is a waste given the low usage of this ext.

So let us make use of the fact that 3plane formats all have the same formats & dimensions for the last two planes. This way we only need the first half of the descriptor of the 3rd plane and can share the second half of the second plane.

This allows us to use 16 bytes for the descriptor which nicely fits into the 16 bytes that are unused right next to the sampler.

Fixes: 5564c382 "radv: Update descriptor sets for multiple planes."

Merge request reports