<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Rendering artifacts shown on WebGL application "chaos to perfection""
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94105">94105</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Rendering artifacts shown on WebGL application "chaos to perfection"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.1
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86 (IA32)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>idr@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>joon.jung@intel.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Rendering corruptions are seen while running
<a href="http://www.chaostoperfection.com/scenes.html?lang=en">http://www.chaostoperfection.com/scenes.html?lang=en</a> .

The corruption can be seen always by:

1. Go to <a href="http://www.chaostoperfection.com/scenes.html?lang=en">http://www.chaostoperfection.com/scenes.html?lang=en</a>
2. Select "all scenes" on the bottom of the main window
3. Select "The Hall of Mirrors" and various artifacts will be shown.

System environment:
      -- OS: Problems seen on ChromeOS and Ubuntu 14.04
      -- x86-64
      -- mesa: Problems seen on different versions of Mesa up to the latest
         (ex. Mesa 11.2.0-devel (git-d76bd85 2016-01-22 trusty-oibaf-ppa)
          or git://anongit.freedesktop.org/mesa/mesa master branch)
      -- Machine: On different Intel machines including SKL

The problem is happening from the following line in the fragment shader of the
app, indicated by ==>:
==========================================================================
#ifdef GL_ES
precision highp float;
#endif
#define MAX_DIR_LIGHTS 0
#define MAX_POINT_LIGHTS 0

uniform mat4 viewMatrix;
uniform vec3 cameraPosition;
uniform float screenWidth;
uniform float screenHeight;
uniform float vingenettingOffset;
uniform float vingenettingDarkening;
uniform float colorOffset;
uniform float colorFactor;
uniform float sampleDistance;
uniform float colorBrightness;
uniform float waveFactor;
uniform vec3 colorA;
uniform sampler2D map;
varying vec2 vUv;
void main() {
vec4 color, org, tmp, add;
float sample_dist, f;
vec2 vin;
vec2 uv = vUv;
add += color = org = texture2D( map, uv );
vin = (uv - vec2(0.5)) * vec2( 1.55 /*vingenettingOffset * 2.0*/);
sample_dist =(dot( vin, vin ) * 2.0);
f = (waveFactor * 100.0 + sample_dist) * sampleDistance * 4.0;
vec2 sampleSize = vec2(  1.0 / screenWidth, 1.0 / screenHeight ) * vec2(f);
add += tmp = texture2D( map, uv + vec2(0.111964, 0.993712) * sampleSize);
if( tmp.g > color.g ) color = tmp;
add += tmp = texture2D( map, uv + vec2(0.846724, 0.532032) * sampleSize);
if( tmp.g > color.g ) color = tmp;
add += tmp = texture2D( map, uv + vec2(0.943883, -0.330279) * sampleSize);
if( tmp.g > color.g ) color = tmp;
add += tmp = texture2D( map, uv + vec2(0.330279, -0.943883) * sampleSize);
if( tmp.g > color.g ) color = tmp;
add += tmp = texture2D( map, uv + vec2(-0.532032, -0.846724) * sampleSize);
if( tmp.g > color.g ) color = tmp;
add += tmp = texture2D( map, uv + vec2(-0.993712, -0.111964) * sampleSize);
if( tmp.g > color.g ) color = tmp;
add += tmp = texture2D( map, uv + vec2(-0.707107, 0.707107) * sampleSize);
if( tmp.g > color.g ) color = tmp;
uv = (uv - vec2(0.5)) * vec2( vingenettingOffset );

==> color = color + (add / vec4(8.0) - color) * (vec4(1.0) - vec4(sample_dist *
0.5));

gl_FragColor = vec4( mix(color.rgb * color.rgb * vec3(colorOffset) + color.rgb,
color.ggg * colorFactor - vec3( vingenettingDarkening ), vec3( dot( uv, uv ))),
1.0 );
gl_FragColor = vec4(1.0) - (vec4(1.0) - gl_FragColor) * (vec4(1.0) -
gl_FragColor);
}
==============================================================================

Removing the corresponding "color" update clears the corruption. I hope Mesa
shader experts can give some light on what could be causing the problem. The
corruption is not seen on MS Windows.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>