Skip to content

build: remove private API imports from D3DMetal and DXMT - #7996

Merged
osy merged 1 commit into
mainfrom
build/remove-private-apis
Oct 20, 2026
Merged

osy merged 1 commit into
mainfrom
build/remove-private-apis

Conversation

@osy

@osy osy commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Removes private API imports from the two Direct3D backends bundled with the macOS build.

  • D3DMetal: install_d3dmetal.sh rebinds D3DMetal.framework's private imports (CoreAnalytics, Metal's shader-cache path and swizzle-key helpers, two dyld image lookups, the acceleration-structure allocation descriptor) to public-API replacements in d3dmetal-native, under visible names, before signing. The patcher comes from the pinned d3dmetal-native: build_dependencies.sh installs it into the x86_64 sysroot's share/d3dmetal-native, and pack_dir now merges a directory from every arch's sysroot (the main arch's copy wins). It refuses an unexpected D3DMetal, and a d3dmetal-native that doesn't export every replacement it binds.
  • DXMT: native builds no longer import MTLSetShaderCachePath, MTLGetShaderCachePath or bootstrap_register2. Logic ops stay enabled everywhere, which keeps feature level 11_1 valid on iOS.

The d3dmetal-native bump also picks up two format fixes: typed UAVs on the packed 16-bit formats, and R9G9B9E5_SHAREDEXP as a blendable multisampled target.

Testing: Tested by a human on macOS 15.6, Mac mini (M4 Pro), Windows 11 guest, with both the DXMT and D3DMetal backends. The author acknowledges that this change has been tested and/or reviewed by a human in accordance with UTM's AI contribution guidelines.

- D3DMetal: install_d3dmetal.sh now rebinds the framework's private
  imports (CoreAnalytics, Metal's shader-cache path and swizzle-key
  helpers, two dyld image lookups, the acceleration-structure allocation
  descriptor) to public-API replacements in d3dmetal-native, under
  visible names, before signing.  The patcher comes from the pinned
  d3dmetal-native: build_dependencies.sh installs it into the x86_64
  sysroot's share/d3dmetal-native, and pack_dir now merges a directory
  from every arch's sysroot (the main arch's copy wins), so it reaches
  the universal sysroot.  It refuses an unexpected D3DMetal, and a
  d3dmetal-native that does not export every replacement it binds.
- DXMT: native builds no longer import MTLSetShaderCachePath,
  MTLGetShaderCachePath or bootstrap_register2 on any platform.  Logic
  ops stay enabled everywhere, which also keeps feature level 11_1
  valid on iOS.

Also picks up d3dmetal-native format fixes: typed UAVs on the packed
16-bit formats, and R9G9B9E5_SHAREDEXP as a blendable multisampled
target.

Assisted-by: Claude:claude-opus-5-5
@osy osy added this to the v5.0 milestone Oct 20, 2026
@osy
osy merged commit a92c052 into main Oct 20, 2026
36 of 47 checks passed
@osy
osy deleted the build/remove-private-apis branch October 20, 2026 06:07
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