Skip to content

hk: Implement lossless compression

Alyssa Rosenzweig requested to merge alyssa/mesa:agx/20240902 into main

I was mostly hacking on FEX last month, so this is smaller than usual.

This MR adds support for lossless compression to Honeykrisp. This is mostly straightforward, except we can't lossless compression storage images. This creates two tricky problems:

  • copies on the compute queue. Rather than punt to graphics, we instead use block-based stores. This is much more efficient (and not portable, though it should work on all Arm Macs). Big set of rework to make that happen. Note that block based stores seemingly don't work from the compute queue for multisampling, at least on G13G 😭 so for now we disable lossless compression for multisampled images. Later on we'll use vk_meta to polyfill that case.
  • spilled render targets (eMRT), which might be shared across processes. We solve this by decompressing "just in time". The analogous corner case is also fixed in the GL driver. I doubt any app (Gl or vk) will ever hit this, but it's needed to pass vulkan cts in a sane way.

Merge request reports

Loading