Skip to content

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 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: #1919 (closed)

I don't know if other drivers exhibit the rendering corruption (i965 doesn't), but benchmark clearly does a wrong thing and if other driver renders it correctly it's just an accident.

Merge request reports