DXMT: first milestone reached: it can run _NieR: Automata™_ decently #7
Locked
3Shain
announced in
Announcements
Replies: 3 comments 2 replies
-
It also reuses the first game test case from DXVK (which is quite ironic): https://github.com/doitsujin/dxvk/wiki/Home/78c6606adb4eb4b53d6edb9d02dff97ea4138980 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Very inspiring project! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Amazing!!! I have question, how to run Steam? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
DXMT
is a Metal-based translation layer for Direct3D 11. It currently allows running D3D11 applications on macOS with the aid ofWine
. It is open-source, with permissive licences.Just recently this project has hit its first milestone: it is capable for running the game NieR: Automata™ with decent performance.
(No the rendering is not broken it's just a bad timing of screenshot!) (the floating white/red indicator above NPC is missing because I havn't implemented occlusion query yet)video.5.mp4
Introduction
This project, DXMT, has begun since last summer, and the developer @3Shain has contributed solely using his spare time at university. He started this project as an experiment of software development complexity management, and just dived into it, with some general programming experiences but absolutely 0 computer graphics background. It's also worth mentioning that, DXVK, the Vulkan counterpart that has well-developed for years, is another huge motivation of DXMT, which reuses many infrastructures from DXVK (to name a few: logging, com pointer, hash algorithms, platform api interaction (e.g. display mode enumration)... thank you, doitsujin and Joshua-Ashton). So is DXMT a version of DXVK that replaces Vulkan stuffs with Metal stuffs? Well literally yes..... I mean that depends on which side of Theseus's paradox you would agree (but anyway please don't report DXMT's issues to DXVK's repository!). Anyway the replacement is much harder than how it's said but that's at least a good start point.
The task is hard, because in-depth understandings are required to both Direct3D 11 and Metal, from their not-so-well written documentations. It's indeed a joy to discover the correspondences/similarities between different APIs and it's also a nightmare to implement something doesn't match well. And don't forget shaders! It's a very surprise that Metal shader bytecode is just standard LLVM IR(Immediate Representation) with certain metadata, and
airconv
the subproject of DXMT that transpiles DXBC into LLVM IR, works unexpectedly well (because at that time we think the driver backend might not "like" things not generated by metal compiler, but it just works, at least on a M2 Max Macbook. Kudos to Apple GPU engineers!).airconv
now supports a large subset of SM 5.0 instructions of vertex/pixel/compute shaders. And there is a standalone command line tool that may help you to offline compile HLSL shaders to.metallib
. Notably they are fully open-source.The shader transpilation work is done about 2 months ago, and for the remaining time the focus is on supporting D3D11 APIs. We declare all the interfaces, place a TODO assertation, grab some simple D3D11 demo applications from the web, run it and see which API failed at assertation, then implement it. And we repeat this process for more complex demo applications... and eventually, a real game.
On the one hand we are showing our respect to DXVK, because that's (somehow) where the story begins.
On the other hand it's indeed a rational choice, quoted from doitsujin the developer of DXVK:
Yes it's great choice as a milestone, that we can achieve gradually.
This also means DXMT at the moment is not yet ready for other games, unless it uses a even smaller subset of APIs that currently implemented, and we haven't verified any other games yet.
Information that you may want to know
What can I do with DXMT?
EvaluatePlay games.Also if you are a game developer, it may help you porting games to macOS
in case the game engine doesn't have a Build for Mac button.(As an end user) When can I download and experiment with it?
There are no ETA yet. The first release is expected to support up to D3D11.3 without (including but not limited to) tessellation, geometry shader and stream-out. We still have something to sort out, but it would not be far away! Releases will be all on this Github repository.
(As a game developer) Can I use it for porting my game?
Absolutely, if it fits your requirements.
Although not yet prioritised, there is a plan for native builds (so that you may ship DXMT with your game as a macOS executable).
If you think this project is cool, please give a star and consider sponsoring the developer to boost the development of this project. Contributors are welcomed as well! More in-depth information/documentations about development will be added in near future.
(below are some personal announcements from the developer)
I'm graduating from school and seeking for a position of senior front-end engineer OR simply a problem solver on programming/mathematics OR woking on this project full-time. If you are interested or knowing some people that probably will be interested to refer to, please contact me! The information on my profile page.
Beta Was this translation helpful? Give feedback.
All reactions