<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [IVB/HSW] ogl-samples: gl-320-fbo-depth-multisample render error (broken line at "horizon")"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76396#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [IVB/HSW] ogl-samples: gl-320-fbo-depth-multisample render error (broken line at "horizon")"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76396">bug 76396</a>
              from <span class="vcard"><a class="email" href="mailto:itoral@igalia.com" title="Iago Toral <itoral@igalia.com>"> <span class="fn">Iago Toral</span></a>
</span></b>
        <pre>The test renders a polygon tilted in the Zaxis to a FBO with a multisampled
texture attached to its depth component. Then renders to the main framebuffer
and uses a shader to map the recorder depth info to the frame buffer with a
gray scale (the darker the color the lower the depth value, where black should
be the near plane and white the far plane).

This is the fragment shader used by the test to map depth values to colors on 
the screen:

#version 150 core

uniform sampler2DMS Diffuse;

in vec4 gl_FragCoord;
out vec4 Color;

float LinearizeDepth(float Depth)
{
        float n = 0.1; // camera z near
        float f = 8.0; // camera z far
        return (2.0 * n) / (f + n - Depth * (f - n));
}

void main()
{
  float Depth = texelFetch(Diffuse, ivec2(gl_FragCoord.xy), 0).r;
  for(int i = 1; i < 4; ++i)
    Depth = min(Depth, texelFetch(Diffuse, ivec2(gl_FragCoord.xy), i).r);

  float LinearDepth = LinearizeDepth(Depth);

  Color = vec4(LinearDepth, LinearDepth, LinearDepth, 1.0);
}

Using max() instead of min() to select the depth sample to use for color
mapping gives the expected result so I guess what is going on here is that at
least one of the depth components for the furthest end of the polygon is 0 (or
close to 0), which is bogus.</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>