Skip to content
Commit 553de940 authored by Kenneth Graunke's avatar Kenneth Graunke Committed by Dylan Baker
Browse files

drirc: Set vs_position_always_invariant for Shadow of Mordor on Intel

When drawing the main character in Shadow of Mordor, the game appears
to draw Talion with one vertex shader, and the Wraith with another.
If the compiler optimizes those in different ways which lead to slight
imprecisions, then the resulting positions may not line up, leading to
Z-fighting occurring as the game decides which of the two are in front.

brw_nir_opt_peephole_ffma looks at usages of multiply adds across the
entire shader, and may make different decisions between the two, leading
to such imprecisions and Z-fighting.  This started happening recently
after a NIR change to eliminate unnecessary MOVs (7025dbe7), but that
change simply exposed the existing problem.

Improves performance on Skylake GT4e by 1.22945% +/- 0.398672% (n=3),
likely due to the fixed rendering.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1985


Fixes: 7025dbe7 ("nir: Skip emitting no-op movs from the builder.")
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 51cc3808)
parent f63c3eca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment