Bug 257644 - GPUP WebGL flush() and finish() are asynchronous
Summary: GPUP WebGL flush() and finish() are asynchronous
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-06-02 04:36 PDT by Kimmo Kinnunen
Modified: 2023-06-28 22:46 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2023-06-02 04:36:06 PDT
GPUP WebGL flush() and finish() are asynchronous

Should be synchronous
Comment 1 Radar WebKit Bug Importer 2023-06-02 04:38:12 PDT
<rdar://problem/110163403>
Comment 2 Kimmo Kinnunen 2023-06-02 04:39:45 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14623
Comment 3 Kimmo Kinnunen 2023-06-02 04:42:35 PDT
Blocks bug 252876 for benchmarking before/after read pixels perf
Comment 4 Kenneth Russell 2023-06-02 09:48:05 PDT
The side-effects of flush() and finish() can't be observed by application code in the WebGL context. Even with finish(), there's a WebGL spec difference compared to OpenGL ES that the status of objects like queries can't change unless control is returned to the browser. For this reason it should be safe to leave these asynchronous, and I think WebKit might incur a performance penalty compared to other implementations by making them synchronous. If it's necessary to use these for synchronization with other subsystems in WebKit like the media stack, I'd suggest adding another internal primitive that can't be called by the web platform - Chromium does this.
Comment 5 Kimmo Kinnunen 2023-06-02 09:51:06 PDT
Think Chrome's implementation is also synchronous, e.g. the call between renderer and GPU process.
I think previously we discussed wrt "real finish vs gl.finish as gl.flush()", which cannot be observed.
Comment 6 Kimmo Kinnunen 2023-06-02 09:52:20 PDT
Or, maybe not maybe it is indeed async?
Comment 8 Kimmo Kinnunen 2023-06-05 04:18:19 PDT
> However, the WebGL implementation never calls the underlying Finish, only Flush:

Ah, right! I keep on forgetting.