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

           Summary: [regression] Post-GLSL2 Mesa culls too much by
                    default.
           Product: Mesa
           Version: git
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: major
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev@lists.freedesktop.org
        ReportedBy: cedr...@neonux.com


I've recently seen weird rendering results on one app I'm working on.

After investigation it seems Mesa now optimizes/culls too many triangles by
default, even though GL_CULL_FACE is disabled.
This has very visible rendering consequences when using 'discard' in fragment
shader for instance.

With the help of ShaderMaker I could isolate a simple testcase for this :

Applying an RGBA texture with an alpha=0.0 region and a fragment shader like :

--
uniform sampler2D tex0;

void main()
{
    vec4 col = texture2D(tex0, gl_TexCoord[0].xy);
    if (col.w == 0.0f)
        discard;
    gl_FragColor = col;
}
--

Some (but not all interestingly) of the back-facing polygons are not drawn
anymore as they should (GL_CULL_FACE disabled + discard).


Screnshot before (pre-GLSL2 merge... and with NVidia driver) :
http://neonux.com/webgl/before.png

Screenshot after (post-GLSL2) :
http://neonux.com/webgl/after.png


(texture used is http://neonux.com/webgl/128-40-RGBA.png if you'd like to do
same quick testing).


I tried to bisect the issue but could not do much as there was a lot of build
failures in the period of time the regression happened it seems.

However my last known good commit is 15a3b42e135a3a2cb463ec3cff80a55dd8528051
(just before GLSL2 merge), my first known bad commit is
279aeebff5d5dcdad89f513f5727fc545ec96039, but it's likely that the regression
happened somewhere IN the glsl2 branch.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to