feat: Limit overflow suggestions#2146
Merged
aleksanderkatan merged 8 commits intomainfrom Feb 10, 2026
Merged
Conversation
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (335 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
|
pkg.pr.new packages benchmark commit |
There was a problem hiding this comment.
Pull request overview
This PR adds a feature to warn developers when they exceed WebGPU buffer limits, specifically for uniform and storage buffers. The warnings provide helpful suggestions on how to resolve the issue.
Changes:
- Added
warnIfOverflowfunction to check buffer counts against device limits - Integrated overflow warnings into render and compute pipeline execution paths
- Added comprehensive test coverage for the new warning functionality
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 51 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/typegpu/src/core/pipeline/limitsOverflow.ts | New file implementing buffer limit overflow detection and warning logic |
| packages/typegpu/src/core/pipeline/renderPipeline.ts | Integrates overflow warnings into render pipeline execution |
| packages/typegpu/src/core/pipeline/computePipeline.ts | Integrates overflow warnings into compute pipeline execution |
| packages/typegpu/tests/limitsOverflow.test.ts | Unit tests for the warnIfOverflow function |
| packages/typegpu/tests/renderPipeline.test.ts | Integration test for overflow warnings in render pipelines |
| packages/typegpu/tests/computePipeline.test.ts | Integration test for overflow warnings in compute pipelines |
| packages/typegpu/tests/utils/extendedIt.ts | Adds mock device limits for testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Theoretically we could do this for any fixed resource, such as samplers etc.
Let me know what other suggestions would you like to see.