Repository navigation
build: remove private API imports from D3DMetal and DXMT - #7996
Merged
Merged
Conversation
- 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
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.
Removes private API imports from the two Direct3D backends bundled with the macOS build.
install_d3dmetal.shrebinds 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.shinstalls it into the x86_64 sysroot'sshare/d3dmetal-native, andpack_dirnow 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.MTLSetShaderCachePath,MTLGetShaderCachePathorbootstrap_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.