[PR #977] [MERGED] Log each step of the renderer's start #2957

Closed
opened 2026-11-02 16:00:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/renderer-startup-steps


📝 Commits (1)

📊 Changes

1 file changed (+76 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/gfx.rs (+76 -7)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

The renderer logs each step of its start, so a native crash in a graphics driver (which leaves no panic and no crash report, as in #746) shows where it stopped. After the existing Horizon renderer: <adapter> (<backend>, <type>) line, the log gets:

Horizon renderer: requesting the device (driver <name version>) with features [MAPPABLE_PRIMARY_BUFFERS | TIMESTAMP_QUERY | INDIRECT_FIRST_INSTANCE] and the adapter's limits (buffers up to 41747087360 bytes, storage bindings up to 41747087360 bytes, 2048 texture layers)
Horizon renderer: device ready; configuring the surface (1280x720 Bgra8Unorm, Mailbox)
Horizon renderer: creating the pipelines
Horizon renderer: pipelines ready (multi-draw on, occlusion culling off, GPU timer on)
Horizon renderer: acquiring the first frame
Horizon renderer: submitting the first frame
Horizon renderer: presenting the first frame
Horizon: first frame after 2613 ms

These lines are logged once per device. Reloading resources on the same device doesn't repeat them, and a minimized window doesn't repeat the acquire line. latest.log is written unbuffered, and each step also calls log::logger().flush() in case a logger buffers.

Why

#746: two players crash with 0xc0000005 right after the adapter line, and nothing in the log shows which step failed. #976 fixes that crash (the wgpu 30 empty descriptor pool). With these lines, the next driver crash names its step. The device line also records the driver version, which until now reached only telemetry and crash reports, never latest.log.

How tested

  • cargo fmt --all -- --check and cargo clippy -p horizon-client --all-targets -- -D warnings are clean.
  • Ran it on the Mac mini (offscreen, Metal) with horizon-ctl launch --offscreen --world shot --creative. Its ctl.log:
    Horizon renderer: Apple M4 Pro (Metal, IntegratedGpu)
    Horizon renderer: requesting the device (driver unnamed) with features [MAPPABLE_PRIMARY_BUFFERS | TIMESTAMP_QUERY | INDIRECT_FIRST_INSTANCE] and the adapter's limits (...)
    Horizon renderer: creating the pipelines
    Horizon renderer: pipelines ready (multi-draw on, occlusion culling off, GPU timer on)
    Horizon renderer: acquiring the first frame
    Horizon renderer: submitting the first frame
    Horizon: first frame after 2613 ms
    
    Offscreen has no surface, so the surface and present lines don't appear there. That run used the earlier wording of the driver line (driver ; when the name is empty), since reworded.
  • cargo test -p horizon-client and the parity harnesses --changed selects (98) run in CI. The diff only adds log calls and one field, so the rendering is unchanged.

Part of #746.

🤖 Generated with Claude Code


🔄 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/977 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/renderer-startup-steps` --- ### 📝 Commits (1) - [`70de685`](https://github.com/horizon-rust/horizon/commit/70de685d2b81293a522a172cec996d94f8546d76) Log each step of the renderer's start (#746) ### 📊 Changes **1 file changed** (+76 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/gfx.rs` (+76 -7) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What The renderer logs each step of its start, so a native crash in a graphics driver (which leaves no panic and no crash report, as in #746) shows where it stopped. After the existing `Horizon renderer: <adapter> (<backend>, <type>)` line, the log gets: ``` Horizon renderer: requesting the device (driver <name version>) with features [MAPPABLE_PRIMARY_BUFFERS | TIMESTAMP_QUERY | INDIRECT_FIRST_INSTANCE] and the adapter's limits (buffers up to 41747087360 bytes, storage bindings up to 41747087360 bytes, 2048 texture layers) Horizon renderer: device ready; configuring the surface (1280x720 Bgra8Unorm, Mailbox) Horizon renderer: creating the pipelines Horizon renderer: pipelines ready (multi-draw on, occlusion culling off, GPU timer on) Horizon renderer: acquiring the first frame Horizon renderer: submitting the first frame Horizon renderer: presenting the first frame Horizon: first frame after 2613 ms ``` These lines are logged once per device. Reloading resources on the same device doesn't repeat them, and a minimized window doesn't repeat the acquire line. `latest.log` is written unbuffered, and each step also calls `log::logger().flush()` in case a logger buffers. ## Why #746: two players crash with `0xc0000005` right after the adapter line, and nothing in the log shows which step failed. #976 fixes that crash (the wgpu 30 empty descriptor pool). With these lines, the next driver crash names its step. The device line also records the driver version, which until now reached only telemetry and crash reports, never `latest.log`. ## How tested - `cargo fmt --all -- --check` and `cargo clippy -p horizon-client --all-targets -- -D warnings` are clean. - Ran it on the Mac mini (offscreen, Metal) with `horizon-ctl launch --offscreen --world shot --creative`. Its `ctl.log`: ``` Horizon renderer: Apple M4 Pro (Metal, IntegratedGpu) Horizon renderer: requesting the device (driver unnamed) with features [MAPPABLE_PRIMARY_BUFFERS | TIMESTAMP_QUERY | INDIRECT_FIRST_INSTANCE] and the adapter's limits (...) Horizon renderer: creating the pipelines Horizon renderer: pipelines ready (multi-draw on, occlusion culling off, GPU timer on) Horizon renderer: acquiring the first frame Horizon renderer: submitting the first frame Horizon: first frame after 2613 ms ``` Offscreen has no surface, so the surface and present lines don't appear there. That run used the earlier wording of the driver line (`driver ;` when the name is empty), since reworded. - `cargo test -p horizon-client` and the parity harnesses `--changed` selects (98) run in CI. The diff only adds log calls and one field, so the rendering is unchanged. Part of #746. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:00:25 +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#2957
No description provided.