Skip to content

anv: Support the GEN12_RC_CCS and MTL_RC_CCS modifiers

Nanley Chery requested to merge nchery/mesa:perf-fix/anv-igfx12-rc-ccs into main

What does this MR do and why?

This MR enables two modifiers in the Vulkan driver: I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS and I915_FORMAT_MOD_4_TILED_MTL_RC_CCS. By enabling these modifiers, the driver and other software components are able to share compressed render targets on integrated gfx12 devices. Being able to access compressed surfaces generally reduces bandwidth consumption and increases performance.

Before this MR, the CCS on TGL and MTL was stored in memory differently compared to prior platforms (see commit 07a441d5). To reuse some of the existing code for modifiers, this MR removes that difference. Instead of reserving space at the end of BOs for CCS, the driver reserves space in image bindings.

Apart from reporting support for more modifiers, the other user-facing change involved is that the driver reports a preference for dedicated allocations in order to update the aux map. Due to the aliasing allowed in Vulkan, relying on dedicated allocations is the simplest path towards modeling aux-map-dependent CCS in a manner similar to prior platforms. The downside is that an application may not provide such allocations to images, resulting in a loss of compression. Given this, we should benchmark this MR to make sure it's a net positive. EDIT: To fix a regression, I've added support for non-dedicated allocations (!25003 (comment 2124076)).

Closes: !20478 (closed) #6304 (closed) #6701 (closed)

/cc @llandwerlin @majanes @sagarghuge @jxzgithub @fjdegroo @mattst88

Edited by Nanley Chery

Merge request reports