Repository navigation
Conversation
…tack (storytold#687). The footprint — the adjustment layer's own source through its masks — was keyed by the same routine as a processed layer, so the whole effects group, per-paint spans, the comp-camera read and the time fold any time-dependent effect forces all entered its key. Noise or Grain on a finishing adjustment therefore changed the key on every frame: the footprint re-rendered, and the GPU compositor re-uploaded a full-frame buffer (127 MB at 4K RGBA f32) each time even though none of those bytes move. key_any now takes an explicit effect scope: All for the processed layer, First(n) for a layer input, and a new Footprint that hashes none of it — masks still re-key through their structure and their evaluated values, shutter stays keyed while masks exist, and the dependencies walk and shape/text wiggle time fold behave as before. A render test moves a mask past its keyframes with Noise enabled and asserts the key is stable across frames, changes with the mask, ignores effect-parameter edits, and that the cached buffer matches the mask it should show.
…get (storytold#687). Static layers over the fixed 1536 MB upload budget evicted live layer textures with no log line, and every later frame paid a full re-upload. Evictions of still-referenced buffers are now counted and the first is reported by name with the budget in effect, and GpuContext::set_upload_budget lets an embedder (or a small-memory device) choose a fitting figure instead of the default.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two of the four things #687 lists, the two that are pure logic and verifiable headless. The GPU-residency and fresh-intermediate-allocation parts need a DX12/Vulkan/Metal device to measure, so they are left for that.
1. Adjustment-layer footprint re-keyed every frame (#687.3)
The footprint (the adjustment layer's source through its masks — where its effects show) is cached so the GPU uploads it once, but its key came from the same
key_anyas a processed layer, so the whole effects group, paint spans, the comp-camera read and the time-fold any time-dependent effect forces all entered it. Noise or Grain on a finishing adjustment changed that key every frame: the footprint re-rendered and a full-frame RGBA-f32 buffer (127 MB at 4K) re-uploaded each frame, even though the footprint's pixels never move.key_anynow takes an explicitEffectScope—All(processed layer),First(n)(a layer's input, unchanged) and a newFootprintthat hashes none of the stack. Masks still re-key (their structure and evaluated values stay in, shutter stays keyed while masks exist); shape/text wiggle time, the effect-dependency walk and the comp-scene read behave exactly as before for the existing scopes.AllandFirst(n)are byte-for-byte today's keys, so the existing hit/miss suites pass unchanged.A render test drives a mask path across its keyframes with Noise enabled and asserts: identical keys at frames 1.5 and 3.5 (well past the animation), a different key where the mask actually moved, an effect-parameter edit that does not re-key, and that the cached buffer still equals the mask it should show. It fails on the old single-scope code.
2. Silent upload-cache eviction (#687.4)
Static layers over the fixed 1536 MB upload budget evicted live textures with no log line and every later frame paid a re-upload. Evictions of still-held buffers are now counted and the first is reported (
gpu <name>: the <N> MB upload budget cannot hold this project's layers…), andGpuContext::set_upload_budgetlets an embedder on a small-memory device size it instead of the hard-coded default.