Commit d856156
Tests.ExternalTexture.Msaa: migrate to synchronous CreateForJavaScript
With BabylonJS#1646's synchronous ExternalTexture::CreateForJavaScript and BabylonJS#1652's
new threading model both in this branch, the original test pattern is
both unnecessary and broken:
- Unnecessary: AddToContextAsync's two-frame dance (queue in frame 1,
wait for bgfx::frame() to resolve the promise, run startup in frame 2)
exists only because the texture wrap was async. CreateForJavaScript is
synchronous so the wrap, startup(), and renderFrame() all run in the
same JS task inside a single frame.
- Broken: under the new model, SubmitCommands synchronously acquires a
FrameCompletionScope which blocks when no frame is in progress.
The old between-frames startup() pattern deadlocks.
Collapse to a single frame + single dispatch that wraps the texture,
runs startup(), and chains renderFrame()'s promise resolution. The host
app pattern host apps should follow with the new API.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 5f0249d commit d856156
1 file changed
Lines changed: 11 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
83 | 72 | | |
84 | 73 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 74 | | |
101 | 75 | | |
102 | 76 | | |
| |||
0 commit comments