Skip to content

mesa/main: misc format cleanups

Erik Faye-Lund requested to merge kusma/mesa:read-format-cleanup into main

Here's a bunch of cleanups in the mesa GL-format handling code, mainly relating to the implementation read types.

The goal here is really to untangle the different things that use _mesa_uncompressed_format_to_type_and_comps, so it doesn't serve multiple not-really-compatible uses. The end result is that this function is only used to compute the implementation read type.

The real problem is that the implementation type and formats are really only allowed to be chosen from a limited set of formats, but we currently sometimes pick combinations that aren't legal. This MR doesn't actually fix that, but it makes it possible to fix that without doing too much error-prone code-gymnastics. See !29144 (merged) for more background.

This isn't perfect; I think the end result can be even better, but I'm kind of running out of time for this side-track from what I was doing.

This is on top of !29380 (merged) (and thus contain those patches, just ignore the first three), because that one deserves some extra attention, I think.

Merge request reports