Skip to content

brw/anv: relax push constant alignment for legacy stages

What does this MR do and why?

brw/anv: relax push constant alignment for legacy stages

On Xe2+, the HW is still capable to pack 32B chunks of push constants
into the EU payload. Meaning if you have 2 push constant buffers of
32B each, the push data can only occupy a single physical register of
64B.

We've aligned each push buffer into is own register which is
consumming more register space than needed.

Notable fossil changes on LNL:

  Blackops 3:
  Totals from 616 (41.73% of 1476) affected shaders:
  Instrs: 275056 -> 274545 (-0.19%); split: -0.32%, +0.14%
  Cycle count: 145059028 -> 145482712 (+0.29%); split: -0.80%, +1.10%
  Spill count: 974 -> 969 (-0.51%); split: -3.59%, +3.08%
  Fill count: 2353 -> 2242 (-4.72%); split: -6.20%, +1.49%
  Max live registers: 53920 -> 54083 (+0.30%); split: -0.15%, +0.45%

  Fortnite:
  Totals from 3577 (54.36% of 6580) affected shaders:
  Instrs: 2633470 -> 2632581 (-0.03%); split: -0.07%, +0.04%
  Send messages: 146543 -> 146535 (-0.01%)
  Cycle count: 61214298 -> 61281506 (+0.11%); split: -0.70%, +0.81%
  Spill count: 2169 -> 2131 (-1.75%); split: -4.98%, +3.23%
  Fill count: 3854 -> 3784 (-1.82%); split: -4.75%, +2.93%
  Scratch Memory Size: 223232 -> 216064 (-3.21%); split: -4.59%, +1.38%
  Max live registers: 528248 -> 528299 (+0.01%); split: -0.15%, +0.16%

  Metro Exodus:
  Totals from 8754 (23.16% of 37796) affected shaders:
  Instrs: 2251204 -> 2250622 (-0.03%); split: -0.03%, +0.01%
  Cycle count: 41487674 -> 41647756 (+0.39%); split: -0.90%, +1.29%
  Spill count: 301 -> 278 (-7.64%); split: -9.63%, +1.99%
  Fill count: 428 -> 419 (-2.10%); split: -7.71%, +5.61%
  Scratch Memory Size: 32768 -> 30720 (-6.25%)
  Max live registers: 829113 -> 822990 (-0.74%); split: -0.77%, +0.03%

  Red Dead Redemption 2:
  Totals from 3605 (68.35% of 5274) affected shaders:
  Instrs: 1715747 -> 1714995 (-0.04%); split: -0.08%, +0.03%
  Cycle count: 54050426 -> 53965006 (-0.16%); split: -0.76%, +0.60%
  Spill count: 4465 -> 4489 (+0.54%); split: -0.27%, +0.81%
  Fill count: 10983 -> 10980 (-0.03%); split: -0.44%, +0.41%
  Scratch Memory Size: 355328 -> 351232 (-1.15%)
  Max live registers: 384546 -> 385012 (+0.12%); split: -0.13%, +0.26%

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

Merge request reports

Loading