Skip to content

feat: First-class buffer shorthands #1404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 25, 2025
Merged

Conversation

iwoplaza
Copy link
Collaborator

@iwoplaza iwoplaza commented Jun 24, 2025

Changes:

  • Updated naming convention
    • Updated examples to use the new naming convention
  • Stabilizing buffer shorthands (not on ['~unstable'] anymore)
  • Buffer shorthands now have their own first-class type
  • Added missing APIs on buffer shorthands
  • .buffer on shorthands now carries the proper flags of the buffer on the type
  • Added the .$ shorthand to more resources, apart from just the bind group layouts

Copy link

github-actions bot commented Jun 24, 2025

pkg.pr.new

packages

pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@1404
pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@64c476edb8ec802f5cb624d3f3c6d1c579c27e73

benchmark
view benchmark

commit
view commit

@iwoplaza iwoplaza linked an issue Jun 24, 2025 that may be closed by this pull request
3 tasks
@iwoplaza iwoplaza marked this pull request as ready for review June 24, 2025 15:24
Copy link
Contributor

@aleksanderkatan aleksanderkatan left a comment

Choose a reason for hiding this comment

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

🐫 !

Copy link
Contributor

@mhawryluk mhawryluk left a comment

Choose a reason for hiding this comment

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

please remove write method from bufferUsage

.createBuffer(Camera, cameraInitial)
.$usage('uniform')
.$name('camera');
const camera = root.createUniform(Camera, cameraInitial).$name('camera');
Copy link
Contributor

Choose a reason for hiding this comment

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

revert to buffer

@iwoplaza iwoplaza requested a review from mhawryluk June 25, 2025 10:26
Copy link
Contributor

@mhawryluk mhawryluk left a comment

Choose a reason for hiding this comment

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

🎾

@iwoplaza iwoplaza merged commit 8105074 into main Jun 25, 2025
6 checks passed
@iwoplaza iwoplaza deleted the feat/first-class-buffer-shorthands branch June 25, 2025 10:32
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: First-class buffer shorthands
3 participants