Skip to content

gpu/utils: only sort by relevant texture capabilities

Niklas Haas requested to merge haasn/libplacebo:cmp_fmts into master

Capabilities like vertex, texel buffer support or readback shouldn't influence the sorting, because this requirement will typically be explicitly filtered for when searching for such formats.

This capability sorting only exists to allow prioritizing formats that have the optional ability to leverage more performant code paths, e.g. by allowing blits, linear sampling or texture storage. And in either case, we wouldn't want to pick a worse rendering format just for some minor side benefit from having it be compute-dispatchable when blending or some other obscure edge case like that.

(And lastly, there is also the user friendliness consideration of wanting "primitive" texture formats near the top of the list)

Merge request reports