Repository navigation
docs: Add note about externals mutation during resolution - #3256
Merged
Merged
Conversation
|
pkg.pr.new No packages changed since release |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [1.03, 2.07, 4.14, 6.94, 8.61, 11.65, 26.78, 26.56]
line [0.96, 2.13, 4.40, 6.43, 7.89, 13.17, 25.24, 23.69]
line [1.18, 2.29, 4.60, 7.59, 8.58, 13.47, 26.20, 24.92]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.30, 0.58, 0.76, 0.91, 1.25, 1.25, 1.47, 1.69]
line [0.32, 0.56, 0.74, 0.83, 1.14, 1.19, 1.40, 1.54]
line [0.39, 0.58, 0.82, 0.98, 1.47, 1.31, 1.58, 1.83]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [1.08, 2.43, 3.98, 7.47, 14.02, 27.36, 59.44, 119.16]
line [0.94, 2.16, 4.10, 7.88, 13.13, 26.61, 56.80, 115.43]
line [1.01, 2.23, 5.01, 7.78, 13.67, 28.98, 60.88, 122.30]
|
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |
|---|---|---|---|
| 0 | 349 | 0 | 0 |
No notable changes.
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
aleksanderkatan
requested review from
cieplypolar,
iwoplaza,
reczkok and
vende11s
October 22, 2026 09:45
aleksanderkatan
marked this pull request as ready for review
October 22, 2026 09:45
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — reviewed the single-file docs change adding a caution about external values in the functions guide.
- New caution block — documents that all external values are assumed constant during resolution, and that this includes values mutated by
tgpu.comptime. - Twoslash example — demonstrates that a captured external is snapshotted on first resolution and a comptime mutation does not regenerate an already-resolved function.
- Comment retitle — reframes the preceding external-values example from "This is NOT allowed" to "This does NOT affect the pipeline, since it was already compiled".
The behavior shown in the example is accurate: I ran the same code through tgpu.resolve([main]) and the emitted WGSL matches the commented output exactly (modulo the blank line between the two generated functions).
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
reczkok
approved these changes
Oct 22, 2026
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.

No description provided.