Skip to content

test: Cover the frame graph pass merging and store requests - #9785

Merged
mvaligursky merged 1 commit into
mainfrom
mv-frame-graph-compile-tests
Oct 16, 2026
Merged

mvaligursky merged 1 commit into
mainfrom
mv-frame-graph-compile-tests

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Adds unit tests for the FrameGraph compile step, which merges neighbouring passes on the same render target into a single GPU render pass and asks a pass to store the attachments the next pass on its target loads. Only tests, no engine changes.

Changes:

  • New FrameGraph#compile tests, alongside the ones added in fix: Do not merge a frame pass which does not execute with its neighbour #9784:
    • no merge of passes on different targets, or of passes without a target
    • no merge into a pass which clears its color, depth or stencil
    • no merge of a pass with its own after-pass, before-pass or internal before-pass, while the neighbouring passes they do not own still merge
    • the store request of each attachment the next pass on the target loads, per color attachment of a multisampled target with two of them, and for the depth and the stencil

Add FrameGraph compile tests for the cases the existing ones did not
cover: no merge across different targets or passes without a target, no
merge into a pass clearing its color, depth or stencil, no merge of a
pass with its own after-pass, before-pass or internal before-pass, and
the store request of each attachment the next pass on the target loads.
@github-actions

Copy link
Copy Markdown

Build size report

This PR does not change the size of the minified bundles.

Bundle Minified Gzip Brotli
playcanvas.min.js 2664.2 KB — 690.8 KB — 535.6 KB —
playcanvas.min.mjs 2661.0 KB — 689.5 KB — 535.4 KB —

@mvaligursky mvaligursky left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Automated PR review by Codex (OpenAI AI agent), posted through the account holder's authorized automated review process.

Reviewed ace162838. No actionable findings. This is test-only, with no runtime, public API, or bundle changes.

The new cases exercise the actual frame-graph scheduling/compilation path and check both forbidden merges and permitted neighboring merges. The multisampled two-color-attachment case first verifies that store flags start false, then distinguishes the attachment that is loaded from the one that is cleared, so the assertions are not passing merely because of default store settings.

Validation:

  • Full unit suite: 4,385 passing, 43 pending.
  • Full WebGPU/Metal suite: 4,384 passing, 39 pending.
  • Changed-file lint passed; PR CI is green.
  • All 19 FrameGraph tests pass independently.
  • Additional in-memory mutation checks deliberately broke 11 merge/store rules: target matching, targetless passes, each clear guard, after/before/internal-before dependencies, color-attachment selection, depth storage, and stencil-clear storage handling. The new tests detected every fault. These probes did not modify engine files.

@mvaligursky
mvaligursky merged commit adc8b99 into main Oct 16, 2026
11 checks passed
@mvaligursky
mvaligursky deleted the mv-frame-graph-compile-tests branch October 16, 2026 19:17

This branch was successfully deployed

2 active deployments
Preview – engine — ace16283 Deployed Oct 16, 2026 by vercel[bot]
Preview – engine-api-docs — ace16283 Deployed Oct 16, 2026 by vercel[bot]
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.

1 participant