Dev/issue 4110 wasm 4gb swapchain rendering#4122
Open
Soumilgit wants to merge 2 commits into
Open
Conversation
Contributor
📦 Try the packages from this PRWarning Do not run these scripts without first reviewing the code in this PR. Step 1 — Download the packages bash / macOS / Linux: curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4122PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4122"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4122/packages --name skiasharp-pr-4122More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4122 |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
This fixes WASM rendering issues when apps run with Emscripten
MAXIMUM_MEMORY=4GB.The WebGL-backed view path now installs a guarded upload fallback for large WASM heaps. When texture upload APIs receive a typed-array view backed by a heap larger than the 2GB signed boundary, the view is copied before calling WebGL. This avoids browser-side
texSubImage2D: ArrayBufferView not big enough for requestfailures caused by large-heap view/offset handling.This also fixes an Uno
SKXamlCanvasraster path bug where the non-secure path constructedUint8ClampedArraywithbyteLengthas the heap offset instead ofpData.Tests were limited by the local environment:
node --checkpassed for the changed JavaScript assets.dotnet test tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csprojwas blocked by missing mobile workloads.dotnet test tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj -p:TargetFrameworks=net10.0timed out locally after 10 minutes.Bugs Fixed
API Changes
None.
Behavioral Changes
WASM WebGL views defensively copy texture upload typed-array data when the backing WASM heap is larger than 2GB. This is intended to preserve rendering correctness for apps using larger Emscripten memory limits.
Required skia PR
None.
PR Checklist