software-mansion / software-mansion/TypeGPU

feat: Add a way to use dynamic and static offsets for buffers in pipelines

Open
#1,612 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement exploration
Dominant language
TypeScript
Stars
3.2k
Forks
122
Avg merge
3d 5h
Merged PRs (30d)
34

Description

WebGPU lets us bind parts of buffers to get at memory more efficiently and not make tons of extra buffers. Right now, our pipelines make us bind the whole buffer every time, unless you hack it by giving the same GPU buffer to a bunch of TgpuBuffers with different schemas (but they will always start from offset 0). The most obvious use-case for this is buffers with array schemas. We could add a way to make a "view" on a piece of a buffer that has an array schema when binding it. (There is no clear section in the spec about offsets so here is some reference)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WebGPU dynamicOffsetOrder reference linked in the issue, then inspect the pipeline buffer-binding flow and TgpuBuffers behavior described there. Compare how array schemas are currently bound and define what static and dynamic offsets, including buffer views, should support. Done means pipelines can bind the intended buffer sections without requiring separate buffers or offset-zero workarounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.