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

Submitted by Francisco Jerez on March 30, 2017, 2:41 a.m.

Details

Message ID 20170330024100.23988-1-currojerez@riseup.net
State New
Headers show
Series "drirc: Set glsl_zero_init for Kerbal Space Program." ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Francisco Jerez March 30, 2017, 2:41 a.m.
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(+)

Patch hide | download patch | download mbox

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>

Comments

On Wed, Mar 29, 2017 at 7:41 PM, Francisco Jerez <currojerez@riseup.net> wrote:
> 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.

Sigh.

Acked-by: Matt Turner <mattst88@gmail.com>