project: add DirectX support for Windows guests - #7800
Merged
Merged
Conversation
Bump minimum version to macOS 13.0 and iOS 16.0 due to D3D renderer minimum requirements.
- virglrenderer uses shmem for texture import/export so we need App Group for both iOS and macOS - Add QEMURenderServer for new process model rendering (both Venus and Neptune) - macOS: add DXMT and D3DMetal-Native backends - We require 8G hostmem for Neptune but iOS currently fails > 256M
Link to AGENTS.md and also make sure to strip Claude session links.
The macOS build embeds D3DMetal.framework when the sysroot ships it, but the framework is distributed separately and cannot be committed. When D3DM_DIST_DMG_URL is set, fetch the distribution DMG and stage the framework into the universal sysroot before it is packed into the artifact and saved to the cache, so downstream builds pick it up. Builds without the variable set are unaffected. We cannot ship a com.apple.* bundle, but D3DMetal loads its own default.metallib through [NSBundle bundleWithIdentifier:@"com.apple.D3DMetal"] using that identifier as a literal compiled into the framework binary, so the rebrand rewrites both the Info.plist and the binary. Rewriting only one makes the lookup return nil and every D3DMetal process aborts in -[MTLDevice newLibraryWithFile:nil error:]. Staging lives in scripts/install_d3dmetal.sh so it can also be run by hand. Assisted-by: Claude:claude-opus-5
Concurrent build_dependencies.sh runs on the same CI runner get rate limited by GitHub, so clones and fetches fail intermittently. Retry each network operation with exponential backoff, jittered by PID so parallel builds do not retry in lockstep. The tree:0 filtered clones lazily fetch objects during checkout and submodule update, so those hit the network too and are retried as well. Add -f to curl so that a rate limited response is treated as a failure instead of being saved as the tarball. Assisted-by: Claude:claude-opus-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds host-accelerated DirectX for Windows guests, backed by the Neptune path in virglrenderer.
QEMU is updated to 10.0.12-utm, which folds most of the previously out-of-tree patches upstream into the fork and leaves a much smaller patch set. On top of that:
-Dneptune=true, and macOS builds DXMT and D3DMetal-Native. The driver is selectable under Settings → Display → DirectX Driver, with D3DMetal shown only when the sysroot shipped the framework. Neptune is macOS-only — iOS builds no D3D backend, so the flag is gated.QEMURenderServertarget embedded inQEMUHelper.xpc, alongside the entitlements and signing work that goes with a nested bundle. This covers Venus as well as Neptune.hostmemwindow. macOS moves from 256M to 8G.hostmemsizes the virtio-gpu PCI shared-memory BAR, which the Windows guest driver reports to dxgkrnl as a CPU-visible, flippable video memory segment. At 256M a D3D11 title exceeds it during load, VidMm cannot commit, and surfaces never become resident — presenting as black output, multi-second present stalls, and an eventual dwm wedge, with nothing logged on the host. This is address space, not committed memory. iOS stays at 256M because it currently fails above that.D3DM_DIST_DMG_URLis set, and the app embeds it only when present. Builds without it are unaffected.Minimum deployment targets move to macOS 13.0 and iOS 16.0, required by the D3D renderer.
Testing: Tested by a human on macOS 15.6 and macOS 26.3, and on iOS 16.3. The author acknowledges that this change has been tested and/or reviewed by a human in accordance with UTM's AI contribution guidelines.