AffineFrameCost¶
Qualified name: algan.rendering.memory\_model.AffineFrameCost
- class AffineFrameCost[source]¶
Bases:
objectWhat one prepared batch costs, split into its actor and frame parts.
A batch’s cost is
a + b * frames.b * framesis what the frame count buys – per-frame geometry, frame buffers – andais what the batch’s actor set costs however few frames are rendered: textures, per-primitive metadata, kernel workspace.Reading the total as if it all scaled (divide the budget by the measured cost, multiply by the frame count) does two things wrong. It under-reads, because the fixed part is charged as though shrinking the window shrank it. And it cannot tell a batch with too many frames from one with too many actors – which matters, because only the first is fixable by shortening the window. Batch preparation selects the actors that have spawned by the window’s end, so the lever on
ais the window’s reach over the spawn schedule, not its length: a render that could not tell them apart shrank its window to a single frame and stayed there.One instance covers one prepared batch. The actor set is what fixes
a, so a fresh fetch is a fresh line; the arena preflight feeds it one observation per probe of that batch.Methods
Fraction of this batch's own cost that its actor set fixes.
describea-- what this batch's actor set costs at any frame count.Largest frame count expected to fit, or
Noneif unmeasured.observeAttributes
Bytes this cost is allowed, as of the most recent observation.
Fraction of this batch’s own cost that its actor set fixes.
Measured against the batch’s cost at the largest window observed, not against the budget: a budget is a prediction and can collapse (the peak models that supply some of them carry intercepts of their own), which would make every batch look actor-bound. What the caller needs to know is simply how much of this cost shortening the window can reach – near 1.0, almost none of it, and only a batch carrying fewer actors will be smaller.
Noneuntil two frame counts have been measured; one sample cannot distinguish the two parts at all.
- budget¶
Bytes this cost is allowed, as of the most recent observation.