Skip to content

Metal frame pacing: add CI-level rendering validation #72

@daiimus

Description

@daiimus

Description

The CADisplayLink + ghostty_surface_draw_now() integration (commit 9f2c6f7) was implemented for ProMotion 120Hz support but has never been validated. We need simulator-based CI checks that verify:

  1. The display link fires at the expected cadence
  2. Metal command buffers are actually submitted during rendering
  3. Frame pacing is consistent (no excessive hitches)

Approach

Add a simulator-based test to ci.sh that:

  • Launches Geistty in the simulator
  • Sends rapid screen-updating content (ANSI escape sequences, scrolling output)
  • Measures frame callback timing via #if DEBUG instrumentation
  • Asserts frame intervals are within expected bounds

This should run as part of the existing ci.sh test or as a new ci.sh perf-test command. Simulator-only — no device required.

Context

  • A Metal System Trace was captured on Icarus but only showed system compositor frames, not Geistty-specific rendering
  • Manual visual testing is insufficient for frame pacing (60Hz vs 120Hz is hard to detect by eye)
  • The display link code was never verified to actually call through to the Zig render path

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions