software-mansion / software-mansion/TypeGPU
feat: Add a way to use dynamic and static offsets for buffers in pipelines
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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