Version: main (after #641/#648) · Area: GPU compositor (crates/gpu), layer cache (crates/render/src/cache.rs)
What happens
On the GPU compositor (--gpu, Mercury GPU Acceleration), a 4K comp with effect stacks spends most of its
time moving pixels rather than compositing:
- Effect stacks round-trip. A layer with effects is processed by the CPU path (
styled_layer), which
runs each run of GPU-capable effects as upload → kernels → readback, then uploads the result again to
place it.
- Every intermediate is a new texture. Within one frame, a working texture released by the encoder
that made it waits in the shared pool until that encoder submits, so a frame allocates a new texture for
almost every intermediate (a 4K RGBA f32 texture is 127 MB).
- A time-dependent effect re-keys an adjustment layer's footprint. The footprint (source through the
masks, without effects) is keyed with the effects included, so Noise or Grain on a finishing adjustment
layer changes the key every frame and the GPU re-uploads the full-frame footprint each time.
- The upload cache evicts silently. When static layers exceed the fixed 1536 MB upload budget, layer
textures are evicted and re-uploaded every frame without any log line, and an embedder cannot size the
budget to the device.
Measured
On a test PC (Ryzen 7 5800X, RTX 3090 24 GB, Windows 10), effectcraft-cli bench --gpu on a 4K comp
with effect stacks (main, median of 5): GPU cold 1181 ms/frame, GPU warm 208 ms/frame. A 3 s / 90-frame
4K export with --gpu (RAYON_NUM_THREADS=1, so frames stay on the GPU) takes 81.1 s with a 17.2 GB
VRAM peak.
Expected
Effect stacks stay resident on the GPU, a frame reuses its own intermediates, an adjustment layer's
footprint keeps its key across frames, and a full upload cache is reported.
Version: main (after #641/#648) · Area: GPU compositor (
crates/gpu), layer cache (crates/render/src/cache.rs)What happens
On the GPU compositor (
--gpu, Mercury GPU Acceleration), a 4K comp with effect stacks spends most of itstime moving pixels rather than compositing:
styled_layer), whichruns each run of GPU-capable effects as upload → kernels → readback, then uploads the result again to
place it.
that made it waits in the shared pool until that encoder submits, so a frame allocates a new texture for
almost every intermediate (a 4K RGBA f32 texture is 127 MB).
masks, without effects) is keyed with the effects included, so Noise or Grain on a finishing adjustment
layer changes the key every frame and the GPU re-uploads the full-frame footprint each time.
textures are evicted and re-uploaded every frame without any log line, and an embedder cannot size the
budget to the device.
Measured
On a test PC (Ryzen 7 5800X, RTX 3090 24 GB, Windows 10),
effectcraft-cli bench --gpuon a 4K compwith effect stacks (main, median of 5): GPU cold 1181 ms/frame, GPU warm 208 ms/frame. A 3 s / 90-frame
4K export with
--gpu(RAYON_NUM_THREADS=1, so frames stay on the GPU) takes 81.1 s with a 17.2 GBVRAM peak.
Expected
Effect stacks stay resident on the GPU, a frame reuses its own intermediates, an adjustment layer's
footprint keeps its key across frames, and a full upload cache is reported.