Skip to content

Conversation

@aleksanderkatan
Copy link
Contributor

@aleksanderkatan aleksanderkatan commented Oct 30, 2025

We decided not to make the guarded pipelines resolvable, but to instead expose the underlying pipeline.

@aleksanderkatan aleksanderkatan linked an issue Oct 30, 2025 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Oct 30, 2025

pkg.pr.new

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

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

benchmark
view benchmark

commit
view commit

Copy link

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 exposes the underlying pipeline and sizeUniform properties on TgpuGuardedComputePipeline to enable resolution of guarded compute pipelines. Since tgpu.resolve cannot directly resolve guarded pipelines (which are wrappers), users need access to the inner pipeline for shader code generation.

  • Added public getters for pipeline and sizeUniform on TgpuGuardedComputePipeline
  • Implemented the getters in TgpuGuardedComputePipelineImpl
  • Added comprehensive test coverage for pipeline resolution scenarios

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/typegpu/src/core/root/rootTypes.ts Added JSDoc documentation and type definitions for pipeline and sizeUniform properties on the TgpuGuardedComputePipeline interface
packages/typegpu/src/core/root/init.ts Implemented getter methods for pipeline and sizeUniform in TgpuGuardedComputePipelineImpl class
packages/typegpu/tests/pipeline-resolution.test.ts Added comprehensive test suite covering render pipeline, compute pipeline, guarded compute pipeline resolution, and error handling for multiple pipelines
apps/typegpu-docs/src/content/docs/fundamentals/utils.mdx Added documentation explaining how to access the inner pipeline from a guarded pipeline for use with tgpu.resolve

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aleksanderkatan aleksanderkatan marked this pull request as ready for review October 30, 2025 12:44
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: Resolvable guarded compute pipelines

3 participants