12 Commits
Author SHA1 Message Date
Matej Kozlovský 2669e1a1de Export: cap GPU renders only, for GPU-accelerated projects (#879 review)
- The cap applied whenever an accelerator was attached, so Software Only
  projects (which render on the CPU) rendered one frame at a time. It
  now needs the project's GPU acceleration too, as #898 gates it.
- Only the render is capped: each window of max(cap, threads) frames
  renders in chunks of the cap, then encodes in parallel, holding at
  most one window of images.
- An invalid EFFECTCRAFT_GPU_INFLIGHT (0, negative, not a number, too
  large) logs a warning before using the default.
- The default stays one frame: the GPU backend reports no free or total
  device memory portably, so it is not sized from VRAM.
2026-10-12 16:51:36 +02:00
Matej Kozlovský 9d63ec19fc Export: one GPU frame in flight by default (#879)
Three frames at once still filled an 8 GB card on the #879 project at
1080p (7.9 GB, the same as no cap); one frame peaked at 6.3 GB and two at
7.0 to 7.8 GB. One matches how the export scheduler in #898 renders image
sequences (one GPU worker, synchronous readback). EFFECTCRAFT_GPU_INFLIGHT
still raises it.
2026-10-12 16:23:12 +02:00
Matej Kozlovský 742472440e Export: cap GPU frames rendering at once (#879)
With a GPU accelerator every frame of a batch rendered in parallel, each
holding its own working textures, so a 30-frame 1080p batch could take
the whole card (20+ GB on an RTX 3090) and run shared-memory GPUs out of
memory. Cx::frames now renders GPU frames in consecutive chunks of 3
(EFFECTCRAFT_GPU_INFLIGHT overrides it), the same cap as the export
scheduler in #898; output order and the CPU path are unchanged.

Fixes #879
2026-10-12 16:00:05 +02:00
Matej Kozlovský 47dbd8dbd5 Cryptomatte: the rank planes are resolved once per evaluation and the GPU path reduces them on all cores, instead of formatting and looking up channel names for every pixel in a single-threaded loop (#473)
AuxChannels::crypto_rank_planes resolves a layer's (ID, coverage) planes once; crypto_ranks keeps its signature on top of it. The CPU effect and the GPU effect's aux image (effectcraft_effects::crypto_aux_image, rayon) index the planes per pixel. Output is bit-identical.
2026-10-12 13:29:03 +02:00
Matej Kozlovský f6497177b4 Merge main into gpu-resident-effects 2026-10-12 12:41:40 +02:00
Matej Kozlovský bc6a145203 GPU: a layer's effect stack runs resident on the GPU and is placed directly, instead of a readback and re-upload around every GPU effect run (#687) 2026-10-12 09:47:28 +02:00
Matej Kozlovský d8ff1189dc GPU: the upload cache budget can be set per context and warns once when full, instead of evicting layer textures silently (#687) 2026-10-12 09:47:28 +02:00
Matej Kozlovský 9c5c187292 GPU: an Enc reuses the working textures it released at once instead of allocating new ones for every intermediate of a frame (#687) 2026-10-12 09:47:28 +02:00
Matej Kozlovský eec81bbe0e Render: an adjustment layer's footprint key ignores its effects, so a time-dependent effect (Noise) no longer re-keys it and the GPU re-uploads it every frame (#687) 2026-10-12 09:47:28 +02:00
Matej Kozlovský ced9e97c4a GPU: log why the GPU compositor declined a frame before the CPU renders it, instead of falling back silently (#640) 2026-10-10 21:17:51 +02:00
Matej Kozlovský 8321d099d2 GPU: precomp layers render their nested comp resident on the GPU instead of on the CPU and uploading it every frame (#640) 2026-10-10 21:17:51 +02:00
Matej Kozlovský 21b732875f Render: Renderer::precomp_source and run_layer_effects_on, so an accelerator can render a precomp layer's nested comp itself (#640) 2026-10-10 21:17:51 +02:00