Skip to content

Conversation

aleksanderkatan
Copy link
Contributor

@aleksanderkatan aleksanderkatan commented Sep 30, 2025

Closes #1727.
Closes #1750.

  • Add tests for the current with methods.
  • Fix current compute.with overload.
  • Add single argument with overloads.
  • Deprecate old with overloads.
  • Update examples.
  • Update prepareDispatch API.
  • Docs.

There is some code duplication, but I think it's fine since it will disappear once we remove the deprecated implementations.

Copy link

github-actions bot commented Sep 30, 2025

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/typegpu@fe43c5e9aab281c534d8d8edc516cb49d40182c9
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@fe43c5e9aab281c534d8d8edc516cb49d40182c9
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@fe43c5e9aab281c534d8d8edc516cb49d40182c9

benchmark
view benchmark

commit
view commit

@aleksanderkatan aleksanderkatan linked an issue Sep 30, 2025 that may be closed by this pull request
Copy link

@Copilot Copilot AI left a 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.

@aleksanderkatan aleksanderkatan marked this pull request as ready for review October 1, 2025 14:06
@aleksanderkatan aleksanderkatan changed the title impr: Simplify pipelines with method impr: Simplify pipelines with method Oct 6, 2025
Copy link
Collaborator

@iwoplaza iwoplaza left a comment

Choose a reason for hiding this comment

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

So much cleaner! 👏

@aleksanderkatan aleksanderkatan merged commit c1f831e into main Oct 7, 2025
5 checks passed
@aleksanderkatan aleksanderkatan deleted the impr/simplify-pipelines-with-method branch October 10, 2025 15:45
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.

impr: Simplify pipeline's with method fix: Type check bind groups in with methods

2 participants