mesa/src
Kenneth Graunke 51cc380894 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: 7025dbe794 ("nir: Skip emitting no-op movs from the builder.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2019-11-27 18:48:04 +00:00
..
amd radv: enable VK_KHR_shader_subgroup_extended_types on GFX10 2019-11-27 07:42:44 +01:00
broadcom nir: Add a scheduler pass to reduce maximum register pressure. 2019-11-25 21:12:21 +00:00
compiler driconf, glsl: Add a vs_position_always_invariant option 2019-11-27 18:48:04 +00:00
drm-shim drm-shim: fix EOF case 2019-11-13 12:39:14 +00:00
egl Revert "egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXT" 2019-11-14 07:46:14 +02:00
etnaviv etnaviv: add drm-shim 2019-11-21 22:56:04 +00:00
freedreno turnip: Disable timestamp queries for now. 2019-11-27 10:05:59 -08:00
gallium driconf, glsl: Add a vs_position_always_invariant option 2019-11-27 18:48:04 +00:00
gbm meson: move the generic symbols check arguments to a common variable 2019-11-05 20:30:47 +00:00
getopt meson: build getopt when using msvc 2019-09-10 20:36:47 +00:00
glx dri: Avoid swapbuffer throttling in glXCopySubBufferMESA 2019-10-05 13:19:37 +00:00
gtest meson: gtest needs pthreads 2019-11-07 06:11:19 -08:00
hgl haiku: fix Mesa build 2019-10-01 10:31:02 +00:00
imgui imgui: bump imgui memory editor copy 2019-06-18 15:34:13 +00:00
intel anv: Push constants are relative to dynamic state on IVB 2019-11-26 22:15:54 +00:00
loader loader: replace xmlpool_options_h with idep_xmlconfig_headers 2019-10-31 15:29:06 +00:00
mapi mapi: add GetInteger64vEXT with EXT_disjoint_timer_query 2019-11-26 07:41:24 +02:00
mesa driconf, glsl: Add a vs_position_always_invariant option 2019-11-27 18:48:04 +00:00
panfrost pan/midgard: Use lower_tex_without_implicit_lod 2019-11-22 08:38:57 -05:00
util drirc: Set vs_position_always_invariant for Shadow of Mordor on Intel 2019-11-27 18:48:04 +00:00
vulkan vulkan: Update the XML and headers to 1.1.129 2019-11-26 02:48:42 +00:00
meson.build meson: only build imgui when needed 2019-11-25 07:51:56 +00:00
SConscript