WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
273177
[GTK][WPE] Don't allow depth test and stencil clipping if packed depth stencil is not supported
https://bugs.webkit.org/show_bug.cgi?id=273177
Summary
[GTK][WPE] Don't allow depth test and stencil clipping if packed depth stenci...
Miguel Gomez
Reported
2024-04-24 03:46:57 PDT
A BitmapTexture can be used as a rendering target by creating a framebuffer object for it. This framebuffer can have a depth buffer to use depth testing, and a stencil buffer to perform stencil clipping. But using both features at the same time, which requires both a depth buffer and a stencil buffer, is only supported when GLES supports using the same buffer for both (called packed depth stencil). This is supported on GLES3 contexts or in GLES2 contexts that have the GL_OES_packed_depth_stencil extension. We need to modify BitmapTexture to allow using both features at the same time when packed depth stencil is available.
Attachments
Add attachment
proposed patch, testcase, etc.
Miguel Gomez
Comment 1
2024-04-24 03:53:29 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/27682
Miguel Gomez
Comment 2
2024-04-24 05:54:28 PDT
This is going to fix the rendering for the cases where packed depth stencil is supported. For the rest of the cases, like GLES2 without the GL_OES_packed_depth_stencil extension, stencil clipping won't work on BitmapTextures where we're doing depth testing. I'll work on that next. My idea for this would be detecting that the call to initializeStencil() in TextureMapper::beginClip() failed to bind a stencilBuffer, and add an special implementation of the stencil clip for that case using an intermediate texture: - create a new intermediate BitmapTexture with a stencil only buffer and bind it - perform the stencil clip on the intermediate BitmapTexture - let the rendering continue on the intermediate BitmapTexture until the matching endClip - inside endClip, bind back the initial BitmapTexture and render the contents of the intermediate texture into it
Miguel Gomez
Comment 3
2024-04-24 06:07:38 PDT
(In reply to Miguel Gomez from
comment #2
)
> This is going to fix the rendering for the cases where packed depth stencil > is supported. > > For the rest of the cases, like GLES2 without the > GL_OES_packed_depth_stencil extension, stencil clipping won't work on > BitmapTextures where we're doing depth testing. I'll work on that next. > > My idea for this would be detecting that the call to initializeStencil() in > TextureMapper::beginClip() failed to bind a stencilBuffer, and add an > special implementation of the stencil clip for that case using an > intermediate texture: > > - create a new intermediate BitmapTexture with a stencil only buffer and > bind it > - perform the stencil clip on the intermediate BitmapTexture > - let the rendering continue on the intermediate BitmapTexture until the > matching endClip > - inside endClip, bind back the initial BitmapTexture and render the > contents of the intermediate texture into it
mmmmm nope, that's not going to work, as the depth testing won't be applied to the elements rendered into the intermediate BitmapTexture, so the result may be different than doing both depth testing and stencil clipping at the same time.
EWS
Comment 4
2024-04-30 00:35:49 PDT
Committed
278159@main
(ed286350cfd5): <
https://commits.webkit.org/278159@main
> Reviewed commits have been landed. Closing PR #27682 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug