Skip to content

feat: Immediates - #2812

Draft
reczkok wants to merge 2 commits into
mainfrom
feat/tgpu-immediates
Draft

feat: Immediates#2812
reczkok wants to merge 2 commits into
mainfrom
feat/tgpu-immediates

Conversation

@reczkok

@reczkok reczkok commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/eslint-plugin-typegpu@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/tgpu-gen@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/tinyest-for-wgsl@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/color@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/radiance-cascades@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/react@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/sdf@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/three@868be67280c0a6a75a4801cdc396dc1cbb7d7386
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@868be67280c0a6a75a4801cdc396dc1cbb7d7386

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

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 [0.95, 1.86, 3.91, 6.50, 7.07, 11.37, 21.78, 24.07]
  line [0.88, 1.80, 4.02, 6.72, 6.81, 12.09, 21.50, 23.73]
  line [0.86, 1.86, 4.30, 6.68, 8.07, 10.98, 23.09, 25.60]
Loading
---
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.28, 0.54, 0.72, 0.82, 1.16, 1.16, 1.41, 1.55]
  line [0.27, 0.48, 0.63, 0.80, 1.06, 1.15, 1.33, 1.44]
  line [0.29, 0.53, 0.68, 0.85, 1.12, 1.25, 1.44, 1.61]
Loading
---
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 [0.81, 2.07, 4.44, 6.62, 11.77, 25.08, 53.84, 107.80]
  line [0.77, 2.09, 3.71, 6.46, 11.71, 24.75, 53.07, 107.58]
  line [0.85, 2.13, 4.43, 6.35, 12.71, 26.37, 56.05, 113.17]
Loading

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 Decreased ➖ Unchanged 🔴 Increased (max 1.72%) ❔ Unknown
0 36 286 0

import * as ... in PR vs import * as ... in target (did bundle size increase?):

Test tsdown
STATIC_tgpu.ts 281.42 kB ($${\color{red}+1.7\%}$$)
tgpu_fn.ts 281.42 kB ($${\color{red}+1.7\%}$$)
tgpu_init.ts 281.42 kB ($${\color{red}+1.7\%}$$)
tgpu_lazy.ts 281.42 kB ($${\color{red}+1.7\%}$$)
tgpu_slot.ts 281.42 kB ($${\color{red}+1.7\%}$$)
tgpu_const.ts 281.42 kB ($${\color{red}+1.7\%}$$)
tgpu_unroll.ts 281.42 kB ($${\color{red}+1.7\%}$$)
tgpu_resolve.ts 281.42 kB ($${\color{red}+1.7\%}$$)
tgpu_accessor.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_comptime.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_vertexFn.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_computeFn.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_fragmentFn.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_privateVar.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_vertexLayout.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_workgroupVar.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_initFromDevice.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_bindGroupLayout.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_mutableAccessor.ts 281.43 kB ($${\color{red}+1.7\%}$$)
tgpu_resolveWithContext.ts 281.44 kB ($${\color{red}+1.7\%}$$)
STATIC_allImports.ts 307.18 kB ($${\color{red}+1.6\%}$$)
d_ref.ts 5.03 kB ($${\color{red}+0.9\%}$$)

import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):

Test tsdown
tgpu_init.ts 271.77 kB ($${\color{green}-3.4\%}$$)
tgpu_initFromDevice.ts 271.24 kB ($${\color{green}-3.6\%}$$)
tgpu_resolve.ts 168.87 kB ($${\color{green}-40.0\%}$$)
tgpu_resolveWithContext.ts 168.80 kB ($${\color{green}-40.0\%}$$)
tgpu_bindGroupLayout.ts 73.83 kB ($${\color{green}-73.8\%}$$)
tgpu_mutableAccessor.ts 68.55 kB ($${\color{green}-75.6\%}$$)
tgpu_accessor.ts 68.55 kB ($${\color{green}-75.6\%}$$)
tgpu_privateVar.ts 67.24 kB ($${\color{green}-76.1\%}$$)
tgpu_workgroupVar.ts 67.24 kB ($${\color{green}-76.1\%}$$)
tgpu_const.ts 66.66 kB ($${\color{green}-76.3\%}$$)
tgpu_lazy.ts 66.46 kB ($${\color{green}-76.4\%}$$)
tgpu_fragmentFn.ts 38.96 kB ($${\color{green}-86.2\%}$$)
tgpu_fn.ts 38.90 kB ($${\color{green}-86.2\%}$$)
tgpu_vertexFn.ts 38.78 kB ($${\color{green}-86.2\%}$$)
tgpu_computeFn.ts 38.48 kB ($${\color{green}-86.3\%}$$)
tgpu_vertexLayout.ts 27.61 kB ($${\color{green}-90.2\%}$$)
tgpu_comptime.ts 15.22 kB ($${\color{green}-94.6\%}$$)
tgpu_unroll.ts 1.75 kB ($${\color{green}-99.4\%}$$)
tgpu_slot.ts 1.70 kB ($${\color{green}-99.4\%}$$)

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

@reczkok
reczkok force-pushed the feat/tgpu-immediates branch from dbf4cea to 9af8a36 Compare August 8, 2026 13:57
@iwoplaza iwoplaza linked an issue Aug 12, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] feat: Immediates

1 participant