[Mesa-dev] [PATCH] drirc: Set glsl_zero_init for Kerbal Space Program.

Francisco Jerez currojerez at riseup.net
Thu Mar 30 02:41:00 UTC 2017


This fixes the stripes of garbage rendered on the floor of the vehicle
assembly building among other rendering issues.  The reason for the
misrendering seems to be that some of the GLSL shaders used by the
application use variables before initializing them, incorrectly
assuming that they will be implicitly set to zero by the
implementation.
---
 src/mesa/drivers/dri/common/drirc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/mesa/drivers/dri/common/drirc b/src/mesa/drivers/dri/common/drirc
index 494e9e1..f8babb7 100644
--- a/src/mesa/drivers/dri/common/drirc
+++ b/src/mesa/drivers/dri/common/drirc
@@ -120,5 +120,13 @@ TODO: document the other workarounds.
         <application name="The Culling" executable="Victory">
             <option name="force_glsl_version" value="440" />
         </application>
+
+        <application name="Kerbal Space Program (32-bit)" executable="KSP.x86">
+            <option name="glsl_zero_init" value="true"/>
+        </application>
+
+        <application name="Kerbal Space Program (64-bit)" executable="KSP.x86_64">
+            <option name="glsl_zero_init" value="true"/>
+        </application>
     </device>
 </driconf>
-- 
2.10.2



More information about the mesa-dev mailing list