summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-20 22:44:53 +0200
committerMarek Olšák <[email protected]>2017-06-23 19:50:20 +0200
commit118b2008ba18d6cf5d511e0a0bacbb846aad6982 (patch)
treefa55539ece957d80882b4a814a4e77e6983bb8e6 /src/mesa
parent6b0f6e693ba4b682679e31cc528974bbf0291e45 (diff)
st/dri: add a drirc workaround for Rocket League
This needs to be passed to gallium drivers. No game fix is planned at this time. The addition of glsl_correct_derivatives_after_discard is generally a good thing for mesa compatibility with the broader GL driver ecosystem. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100070 Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/common/drirc4
-rw-r--r--src/mesa/drivers/dri/common/xmlpool/t_options.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/drirc b/src/mesa/drivers/dri/common/drirc
index 5152b207ebe..7d73b1218b5 100644
--- a/src/mesa/drivers/dri/common/drirc
+++ b/src/mesa/drivers/dri/common/drirc
@@ -151,6 +151,10 @@ TODO: document the other workarounds.
<application name="Kerbal Space Program (64-bit)" executable="KSP.x86_64">
<option name="glsl_zero_init" value="true"/>
</application>
+
+ <application name="Rocket League" executable="RocketLeague">
+ <option name="glsl_correct_derivatives_after_discard" value="true"/>
+ </application>
</device>
<!-- vmwgfx doesn't like full buffer swaps and can't sync to vertical retraces.-->
<device driver="vmwgfx">
diff --git a/src/mesa/drivers/dri/common/xmlpool/t_options.h b/src/mesa/drivers/dri/common/xmlpool/t_options.h
index 8a7d04f00ff..9aa1798b9d9 100644
--- a/src/mesa/drivers/dri/common/xmlpool/t_options.h
+++ b/src/mesa/drivers/dri/common/xmlpool/t_options.h
@@ -130,6 +130,10 @@ DRI_CONF_OPT_BEGIN_B(force_glsl_abs_sqrt, def) \
DRI_CONF_DESC(en,gettext("Force computing the absolute value for sqrt() and inversesqrt()")) \
DRI_CONF_OPT_END
+#define DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD(def) \
+DRI_CONF_OPT_BEGIN_B(glsl_correct_derivatives_after_discard, def) \
+ DRI_CONF_DESC(en,gettext("Implicit and explicit derivatives after a discard behave as if the discard didn't happen")) \
+DRI_CONF_OPT_END
/**