Skip to content

iris: Sample more texture view fast-clears on gfx11+

Nanley Chery requested to merge nchery/mesa:perf/texview-cc-gfx11 into main

What does this MR do and why?

On platforms with an indirect clear color BO, the clear color used when
sampling is in the form of a pixel. The sampler can interpret the pixel
correctly regardless of the format, so allow fast clears in more cases
within iris_resource_prepare_texture.

On gfx12, this completely removes partial resolves in a couple game
traces I tested:

   - 72 partial resolves in a 500 frame trace of CS:GO.
   - 1207 partial resolves in a 500 frame trace of Dota 2.

The resolves were triggered when ISL_FORMAT_A8_UNORM surfaces were
sampled as ISL_FORMAT_R8_UNORM.

Besides improving performance, this is also motivated by #3732 (closed). In my fix for that issue, I hope to rely more on the texture preparation helpers in the copy region paths. The copy region code is already aware of the pixel sampling feature, so this change gets rid of the one issue with switching over.

/cc @kwg @jxzgithub

Merge request reports