Skip to content

nir: allow for cheap intrinsics in nir_opt_peephole_select()

In some games, a single load_helper_invocation() inside an if-statement seems to be a common pattern.

Totals from affected shaders:

  • SGPRS: 27970 -> 28152 (0.65 %)
  • VGPRS: 18552 -> 18620 (0.37 %)
  • Code Size: 1424472 -> 1366648 (-4.06 %) bytes
  • Max Waves: 7029 -> 7025 (-0.06 %)

Affected games are Shadow of Mordor, Three Kingdoms and Warhammer 2.

Edited by Daniel Schürmann

Merge request reports