-
-
Notifications
You must be signed in to change notification settings - Fork 22
impr: Simplify pipelines with method #1767
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
base: main
Are you sure you want to change the base?
Conversation
pkg.pr.new packages
benchmark commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies the pipeline API by introducing single-argument with
method overloads that accept only a bind group, making the API more ergonomic while maintaining backward compatibility with the existing layout + bind group pattern.
- Adds single-argument
with
method overloads for both compute and render pipelines that accept only a bind group - Deprecates the existing two-argument
with
method overloads - Updates error messages, examples, and documentation to reflect the simplified API
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
packages/typegpu/src/core/pipeline/computePipeline.ts | Adds single-argument with overload and implementation for compute pipelines |
packages/typegpu/src/core/pipeline/renderPipeline.ts | Adds single-argument with overload and implementation for render pipelines |
packages/typegpu/src/prepareDispatch.ts | Updates prepareDispatch API to use simplified with method |
packages/typegpu/src/errors.ts | Updates error message to reflect new API |
packages/typegpu/tests/*.test.ts | Updates tests to use new API and adds type checking tests |
apps/typegpu-docs/src/examples/**/*.ts | Updates all examples to use simplified API |
apps/typegpu-docs/src/content/docs/**/*.mdx | Updates documentation to reflect new API |
packages/typegpu-noise/src/**/dynamic-cache.ts | Updates noise package examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Closes #1727.
Closes #1750.
with
methods.compute.with
overload.with
overloads.with
overloads.prepareDispatch
API.There is some code duplication, but I think it's fine since it will disappear once we remove the deprecated implementations.