Module: Mesa
Branch: main
Commit: 42dba8ebc555bc7ba2e7a86d19eabf4c6d7a3f7f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=42dba8ebc555bc7ba2e7a86d19eabf4c6d7a3f7f

Author: Sviatoslav Peleshko <[email protected]>
Date:   Fri Feb 17 23:08:36 2023 +0200

driconf/anv: Apply limit_trig_input_range WA to Rise of the Tomb Raider

During its Ambient Occlusion calculations the game ends up calculating
sin/cos of some pretty big values, for which HW produces completely bogus
results (e.g. cos(3929491.25) ~= -0.011, while correct would be ~0.923).

Limit the arguments to the reasonable (-2*Pi; 2*Pi) range with the
limit_trig_input_range WA.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8292
Signed-off-by: Sviatoslav Peleshko <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21396>

---

 src/util/00-mesa-defaults.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index 5154d4f7571..4dcad37fcdc 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -999,6 +999,12 @@ TODO: document the other workarounds.
         <application name="Batman™: Arkham Knight" executable="BatmanAK.exe">
             <option name="anv_sample_mask_out_opengl_behaviour" value="true"/>
         </application>
+        <application name="Rise of the Tomb Raider" 
executable="RiseOfTheTombRaider">
+            <option name="limit_trig_input_range" value="true" />
+        </application>
+        <application name="Rise of the Tomb Raider" executable="ROTTR.exe">
+            <option name="limit_trig_input_range" value="true" />
+        </application>
     </device>
     <device driver="dzn">
         <application name="No Man's Sky" executable="NMS.exe">

Reply via email to