Repository navigation
Conversation
Contributor
Author
|
The
|
Add driver.GPUEnabler and a table per backend for a GPU view's item, resize, frame and release entry points, and connect the frame submitter only when an app mounts a GPU view. Android's minimal app links neither glsl nor the frame path now. On macOS, Linux, Windows and the web the minimal app still links its writer: the pipeline types name writer types (macOS, Linux), and the glass and effect paths compile a program without a GPU view (Windows, web). The minimal-app link test fails on those four. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirror the writers' pipeline types locally, so a struct kept by an interface no longer names msl or glsl, and register Linux's GPU GL callbacks when a GPU view mounts instead of at start. The minimal-app link test now passes on macOS, Linux and Android; Windows and the web still link their writer through the glass and backdrop effect paths, which compile a program without a GPU view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route a glass effect's program and a shader effect's backdrop picture through the glass and shader tables, mirror the writers' register and slot types locally so an interface-kept struct does not name them, and enable the glass table from style resolution. The minimal-app link test passes on every target now, and the feature app still links all three writers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iOS refuses GPU views when the environment has no GPU, and its enabler said nothing about it. The guard also keeps the macOS and iOS enablers from being the same copy, which the duplicate backend check refuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Laotree
force-pushed
the
feature/gpu-link-gating
branch
from
November 26, 2026 11:21
2c72c12 to
4ab7ac8
Compare
This branch has not been deployed
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.
Summary
GPU views and glass effects are now gated like the other optional backend features, so an app that uses neither links none of the MSL, HLSL or GLSL writer.
driver.GPUEnablerand a table per backend hold a GPU view's item, resize, frame and release entry points;driver.GPUSubmitterconnects the frame submitter when an app mounts a GPU view instead of at engine attach, which kept every backend's frame path linked.driver.GlassEnablerfills the glass table from style resolution, and a shader effect's backdrop picture goes through the shader table.BindingSlot,RegisterBinding,UniformBlockSlotandSamplerPair, and Linux registers its GPU GL callbacks when a GPU view mounts rather than at start.msl,hlslandglsljoinunlinkedin the link test, andtestdata/featuresmounts acore.GPUViewso the feature app checks that the writers still link on use.Fixes #2265.
Targets
core,base,ui,tsx, thensgotool)Screenshots
None.
Verification
go tool nsgo check— exit 0 on the host and onmacos_arm64,ios,tvos,watchos,windows_x64,linux_x64,android_arm64andweb.go tool nsgo test— 5068 passed, 3 failed, 85 skipped. All three also fail onupstream/mainbefore this branch:TestMaxRefreshRateReadsEveryMode(this host reports a 0 Hz fastest display mode),TestLayering(cmd/nsgoimportsi18nacross layers) andTestWebViewUnderOverlayIgnoresHoverAndCursor.go tool nsgo test -target <target>— the link tests build every target:TestMinimalAppLinksnow listsmsl,hlslandglslinunlinkedper target and passes, andTestFeatureAppLinksstill links all three for an app that mounts acore.GPUView. GPU views' own behaviour is unchanged on the backends this host can run (macOS and the web tests in the suite); Windows, Android and Linux were checked by veting and linking only.Checklist
fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.changelog.d/fragment, not inCHANGELOG.md.🤖 Generated with Claude Code