Skip to content

build: update graphics stack and QEMU for Neptune fixes - #7963

Merged
osy merged 3 commits into
mainfrom
dev/update-graphics
Oct 16, 2026
Merged

osy merged 3 commits into
mainfrom
dev/update-graphics

Conversation

@osy

@osy osy commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Update the accelerated graphics stack and pick up the QEMU fixes needed for the Neptune (Windows GPU acceleration) work.

QEMU (patches/qemu-10.0.12-utm.patch)

  • hvf: use the Hypervisor.framework in-kernel GICv3 on macOS 15+ so SGIs, timer PPIs and GIC register accesses no longer each cost a VM exit. On by default (kernel-irqchip=on); the hypervisor GIC has no ITS, so the board exposes a GICv2m MSI frame instead. The in-kernel GIC state is saved and restored, so suspend and migration keep working.
  • edid: carry the host refresh rate into the standard timings and range limits. Windows previously built every mode at 60 Hz, and a host display past 125 Hz produced a self-contradicting EDID that made Windows drop the adapter and fail D3D device creation.
  • virtio-gpu: park a create whose id still has a deferred unref instead of rejecting it (the Windows viogpu3d KMD reuses ids this way and came up with no display).
  • virtio-gpu: initialise per-command flags in every handle_ctrl loop; leftover heap bytes left commands unanswered, hanging Windows on shutdown and stalling 3DMark on Linux.

Dependencies (patches/sources)

  • virglrenderer: Neptune ring/wait fixes, D3D11 query fixes, larger resource updates, and fixes for gl_InstanceID and integer vertex attributes on Apple's native OpenGL.
  • MoltenVK: query copy-results/availability fixes, mesh pipeline multisample guard, temp-buffer pool lifetime fix.
  • DXMT: occlusion query completion, UpdateSubresource into STAGING resources, shared memory for DYNAMIC buffer renames.
  • D3DMetal: accurate format-support/multisample answers, DXIL subroutine inlining for every stage, pinned shared-texture ABI.

Resolves #7944
Resolves #7820

Testing: Tested by a human on macOS 15.6, Mac mini (M4 Pro) with 3DMark Fire Strike, 3DMark Time Spy, GravityMark and Cyberpunk 2077.
The author acknowledges that this change has been tested and/or reviewed by a human in accordance with UTM's AI contribution guidelines.

osy added 3 commits October 14, 2026 23:54
…talls

Pick up QEMU patches needed for the Neptune graphics work:

- hvf: use the Hypervisor.framework in-kernel GICv3 on macOS 15+ so
  SGIs, timer PPIs and GIC register accesses no longer each cost a VM
  exit, which is expensive for guests whose job systems wake threads
  across CPUs. On by default (kernel-irqchip=on); the hypervisor GIC
  has no ITS, so the board exposes a GICv2m MSI frame instead. Its
  state is saved and restored, so suspend and migration keep working.
- edid: carry the host refresh rate into the standard timings and
  range limits. Windows built every mode at 60 Hz, and a host display
  past 125 Hz produced a self-contradicting EDID that made Windows
  drop the adapter and fail D3D device creation. Timings the base
  block cannot express get a DisplayID 2.0 section.
- virtio-gpu: park a create whose id still has a deferred unref
  instead of rejecting it; the Windows viogpu3d KMD reuses ids this
  way and came up with no display.
- virtio-gpu: initialise the per-command deferred/suspended flags in
  every handle_ctrl loop. Leftover heap bytes left commands unanswered,
  hanging Windows on shutdown and stalling 3DMark on Linux.

Assisted-by: Claude:claude-fable-5-1
Assisted-by: Claude:claude-opus-5
Assisted-by: Claude:claude-opus-5-5
Pick up the latest fixes across the accelerated graphics stack:

- virglrenderer: Neptune ring and wait fixes (park an idle ring until
  its doorbell, a heartbeat in the ring status word, monotonic-clock
  timed waits), D3D11 query feedback fixes, a decoder lookup cache
  sized for a frame's working set, resource updates up to 2 GB, and
  neptune-protocol wire version 2. Guest shmems/dmabufs can now back
  DXMT DYNAMIC buffer renames and large D3D12 heap blobs.
- MoltenVK: query copy-results and availability fixes, a NULL
  multisample-state guard for mesh pipelines, and a temp-buffer pool
  lifetime fix.
- DXMT: complete occlusion queries that end in a draw-less chunk,
  UpdateSubresource into STAGING resources, and embedder-provided
  shared memory for DYNAMIC buffer renames.
- D3DMetal: accurate format-support and multisample-quality answers
  that refuse what D3DMetal cannot create, DXIL subroutine inlining
  for every stage, and a pinned shared-texture POD ABI.

Assisted-by: Claude:claude-opus-5-5
…pple GL

Apple's native OpenGL 4.1 core profile rejected shaders that required
GL_ARB_draw_instanced for gl_InstanceID (core since GLSL 1.40), so those
draws silently did nothing. Integer vertex attributes were also declared
as vec4 on Apple's native GL, so the guest saw the bits of their float
conversion.

Resolves #7944

Assisted-by: Claude:claude-opus-5-5
@osy osy added this to the v5.0 milestone Oct 15, 2026
@osy
osy force-pushed the dev/update-graphics branch 4 times, most recently from 7ceea08 to fec4c10 Compare October 15, 2026 16:05
brunocastello added a commit to brunocastello/UTM that referenced this pull request Oct 15, 2026
@osy
osy merged commit 3c88446 into main Oct 16, 2026
28 of 39 checks passed
@osy
osy deleted the dev/update-graphics branch October 16, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant