[Mesa-dev] [Bug 29835] New: [regression] Post-GLSL2 Mesa culls too much by default.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Aug 27 03:41:03 PDT 2010


           Summary: [regression] Post-GLSL2 Mesa culls too much by
           Product: Mesa
           Version: git
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: major
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev at lists.freedesktop.org
        ReportedBy: cedricv at 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)
    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) :

Screenshot after (post-GLSL2) :

(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.

More information about the mesa-dev mailing list