mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-11 11:51:45 +00:00
Preview: render at most two frames on the GPU at once so video memory stays flat (#3028)
This commit is contained in:
@@ -362,7 +362,9 @@ as NaNs (a kernel that skips pixels fails the oracle) and validation errors pani
|
||||
(`ui-egui::frames`); headless renders, the CLI (unless `--gpu`) and CI use the CPU. Outside
|
||||
tests, device errors are logged rather than fatal. A viewer frame that runs out of video memory
|
||||
(`Gpu::within_memory`) renders on the CPU, the uploaded layers and pooled textures are freed, and
|
||||
the RAM preview keeps half as many GPU frames from then on. The same guard catches a frame's
|
||||
the RAM preview keeps half as many GPU frames from then on. However many frame threads the viewer
|
||||
runs, at most two of them render on the GPU at once and the rest wait their turn, so their working
|
||||
textures don't add up to more video memory than the GPU has (#3028). The same guard catches a frame's
|
||||
validation errors (an invalid texture, often left by a failed allocation): that frame renders on
|
||||
the CPU and the kept textures are freed, but the compositor stays on and, with no allocation
|
||||
failure before it, the RAM preview keeps its GPU frames (#1319). A frame whose render panics is
|
||||
|
||||
Reference in New Issue
Block a user