Repository navigation
fix(3dgl): Render GLCanvasElement on WebAssembly (6.7) - #25160
agneszitte merged 2 commits into
Conversation
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25160/wasm-skia-net9/index.html |
|
The build 238610 did not find any UI Test snapshots differences. |
|
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25160/wasm-skia-net9/index.html |
|
The build 238988 did not find any UI Test snapshots differences. |
|
|
90d2d16 to
74f32b6
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 240358 did not find any UI Test snapshots differences. |
|
|
74f32b6 to
2865d55
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 242858 did not find any UI Test snapshots differences. |
2865d55 to
b2db2a9
Compare
GLCanvasElement skipped its BGRA readback probe on the browser, on the premise that the JS shim translated BGRA reads. GL entry points now resolve to emscripten's native GL first, so glReadPixels reaches WebGL with GL_BGRA, which WebGL 2.0 rejects with INVALID_ENUM. The first readback failed and the element stopped rendering, leaving it blank. WebGL reports itself as OpenGL ES, so the existing GLES probe now runs there and selects the RGBA read with the red/blue swap. Every element gets its context from the same platform logic, so the probe now runs once per process instead of per element, which also keeps the browser from logging a WebGL warning for each element. Fixes unoplatform#24497 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit cf193b1)
Renders a GLCanvasElement cleared to pure red and checks the readback shows red, which fails for a blank canvas and for a red/blue mix-up. Inconclusive where no OpenGL context is available. Backport: this branch has no GLCanvasElement.OnGLUnavailable, so the test treats IsGLInitialized turning false before the first render as no usable OpenGL context. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 3d210f7)
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
7b47d77
into
unoplatform:release/stable/6.7
GitHub Issue: #24497 (backport of #25158)
PR Type:
🐞 Bugfix
What changed? 🚀
Backport of #25158 to 6.7. Both commits are cherry-picked with
-x.GLCanvasElementrenders nothing on WebAssembly: its first framebuffer readback asks WebGL forGL_BGRA, which WebGL 2.0 rejects withINVALID_ENUM, and the element then disables itself. The fix, the same as #25158:Differences from #25158. The fix commit applied as is. The test commit needed two changes:
OnGLUnavailableon this branch. That hook doesn't exist on 6.7, so the test treatsIsGLInitializedturning false before the first render as "no usable OpenGL context" (inconclusive). A readback failure only happens after a render, so it still fails the test.Tests/Windows_UI_Xaml_Controls/, and theGraphics3DGLreference sits next to this branch's other add-in references. The compile-excludedUno.Core.Extensions.Logging.Singletonreference is needed here too, for the sameLog()ambiguity; its version comes fromDirectory.Build.targets.Validation:
SamplesApp.Skia.WebAssembly.Browser,net10.0, headless Edge), from a cleanbin/obj:GLCanvasElement.cs, withIsGLInitializedfalse after the readback error.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code