[Webkit-unassigned] [Bug 234824] New: Writing gl_FragDepth without depth attachment disables color writes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 3 08:59:53 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=234824

            Bug ID: 234824
           Summary: Writing gl_FragDepth without depth attachment disables
                    color writes
           Product: WebKit
           Version: Safari 15
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ashley at scirra.com
                CC: dino at apple.com, kbr at google.com, kkinnunen at apple.com

In Safari 15, using the gl_FragDepth feature of WebGL 2 in a fragment shader rendering to a framebuffer without a depth attachment, causes all color writes to fail, resulting in a blank screen.

In Chrome and Firefox on both Windows and Android it works correctly.

Minimal repro: https://downloads.scirra.com/labs/bugs/webglfragdepth/

This is a lightly modified version of the fbo_blit example from WebGL 2 samples (http://webglsamples.org/WebGL2Samples/). This example does not use any depth attachment on the FBO. The only meaningful change is the addition of this line to the fragment shader:

gl_FragDepth = 1.0;

This causes all the color writes to fail, producing a blank screen (tested on Safari 15.2 on macOS 12.1 and iPadOS 15.2). However it renders correctly in Chrome/Firefox on Windows/Android. Removing that line causes rendering to work again in Safari. With no depth attachment, it is expected that all writes to gl_FragDepth would simply have no effect. Instead the observed result is that the color writes stop working producing no rendering at all.

We need this to work in our WebGL engine as we want to use some 2D shaders both with and without a depth buffer in use; however in Safari the presence of gl_FragDepth causes all rendering to fail.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220103/1990706a/attachment-0001.htm>


More information about the webkit-unassigned mailing list