Skip to content

Fix virtual DRM scheduling and Metal virgl compatibility - #19

Open
zachspartofaday wants to merge 1 commit into
mxhm11cr:mainfrom
zachspartofaday:codex/upstream-gpu-compatibility
Open

zachspartofaday wants to merge 1 commit into
mxhm11cr:mainfrom
zachspartofaday:codex/upstream-gpu-compatibility

Conversation

@zachspartofaday

@zachspartofaday zachspartofaday commented Nov 3, 2026 •

Copy link
Copy Markdown

Xorg/Present can stall when the virtual CRTC counter advances only on page flips. Separately, desktop virgl workloads need transparent-zero sampler borders and reliable host/guest GL-context switching. This PR fixes those related prerequisites for the virtual Metal GPU path.

  • Advance the virtual 60 Hz clock independently, implement legacy/modern vblank waits and events, reserve flip-completion capacity, cancel/join per-file workers on close, use monotonic Linux deadlines, and interrupt synchronous waits through the guest signal protocol.
  • Reset the virgl host context before embedder jobs. Add a private ANGLE/Metal zero-border operation that validates its inputs; arbitrary border colors remain unsupported and the full GLES border-color extension stays unadvertised.
  • Retain preferred-source patches, licensing and pinned build instructions, plus macOS static qualification support. No guest Mesa binary or SteamOS installer is included.

This consolidates fork #6 and fork #7, whose final heads passed external Codex review before merging into our fork. One focused commit is based directly on main; it does not include storage PR #18 or the separate desktop (#20) and SteamOS (#21) submissions.

Validation on Apple Silicon macOS:

  • Fresh ARM64 host interpreter, JIT disabled and real vDSO: expanded DRM contract passes idle progression, synchronous/async events, queue capacity, rejected-flip scanout preservation, 16 close-before-deadline cycles, eight guest signal/EINTR/reap cycles, and existing buffer/PRIME/KMS checks. The fixture uses static musl via Zig and a retained fakefsify tool for fixture import only.
  • Current host renderer compiled and passed repeat/edge/zero-border/mirror-edge submissions plus nonzero-border rejection using retained pinned ANGLE/epoxy/virglrenderer dependency builds.
  • Shell syntax, Python compilation and source checks pass. The grouped union composes with the other submissions to reproduce the merged fork's product/test/evidence tree exactly.

Limits: the clock is virtual, not panel synchronization. Sampler acceptance alone is not guest pixel or desktop qualification. The guest border-pixel contract is retained but was not rerun during consolidation; Linux wall-clock fault injection, a clean dependency rebuild and a new physical-device run were not performed.

Details: docs/VIRTUAL_DRM_TIMING.md, docs/GPU_SAMPLER_COMPATIBILITY.md, docs/BUILDING.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant