Skip to content

iris: Allocate resources and sampler views aligned to cachelines

Kenneth Graunke requested to merge kwg/mesa:exclusive-cacheline into main

This reduces false sharing on the cacheline with the pipe_reference..

See commit c85ce253 for the original version of this optimization (MR !11618 (merged)). See also MR !13431 (merged) (zink) and !13826 (freedreno).

On an i7-12700 with an Arc A750, in out of the box configuration (intel_pstate driver, powersave governor), n = 15 for all runs:

# Test Name Improvement
1 DrawArrays ( 1 VBO, 0 UBO, 0 ) w/ no state change 1.70135% +/- 0.292772%
2 DrawElements ( 1 VBO, 0 UBO, 0 ) w/ no state change 1.75355% +/- 0.322444%
3 DrawElements (16 VBO, 8 UBO, 16 Tex) w/ no state change 2.05361% +/- 0.300616%
4 DrawElements ( 1 VBO, 1 UBO, 1 Tex) w/ buffer replacement change -8.61107% +/- 0.815775%
5 DrawElements ( 1 VBO, 8 UBO, 8 Tex) w/ 1 vertex attrib change No difference proven at 95.0% confidence
6 DrawElements (16 VBO, 8 UBO, 8 Tex) w/ 16 vertex attribs change No difference proven at 95.0% confidence
7 DrawElements ( 1 VBO, 0 UBO, 0 ) w/ shader program change No difference proven at 95.0% confidence
8 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ shader program change 2.29801% +/- 0.441721%
9 DrawElements ( 8 VBO, 8 UBO, 1 Tex) w/ 1/1 texture change No difference proven at 95.0% confidence
10 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ 1/8 texture change 3.01614% +/- 0.226258%
11 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ 8/8 textures change 2.17102% +/- 0.363088%
12 DrawElements ( 8 VBO, 8 UBO, 1 TBO) w/ 1/1 TBO change 1.17146% +/- 0.133731%
13 DrawElements ( 8 VBO, 8 UBO, 8 TBO) w/ 1/8 TBO change 1.6808% +/- 0.369687%
14 DrawElements ( 8 VBO, 8 UBO, 8 TBO) w/ 8/8 TBOs change 1.63276% +/- 0.434764%
15 DrawElements ( 8 VBO, 8 UBO, 1 Img) w/ 1/1 image change 2.09392% +/- 0.168898%
16 DrawElements ( 8 VBO, 8 UBO, 8 Img) w/ 1/8 image change -1.06727% +/- 0.69195%
17 DrawElements ( 8 VBO, 8 UBO, 8 Img) w/ 8/8 images change -1.31341% +/- 0.898368%
18 DrawElements ( 8 VBO, 8 UBO, 1 ImB) w/ 1/1 image buffer change 1.85228% +/- 0.169358%
19 DrawElements ( 8 VBO, 8 UBO, 8 ImB) w/ 1/8 image buffer change No difference proven at 95.0% confidence
20 DrawElements ( 8 VBO, 8 UBO, 8 ImB) w/ 8/8 image buffers change 0.231589% +/- 0.205179%
21 DrawElements ( 8 VBO, 1 UBO, 8 Tex) w/ 1/1 UBO change 1.11358% +/- 0.115533%
22 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ 1/8 UBO change 1.35641% +/- 0.683542%
23 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ 8/8 UBOs change 1.80005% +/- 0.217873%
24 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ few uniforms / 1 change 1.301% +/- 0.118177%
25 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ many uniforms / 1 change 1.68636% +/- 0.519897%
26 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ scissor change -0.363439% +/- 0.146014%
27 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ viewport change -0.216902% +/- 0.144408%
28 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ primitive restart enable change -0.298027% +/- 0.233409%
29 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ blend enable change No difference proven at 95.0% confidence
30 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ depth enable change No difference proven at 95.0% confidence
31 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ depth clamp enable change -0.214305% +/- 0.113856%
32 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ stencil enable change 0.882903% +/- 0.666095%
33 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ scissor enable change -0.125107% +/- 0.0897465%
34 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ MSAA enable change 1.86883% +/- 0.260893%
35 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ sample mask enable change 1.88844% +/- 0.242596%
36 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ alpha-to-coverage enable change 1.89394% +/- 0.265288%
37 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ sample shading enable change 1.767% +/- 0.42694%
38 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ cull face enable change -0.144104% +/- 0.0681938%
39 DrawElements ( 8 VBO, 8 UBO, 8 Tex) w/ clip distance enable change -0.546652% +/- 0.275892%

+@mattst88

Merge request reports