[Bug 94105] Rendering artifacts shown on WebGL application "chaos to perfection"

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 12 04:07:01 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=94105

            Bug ID: 94105
           Summary: Rendering artifacts shown on WebGL application "chaos
                    to perfection"
           Product: Mesa
           Version: 11.1
          Hardware: x86 (IA32)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/DRI/i965
          Assignee: idr at freedesktop.org
          Reporter: joon.jung at intel.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org

Rendering corruptions are seen while running
http://www.chaostoperfection.com/scenes.html?lang=en .

The corruption can be seen always by:

1. Go to http://www.chaostoperfection.com/scenes.html?lang=en
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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160212/24d051b7/attachment.html>


More information about the intel-3d-bugs mailing list