Skip to content

driconf: Fix Shadow of Mordor rendering on Intel

Kenneth Graunke requested to merge kwg/mesa:position-always-invariant into master

Recently (#1985 (closed)) we regressed Shadow of Mordor rendering on Intel GPUs. However, the commit in question was simply shuffling code around in the shader by correctly eliminating pointless MOVs. This caused the compiler to make different fused-multiply-add decisions, causing subtle precision differences between two vertex shaders which the game needs to compute the same value.

To fix this, we add a driconf workaround to mark gl_Position as invariant in vertex shaders, since the game effectively needs that behavior and isn't setting it.

  • +@aejsmith (since it's a Feral game being affected),
  • +@idr (recently debugged similar invariance issues and suggested the driconf option),
  • +@anholt (since he tracked down the actual source of the regression).

Merge request reports