Bug 236587 - [GTK][WPE] Crashing/weird behaviour when trying to use videos as textures with ANGLE WebGL enabled
Summary: [GTK][WPE] Crashing/weird behaviour when trying to use videos as textures wit...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: ANGLE (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Lord
URL:
Keywords: InRadar
Depends on:
Blocks: 236635 236637
  Show dependency treegraph
 
Reported: 2022-02-14 04:41 PST by Chris Lord
Modified: 2022-02-16 01:41 PST (History)
12 users (show)

See Also:


Attachments
Patch (2.05 KB, patch)
2022-02-14 04:44 PST, Chris Lord
no flags Details | Formatted Diff | Diff
Patch (2.32 KB, patch)
2022-02-15 00:53 PST, Chris Lord
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lord 2022-02-14 04:41:36 PST
Currently, the fast-path for copying the video texture for the WebGL context assumes compatible contexts, but this isn't the case with ANGLE. This causes all sorts of weird behaviour and crashing. We need to disable this fast-path until we can replace it with a more suitable (dmabuf powered?) path.
Comment 1 Chris Lord 2022-02-14 04:44:24 PST
Created attachment 451890 [details]
Patch
Comment 2 Kenneth Russell 2022-02-14 16:50:04 PST
Comment on attachment 451890 [details]
Patch

While understanding there are no new tests - are there any WebGL conformance tests run under LayoutTests/ that can be enabled with this patch?

Aside from that - if you've tested this locally it seems fine to me to move forward the GTK / WPE ports with it. r+
Comment 3 Alejandro G. Castro 2022-02-15 00:29:14 PST
Layoutests with video still crash for me with the patch, I have just tested it. Also it is probably a good idea to use UNUSED_PARAM to avoid all the warnings in the function.
Comment 4 Alejandro G. Castro 2022-02-15 00:38:32 PST
I've got the backtrace of the crash and it seems a problem is that gstreamer is trying to use X? I've tested some demo with video and it works, so the crash in LayoutTests seems an extra problem with gstreamer integration.
Comment 5 Chris Lord 2022-02-15 00:49:56 PST
I thought that the existing tests would be enough for this, but as alexg states, GStreamer is crashing elsewhere for him - I think it's worth landing this because it makes things usable in the browser, let's open two more bugs though;

1- Address the X-related GStreamer crash in LayoutTests
2- Add the dmabuf path to remove the software frame copy

I'll update the patch with the unused parameter macros.
Comment 6 Chris Lord 2022-02-15 00:53:12 PST
Created attachment 452000 [details]
Patch
Comment 7 EWS 2022-02-16 01:40:58 PST
Committed r289884 (247322@main): <https://commits.webkit.org/247322@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452000 [details].
Comment 8 Radar WebKit Bug Importer 2022-02-16 01:41:18 PST
<rdar://problem/89014156>