Bug 237883 - [GTK][WPE] Use GBMBufferSwapchain in GraphicsContextGLTextureMapperANGLE
Summary: [GTK][WPE] Use GBMBufferSwapchain in GraphicsContextGLTextureMapperANGLE
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords: InRadar
Depends on: 238322
Blocks: DMA-BUF
  Show dependency treegraph
 
Reported: 2022-03-15 04:20 PDT by Zan Dobersek
Modified: 2022-03-29 01:01 PDT (History)
10 users (show)

See Also:


Attachments
WIP patch (18.07 KB, patch)
2022-03-15 04:21 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP patch (20.82 KB, patch)
2022-03-23 02:07 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP patch (22.75 KB, patch)
2022-03-24 05:19 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP patch (21.14 KB, patch)
2022-03-28 04:36 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (23.99 KB, patch)
2022-03-28 07:01 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (24.09 KB, patch)
2022-03-28 22:41 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2022-03-15 04:20:08 PDT
For each ANGLE-produced WebGL frame, we'd want to retrieve a dmabuf buffer via GBMBufferSwapchain, impose it as the backing for the texture that's being used as the default framebuffer color attachment, and finally push it into the rendering pipeline once the frame is complete. Upon the next frame the swapchain would provide a different buffer, and the cycle repeats.
Comment 1 Zan Dobersek 2022-03-15 04:21:38 PDT
Created attachment 454692 [details]
WIP patch

Early, but functions on the most basic WebGL content. It still needs cleanup, proper understanding of what's used in different configurations sharing this code, and how other things like preserved-drawing-buffer affect this.
Comment 2 Zan Dobersek 2022-03-23 02:07:53 PDT
Created attachment 455475 [details]
WIP patch
Comment 3 Zan Dobersek 2022-03-24 05:19:45 PDT
Created attachment 455633 [details]
WIP patch
Comment 4 Zan Dobersek 2022-03-28 04:36:25 PDT
Created attachment 455901 [details]
WIP patch
Comment 5 Zan Dobersek 2022-03-28 07:01:19 PDT
Created attachment 455914 [details]
Patch
Comment 6 Alejandro G. Castro 2022-03-28 12:55:08 PDT
Comment on attachment 455914 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=455914&action=review

LGTM! Just check the unguarded line to make sure we do not break other compilations.

> Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:476
> +    m_swapchain.displayBO = WTFMove(m_swapchain.drawBO);

This needs to be guarded with the TEXTURE_MAPPER_DMABUF. It is causing the wincairo failure.
Comment 7 Zan Dobersek 2022-03-28 22:41:01 PDT
Created attachment 455994 [details]
Patch for landing
Comment 8 EWS 2022-03-29 01:00:44 PDT
Committed r292025 (248968@main): <https://commits.webkit.org/248968@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455994 [details].
Comment 9 Radar WebKit Bug Importer 2022-03-29 01:01:18 PDT
<rdar://problem/90969336>