Mesa (master): drirc: Add glsl_zero_init workaround for GpuTest

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 25 10:52:03 UTC 2019


Module: Mesa
Branch: master
Commit: 29081c671f65b8ab0a1ec50dda47f58f2faf2468
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=29081c671f65b8ab0a1ec50dda47f58f2faf2468

Author: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Date:   Fri Nov 22 18:05:14 2019 +0200

drirc: Add glsl_zero_init workaround for GpuTest

GiMark benchmark from GpuTest has such code in VS:

 out vec4 lightDir0;
 out vec4 lightDir1;

 ...

 lightDir0.xyz = lp0 - vVertex.xyz;
 lightDir1.xyz = lp1 - vVertex.xyz;

In FS:

 float distSqr = dot(lightDir0, lightDir0);

So due to the usage of uninitialized .w channel in the dot product,
distSqr may become undefined which results in many black dots
in the test on Iris.

In https://www.geeks3d.com/forums/index.php/topic,6242.0.html
developer stated that this benchmark most likely won't be updated.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1919
Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

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

diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index ba343ec5ffb..734161650b7 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -243,6 +243,13 @@ TODO: document the other workarounds.
             <option name="force_compat_profile" value="true" />
         </application>
 
+        <application name="GpuTest" executable="GpuTest">
+            <!-- GiMark benchmark from GpuTest does not initialize .w channel of
+                 lightDir0 and lightDir1 varyings in the vertex shader while
+                 uses it in the fragment shader. -->
+            <option name="glsl_zero_init" value="true"/>
+        </application>
+
         <!-- The GL thread whitelist is below, workarounds are above.
              Keep it that way. -->
 




More information about the mesa-commit mailing list