Commit cc58c2d
Tests.ExternalTexture.Msaa: open frame 2 before waiting on startup()
The MSAA tests deadlocked after merging master into rework-thread-model.
The render thread waits on startupDone while the JS thread runs the
AddToContextAsync .then() callback. That callback calls startup() ->
new NativeEngine() / new Scene() / new RenderTargetTexture(), which
eventually hits SubmitCommands. SubmitCommands now synchronously
acquires a FrameCompletionScope, which blocks while m_frameBlocked
is true. The gate only opens on the next StartRenderingCurrentFrame --
but the render thread is stuck on startupDone. Deadlock.
Fix: open frame 2 before waiting on startupDone, and reuse the same
frame for renderFrame(). Any JS work that touches the engine has to run
while a frame is in progress under the new model.
This workaround is temporary. Once #1646 lands, the test should migrate
from AddToContextAsync to the new synchronous CreateForJavaScript, at
which point startup() runs in the same JS task as the texture creation
and the cross-frame dance disappears entirely.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent dd76710 commit cc58c2d
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | 92 | | |
94 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
0 commit comments