Skip to content

feat: Make tgpu.declare dereferenceable - #3293

Merged
aleksanderkatan merged 11 commits into
mainfrom
feat/make-tgpudeclare-dereferencable
Oct 30, 2026
Merged

aleksanderkatan merged 11 commits into
mainfrom
feat/make-tgpudeclare-dereferencable

Conversation

@aleksanderkatan

@aleksanderkatan aleksanderkatan commented Oct 29, 2026 •

Copy link
Copy Markdown
Member
  • make tgpu.declare dereferencable and resolvable
  • fix entry function types & add tests
  • add buffer binding tests (to check for consistenty)

@aleksanderkatan aleksanderkatan linked an issue Oct 29, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Oct 29, 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/tgpu-gen@ed1d32358d3c960979877e6a07510f587c67bd04
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@ed1d32358d3c960979877e6a07510f587c67bd04
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@ed1d32358d3c960979877e6a07510f587c67bd04
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/color@ed1d32358d3c960979877e6a07510f587c67bd04
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@ed1d32358d3c960979877e6a07510f587c67bd04

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Oct 29, 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.80, 1.61, 3.43, 5.44, 6.33, 9.48, 19.83, 18.15]
  line [0.77, 1.60, 3.50, 5.28, 6.12, 10.63, 19.75, 18.05]
  line [0.76, 1.54, 3.18, 5.31, 5.98, 9.16, 18.65, 18.61]
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.22, 0.47, 0.56, 0.75, 0.96, 0.97, 1.21, 1.28]
  line [0.22, 0.39, 0.59, 0.69, 0.90, 0.92, 1.14, 1.24]
  line [0.23, 0.42, 0.54, 0.67, 0.92, 0.95, 1.13, 1.26]
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.73, 1.81, 3.22, 5.78, 9.98, 21.07, 45.48, 93.43]
  line [0.72, 1.64, 3.03, 5.64, 10.81, 21.52, 45.45, 90.67]
  line [0.72, 1.59, 2.79, 4.92, 9.49, 20.09, 44.28, 86.90]
Loading

@github-actions

Copy link
Copy Markdown

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

🟢 Decreased ➖ Unchanged 🔴 Increased (max 0.08%) ❔ Unknown
0 349 6 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
aleksanderkatan marked this pull request as ready for review October 29, 2026 14:45
Copilot AI balanced review requested due to automatic review settings October 29, 2026 14:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

pullfrog[bot]

This comment was marked as outdated.

@iwoplaza iwoplaza left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just the nit surfaced by Froggy and we're good

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Since the prior pullfrog review (7e35149), the only change to a PR file is a type-only addition that resolves the outstanding [$gpuValueOf] consistency nit:

  • TgpuDeclare now declares [$gpuValueOf]. readonly [$gpuValueOf]: InferGPU<Void> was added to the TgpuDeclare interface and the matching declare readonly [$gpuValueOf]: InferGPU<Void> prototype declaration on TgpuDeclareImpl, plus the $gpuValueOf import — mirroring TgpuRawCodeSnippet/TgpuVariable exactly. No runtime change: makeDereferenceable already defines the accessor on the prototype.

I verified pnpm --filter typegpu test:types passes at this head.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@aleksanderkatan
aleksanderkatan merged commit 12f5cba into main Oct 30, 2026
8 checks passed
@aleksanderkatan
aleksanderkatan deleted the feat/make-tgpudeclare-dereferencable branch October 30, 2026 16:47
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.

feat: Make tgpu.declare dereferencable

3 participants