-
Artem Bolgar authored
WebXR is using so called 'opaque' framebuffer, i.e. all attachments are made on GL level and not visible by WebGL. When 'enable(gl.STENICL_TEST)' is called, the on WebGL context checks the WebGLFramebuffer object for presence of the STENCIL attachment and fails (because the opaque framebuffer doesn't have those). I am adding an additional state to WebGLFramebuffer to track if the opaque framebuffer has the stencil buffer or not. Note, I can't check if the actual GL framebuffer object has the corresponding attachment, since the framebuffer might not be bound (yet). The repro case: https://artyom17.github.io/webxr-samples/tests/stencil-cube-sea.html In 2D mode you'll see that the green triangle has a cutout, while in VR mode it doesn't. This is because gl.enable(gl.STENCIL_TEST) is failing. Bug: 1057571 Change-Id: I8b94a60de8c14ac7e435f17e57523ec430f22fb0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2084067Reviewed-by:
Brandon Jones <bajones@chromium.org> Reviewed-by:
Kenneth Russell <kbr@chromium.org> Commit-Queue: Artem Bolgar <artyom@fb.com> Cr-Commit-Position: refs/heads/master@{#747074}
a6a81c36