Shaders: the frame uniforms keep their buffer between frames

update rebuilt the values vector every frame for a fixed-length list: one
allocation and one free per frame for nothing. eval_custom already treats
the same vector as a buffer to truncate and extend.

Co-Authored-By: Hermes Agent (Nous Research) <noreply@nousresearch.com>
This commit is contained in:
Alexander Krylov
2026-10-26 09:49:41 +03:00
parent 5bcc87983e
commit b59d9ada27
@@ -399,7 +399,8 @@ impl FrameUniforms {
_ => Value::i(&[0]),
}
};
self.values = NAMES.iter().map(|n| value(n)).collect();
self.values.clear();
self.values.extend(NAMES.iter().map(|n| value(n)));
self.frame = (self.frame + 1) % 720_720;
}