Skip to content

Fix GPU compositor startup and reduce preview CPU overhead - #37

Merged
Brent001 merged 33 commits into
mainfrom
perf/gpu-init-and-render-cache
Oct 20, 2026
Merged

Brent001 merged 33 commits into
mainfrom
perf/gpu-init-and-render-cache

Conversation

@Brent001

@Brent001 Brent001 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Ports upstream performance work not yet implemented in this fork:

  • Upstream #1928: concurrent preview workers reuse the first retained layer/style buffer, avoiding duplicate cached buffers and GPU uploads.
  • Upstream #1604: memoize repeated Cryptomatte ID colours and skip RGB work for matte-only / non-Colors displays.
  • Upstream #1441: keep GPU effect-chain output images resident and hand them to the compositor upload cache rather than uploading the just-read-back result again. The hand-off is made only if the shared layer cache returns the same pixel allocation, and handed-off textures are retired safely while frame encoders may still reference them.

It also reduces startup work for DX12:

  • Defer compositor, sky, and Classic 3D compute-pipeline compilation until a kernel is first used, rather than compiling every core/3D pipeline before attaching the GPU compositor.
  • Preserve whole-frame CPU fallback when a lazy core pipeline fails, so a partially composited frame is never published. Unsupported individual effects can still fall back independently.
  • Replace the indefinite "GPU compositor is initializing" message with a 30-second diagnostic state while CPU compositing remains available.
  • Add Windows CI and regression tests for concurrent cache sharing, Cryptomatte parity, lazy pipelines, safe whole-frame fallback, and the effect texture hand-off lifecycle.

Why

The reported Intel HD Graphics 520 / DX12 system report remains in background GPU initialization while CPU compositing stays active. Deferring seldom-used pipeline compilation should let the compositor attach earlier. Once attached, caching the effect output on-device avoids a redundant full-buffer GPU upload and reduces CPU↔GPU traffic.

Validation

The Windows workflow checks the desktop, CLI, UI, GPU, render, effects, and export crates, then runs focused regression tests. This PR does not claim full GPU utilization until the checks pass and it is verified on the affected Intel machine.

@Brent001
Brent001 merged commit 3fd59e5 into main Oct 20, 2026
1 of 2 checks passed
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