[PR #2041] [MERGED] Shaders: the frame uniforms keep their buffer between frames #3961

Closed
opened 2026-11-03 04:13:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2041
Author: @Domanffe
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: perf/uniform-values-reuse


📝 Commits (2)

  • b59d9ad Shaders: the frame uniforms keep their buffer between frames
  • 02f147f Merge remote-tracking branch 'origin/main' into perf/uniform-values-reuse

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/gfx/pack_uniforms.rs (+2 -1)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

FrameUniforms::update rebuilt its values vector from scratch every frame: a fresh Vec with one entry per name, then a free of the previous one. The vector's length is fixed at NAMES.len(), so nothing about it needs a new allocation.

It now clears and extends the buffer it already owns, which is how eval_custom treats the same vector a few lines below. The contents and their order are identical.

The pr_ready --quick block follows as a comment.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2041 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/uniform-values-reuse` --- ### 📝 Commits (2) - [`b59d9ad`](https://github.com/horizon-rust/horizon/commit/b59d9ada27ef08208ce4ca182f5da0d9ff112ff4) Shaders: the frame uniforms keep their buffer between frames - [`02f147f`](https://github.com/horizon-rust/horizon/commit/02f147f1374dfeaddccd3e3f3d1e8f1c4ca53453) Merge remote-tracking branch 'origin/main' into perf/uniform-values-reuse ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/gfx/pack_uniforms.rs` (+2 -1) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. `FrameUniforms::update` rebuilt its `values` vector from scratch every frame: a fresh `Vec` with one entry per name, then a free of the previous one. The vector's length is fixed at `NAMES.len()`, so nothing about it needs a new allocation. It now clears and extends the buffer it already owns, which is how `eval_custom` treats the same vector a few lines below. The contents and their order are identical. The `pr_ready --quick` block follows as a comment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:36 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3961
No description provided.