9 ms·
DirectX 12 Support on macOS
- smoldesu 3y ago> and the open source community toils tirelessly making baby steps. FWIW, the Open Source community has had DXVK running >80% of the titles on Windows for years now. The real champion isn't even Apple here, it's Codeweavers for keeping Wine fresh on MacOS and Valve for pushing gaming on UNIX-likes to it's logical conclusion. Writing and maintaining Wine is a feat Apple is not legally well-poised to do - without the tireless toiling of Open Source contributors, this feature would not exist. So welcome back to gaming, Mac users. Let's hope this isn't a stopgap offering and more of a jumping-off point for DirectX9 coverage and the like.
- gjsman-1000 3y agoWorth noting that Apple is not just riding Proton/Wine’s coattails. As I wrote on another comment: Previously: DirectX -> Proton/WINE -> Vulkan -> MoltenVK -> Metal (yuck) Now: DirectX -> Apple GPT (groan at my pun, Game Porting Toolkit) -> Metal You could call it Proton with a Metal backend and more developer tools?
- smoldesu 3y agoDefinitely not. It's just funny to see the Open Source contributions reduced to "baby steps" because Apple had to play catch-up with their graphics API. It's all good stuff, though. One of the big reasons I switched to Linux was how smooth the DirectX translation is. If Apple makes an effort to support a back catalog of DX9 titles and fairly decent DX12 coverage, that's enough to put them back on the map for me.
- MBCook 3y agoApple won’t be making an effort to support anything. This is a Developer tool to help developers figure out what it’s going to take to port their games to the Mac. End-users don’t get to use it. You can’t bundle it with your game. The license forbids it. It’s very interesting, and I’m sure the community will make the best use of it they can, but it isn’t designed to be the Mac Proton.
- rched 3y agoI think that’s true today but it could change. I imagine Apple wants to encourage developers to build native games but I could see them loosening restrictions down the road. Maybe they eventually position this tech as the Bootcamp alternative for Apple Silicon. Time will tell.
- Someone 3y agoIf they do that, that’s basically giving up on Metal. It would become an implementation detail. Also, whenever the Direct3D API changes, they would have to follow. That makes them dependent on Microsoft and means they’d always lag them. Because of that, I don’t see them open this up.
- poisonborz 3y ago"figure out what it’s going to take to port their games to the Mac" By running them on a DX12 translation layer that they can't utilise? What would be the use case then?
- account42 3y agoDunno about Apple's version but with Wine you can linnk native code against winelib, allowing you to test what you have already ported before you got everything up and running. Of course if Vulkan was a suppoted API on macOS, developers could just port to Vulkan on Windows and then implement the rest on macOS.
- microtonal 3y agoSince they use their own Direct3D on top of Metal (D3DMetal), you can immediately start investigating performance while not much of the game is ported yet. Even while running the game in Wine, you can already analyze graphics performance with Instruments.app. At least this was the messaging in their talk about this: first you had to work months on a port to see how well a game would work on Mac hardware, now you can immediately run it, investigate bottlenecks and see where a port would land performance-wise before putting in any of the work. I wonder if they will make the D3DMetal usable from native code as well, I can imagine that would make porting much easier: - First you run on Wine + D3DMetal to get idea if your game would run well enough on Apple hardware at all. - Then you start building the game natively, still using D3DMetal, so that you don't have to immediately port the graphics stuff. - Once you have a running game on top of D3DMetal, you start porting it over to Metal with their shader converters, etc.
- shmerl 3y agoLinux is so much better for gaming, including in hardware options. Apple just doesn't compare.
- NayamAmarshe 3y agoNot sure why you're downvoted, it's a fact that Linux is way better for gaming and powerful desktop hardware.
- surgical_fire 3y ago> Not sure why you're downvoted Butthurt mac users that don't like to think their toy is worse somehow, obviously.
- jeroenhd 3y agoGaming on Apple is going to depend on how well optimized the drivers and shaders for the GPU are going to be. You'll also need some serious upscaling because most Macs come with super high res screens, a GPU that won't be able to drive modern games at those resolutions and an utterly lack of graphics card support, even in the new Pro. Another factor is that major GPU companies put efforts into rewriting some games' shaders to make them run better on their hardware. I doubt Apple is going to do that so you'll probably end up with games performing better on other platforms soon after release. There's more to getting games to run smoothly on a platform than compatibility software. So far, the GPU has been lacking despite Apple's attempts to hype up gaming for mac. With the rate things are going, the year of gaming on Mac may be the same as the mythical year of the Linux desktop: inching ever closer but never really arriving.
- zirgs 3y agoThere's no need to run games at those high resolutions natively. Modern games now render only stuff like UI at the monitor's native resolution while the 3D viewport is rendered at a lower resolution and then potentially upscaled using DLSS or FSR.
- nudgeee 3y agoApple has MetalFX upscaling: https://developer.apple.com/documentation/metalfx https://developer.apple.com/documentation/metalfx
- DaiPlusPlus 3y ago> The real champion isn't even Apple here, it's Codeweavers for keeping Wine fresh on MacOS and Valve for pushing gaming on UNIX-likes to it's logical conclusion Assuming this thing takes-off and suddenly the RGB LED-illuminated crowd switch to Apple hardware and macOS, then it's a very depressing thought because it means Apple will veritably make hundreds of millions (billions?) of dollars off Codeweaver's (and their extended community)'s work - and they'll get-away with it because their revenue can be classed as hardware sales, and not software licensing. I honestly don't know how to feel about this. I do feel a pang of smugness seeing the (post-iPhone) Apple having to stop pretending that copyleft doesn't exist[1] but also seeing them acknowledging that ecosystems other than their own do actually exist, but ultimately favourable smirks are in no way any kind of compensation to the unpaid effort put in by many of Wine-and-co's devs. I suppose Apple could do the decent thing and offer to acqui-hire Codeweavers et al., but that's more akin to a heavenly afterlife for Codeweavers' people (i.e. after acquisition Codeweavers would necessarily die along with their mission (beyond Apple's own self-serving uses) which might be a bigger disservice to everyone involved, especially the community. ---------- Unrelated-but-related: is any of Wine or Codeweavers' code under GPLv3? If so, that's might be the undoing of Apple's locked-down bootloaders: supposing that iOS, iPadOS or visionOS/xrOS includes DX12 compat via GPLv3-derived code: would Apple be legally obligated to explicitly allow users to install their own firmware contrary to their user-hostile, regressive, and (imo) indefensible policies so far? ----- [1]: Apple avoids the GPL, but so do all the large incumbents (though of course, like literally everyone, Apple is now fairly on-board with MIT/BSD licenses) - I do note that the KHTML-derived WebKit retains its GPL licensing, is a single, huge, exception, but I also note that Apple, internally, heavily firewalls-off their WebKit devs from anything else. (I've visited Apple's offices in-person and while the pizza place in the central cafeteria is nice, the fact that their SWEs can't casually walk down the hallway into another product team's office and exchange misc advice is just downright _weird_ to me, that's why I withdrew my only application to work there)
- sirwhinesalot 3y agoApple is only providing this as a developer tool, to help simulate existing Windows games on macOS such that they can be ported more easily. Apple won't officially support a "Windows-Rosetta", this is not meant for users and won't ever be supported on iOS/iPadOS.
- wilg 3y agoI haven't gotten a clear answer on what exactly this is. Is it a developer tool? Or is it like Wine? Can I just run an unmodified DX12 game from a Windows .exe on my Mac? If not, what's the process to port it? What portion of development work of porting a game does this cover? Edit: More information here: https://www.digitaltrends.com/computing/apple-enabled-thousands-windows-games-mac/ https://www.digitaltrends.com/computing/apple-enabled-thousa...
- gjsman-1000 3y agoYes, but the goal is developers to use that to come up with rough estimates for performance if they did optimizations. Users aren’t meant to directly use it - it’s a launching point for developers. Also it’s more special than Proton for Mac because Proton does DirectX to Vulkan (needing a second round for Vulkan to Metal through MoltenVK), this is DirectX to Metal.
- MBCook 3y agoRight. The real reason appears to be helping developers figure out “is it worth the time to try and port my game to the Mac, or am I going to go through it all and end up at five frames per second?“
- mtklein 3y agoIt is a developer tool, and it is Wine. It sure seems like you can just run an unmodified DX12 game from a Windows .exe on your Mac, provided you're running the latest beta OS.
- 3y ago
- dagmx 3y agoImportant to note that this is different than what Codeweavers did and the timing of both their announcements is purely coincidental. https://www.codeweavers.com/blog/mjohnson/2023/6/6/wine-comes-to-macos-apple-s-game-porting-toolkit-powered-by-crossover-source-code https://www.codeweavers.com/blog/mjohnson/2023/6/6/wine-come... Apple did contribute to the Wine codebase and have their own translation layer. Performance and compatibility seem to be much better than what Codeweavers showed which is expected given the translation appears to be DXIL to MSIL instead of DX to VK to MS. The Mac gaming Reddit has a bunch of people posting results https://reddit.com/r/macgaming/hot https://reddit.com/r/macgaming/hot And someone’s already made a tool to simplify running games https://github.com/IsaacMarovitz/Whisky/releases/tag/pre-0.2.0 https://github.com/IsaacMarovitz/Whisky/releases/tag/pre-0.2... This is also a triumph for open source imho because wine is now receiving patches for macOS directly, and it’s a symbiotic relationship that hopefully grows. Things look very promising.
- dman 3y agoToolkit deprecated in 3 years after Apple assembles a large enough game library :)
- Rhedox 3y ago> This is also a triumph for open source imho because wine is now receiving patches for macOS directly, and it’s a symbiotic relationship that hopefully grows. I wish. Unfortunately the MetalD3D is proprietary under a very restrictive license. The rest is just Wine code written by Codeweavers.
- simondotau 3y agoI don't understand your pessimism. If Apple finds and fixes a gap in Wine's coverage/compatibility, those changes will necessarily be open source. Quite simply, any work which Apple does that could be useful to the wine project will be open source. Obviously it would be nice if MetalD3D was also released under a better license, but it's hardly as though this omission is a big loss to the wine project.
- mastax 3y agohttps://github.com/apple/homebrew-apple/tree/main https://github.com/apple/homebrew-apple/tree/main This isn't the DX12 emulator itself, right? It's just a patch to crossover which makes it use the emulator which is proprietary and bundled with the OS (or Xcode)?
- floatboth 3y agoFrom a quick look, the patch doesn't seem to contain references to Metal, but just a lot of random updates—backports from upstream Wine to the CrossOver thing?—including an AMD ADL implementation that is clearly for Linux (using /sys/class/… stuff). Maybe the whole toolkit is… literally just CrossOver?
- sirn 3y agoThe actual interesting bit is at the end of the patch, in `static void init_non_native_support` where they dlopen a proprietary MetalD3D dylib.
- microtonal 3y agoNope. The Game Porting Toolkit itself contains a large `D3DMetal` framework that directly translates Direct3D calls into Metal. The Homebrew repo is only part of the toolkit. To actually use it, you have to move the Direct3D -> Metal translation layer into installed Homebrew prefix. From Apple's README: The graphics bridge libraries need to be placed inside your Wine prefix in order to finalize your game evaluation environment. These instructions assume you have mounted the Game Porting Toolkit at /Volumes/Game Porting Toolkit-1.0. • Copy the Game Porting Toolkit library directory into Wine’s library directory. ditto /Volumes/Game\ Porting\ Toolkit-1.0/lib/ `brew --prefix game-porting-toolkit`/lib/ They literally made a new Direct3D implementation on top of Metal.
- mappu 3y agoTo be 100% crystal clear, this is a Wine distro. https://www.osnews.com/story/136223/apples-game-porting-toolkit-is-wine/ https://www.osnews.com/story/136223/apples-game-porting-tool...
- deleted 3y ago[deleted]
- rched 3y agoThis isn’t quite true or at least doesn’t tell the whole story. This tool can do things that Wine can’t today. Namely supporting DX12 games. That support was added by Apple.
- jeroenhd 3y agoWine generally doesn't really bother with any recent DirectX API's. However, vkd3d has been available as a means to play DirectX 12 games on Linux for a while now. Of course Apple has split off their graphics API so they had to do the translation work for Metal themselves, but playing DX12 games on Wine isn't all that special.
- delta_p_delta_x 3y agoSo in the end... the easiest way to develop cross-platform PC games is just target Windows and Direct3D 12, and let Wine/other D3D12 emulators handle the heavy lifting. As a user... Tell me why I shouldn't just run games directly on Windows, the native platform?
- wmf 3y agoBecause you don't have Windows?
- viraptor 3y agoIf you're ok with everything else that comes with windows, that's fine. I'd rather not. I don't want to deal with its shell, update schedule, ad pushing, etc. for example so the emulator is a better approach for me.
- shmerl 3y agoBecause you don't want to use Windows? I use Linux for gaming becasue I use Linux in general. Wine / dxvk / vkd3d-proton do a great job of helping to run games, but native games on Linux would be still better.
- chongli 3y agoAs a user... Tell me why I shouldn't just run games directly on Windows, the native platform? If you’re fine with using Windows then knock yourself out! I just came from another thread where people were complaining bitterly about the nonsense and dark patterns Microsoft is pumping into Windows to monetize users to the hilt. Frankly, I’d rather just avoid all of that!
- afavour 3y agoI think you’re looking at it the wrong way. If you’re happy using Windows there’s no reason to stop using it. But a computer is capable of many more things than playing games and many of us prefer doing those things on macOS. This allows us to have the best of both worlds. If you don’t want it you’re under no obligation to take it.
- smoldesu 3y ago
- fnordsensei 3y agoThe PC gaming market is expected to be worth something north of $200bn in 2023, and (despite ongoing insanity among graphics cards manufacturers) is expected to keep growing in the coming years. Apple has been doing their usual thing, with slowly moving pieces into place, but it's been pretty clear that they're ultimately going to go for a slice of that cake. Aside for mobile gaming, it's essentially an untapped market for them, given the footprint they now have with their devices. Also, they're going to want to shift the VR game development efforts to the Vision, in time for the release of the non-Pro version. It'd be smart of them to partner, or at least cooperate with, Valve around this, but I'm not so sure about that one. Apple _might_ have enough hubris that they'd try to supplant Steam rather than work with it. This would be a mistake in my opinion.
- deleted 3y ago[deleted]
- whywhywhywhy 3y agoCan you imagine anyone inside apple being passionate about supporting Steam? The app even after decades of work is so insanely janky even on its primary platform. Honestly feels like a fractal of hacks upon hacks. Makes something like Slack feel native. I know people are passionate about it because their games are locked into the service but the UI is godawful.
- ohgodplsno 3y agoY'all are going to have a fun time when you realize the sad state of most D3D12 renderers, or the fact that there are still relatively very few D3D12 compatible games. Stutters, PSOs created mid frames, shader compilation happening at all times...
- greggsy 3y agoThe market has suddenly (and conveniniently) been opened up to users of the second largest computer manufacturer. It would be foolish for any developer to neglect the opportunity to capitalise on this market, and they should be scrambling to port their products across in a fit state. Remember that this isn't a toolkit aimed at users and hackers, it's a developer toolkit. Don't let perfect be the enemy of good - things are only going to get better.
- asvitkine 3y agoThe market has always been open. It's just Apple is trying to move the needle on the porting cost. Time will tell how significant that will be in actually convincing studios to invest.
- ohgodplsno 3y agoNope, the market is still closed. Firstly, it's against terms and conditions to release your game with that tool and they still want to force you to port it to Metal. It's a developer toolkit to help migrate. Also, game developers have been burned time and time again by Apple's inability to have a stable API + forced updates to the new crappy API, so no, they still won't port.
- lelandfe 3y agoHere's someone running Diablo IV on their MacBook Pro at over 60 FPS: https://www.reddit.com/r/macgaming/comments/14307be/diablo_iv_on_m2_max_using_macos_sonoma_and_game/ https://www.reddit.com/r/macgaming/comments/14307be/diablo_i...
- qwerty456127 3y ago> Apple hid something AMAZING for Mac gaming at WWDC: a full Windows DirectX 12 gaming emulator. Windows ... emulator? Does this mean we can now play old Windows EXE games? E.g. can I now run Fallout 2 and 3 like I did on an old Intel Mac with Crossover? Can it also run Windows apps which don't use DirectX? I need some for work and have to use Parallels now. Does it support Windows crypto APIs (certificates etc)?
- jeroenhd 3y agoIt's Wine with some special sauce (Apple couldn't reuse VKD3D because they chose to invent Metal rather than stick with OpenGL/Vulkan so they had to build their graphics translation themselves). Crossover is built on the same technology. In fact, Apple's brew script literally links to Crossover's sources: https://raw.githubusercontent.com/apple/homebrew-apple/main/Formula/game-porting-toolkit.rb https://raw.githubusercontent.com/apple/homebrew-apple/main/... Things like the crypto API should be implemented if you can find the reference for your specific API calls here: https://github.com/wine-mirror/wine/tree/master/dlls/crypt32 https://github.com/wine-mirror/wine/tree/master/dlls/crypt32 Apple's version of Wine is aimed at developers, though. It shouldn't take too long for someone to make an app or script to easily set up environments with the developer runtime, but I doubt they'll support it as well as Valve supports Proton. If your application of choice doesn't need any fancy graphics, there's a decent chance Wine/Crossover can already run it anyway, no need to mess with Apple's SDK. With the M2 Max outputting 28fps at 1080p (screenshot linked), I wouldn't expect too much from the gaming performance of this thing, though.
- sbuk 3y agoOpenGL was a technological dead-end and Vulkan came 2 years after Metal, which as stated, came about because OpenGL was a technological dead-end. Besides, mobile gaming with Metal has been reasonably successful, whichever way you slice it.
- qwerty456127 3y agoWhat's the problem with OpenGL? It always did its job great, didn't it?
- ayakang31415 3y agoI play civ 5 from time to time, and it is a cross-platform (Linux, Mac, Windows). Why don't other gaming companies do what civ devs do to make it cross-platform? I understand why companies would make games on Windows exclusively if it was 10 years ago, but AFAIK, there already exist many cross-platform development tools you can leverage.
- wasmitnetzen 3y agoIt mostly boils down to the used game engine: Civ 5 is written in a custom engine (LORE), where you can choose which platforms to support. Other engines might make it easy (Unity), hard (Unreal), or impossible (Frostbite) to support Linux and Mac natively. Platform support is of course an argument when choosing an engine.
- theshrike79 3y agoI play Civ 6 and it's also "cross platform". Except when it's not. The PC and (M1/2) Mac versions were out of sync for a few months, making multiplayer games between those impossible. Worked perfectly with PC + Steam Deck though.
- oynqr 3y agoCiv 6 used to not feature cross play between Linux and Windows, because of platform differences with SQLite.
- MindSpunk 3y ago
- torginus 3y agoI wonder if they made similar contributions to MoltenVK as well to bring it up to the same quality standard.
- AshleysBrain 3y agoIt seems to me that Apple invented their own proprietary graphics technology (Metal), never supported a cross-platform one (Vulkan), then found not enough games ever supported Metal, so they added a translation layer for another proprietary graphics technology (DX12). Wouldn't they have been better off just supporting Vulkan?
- norman784 3y agoMetal was launched before Vulkan (2014 vs 2016), Vulkan was before Mantle from AMD that they donated to the Khronos group, it was in development and Apple is part of the group so they were aware of it, but I can understand that depending on consensus across multiple parties could delay Apple agenda, same for Microsoft that could ditched Dx in favour of Vulkan, but they aren't.
- bhouston 3y agoApple is not part of Khronos now and there is a bit of a weird relationship between the two these days. Some details here: https://news.ycombinator.com/item?id=22539633 https://news.ycombinator.com/item?id=22539633
- gjsman-1000 3y agoThere have been (though don't quote me on this) stories about how everything Khronos standardizes reeks of design-by-committee, to the detriment of the final standard. An obvious example would be OpenGL, which nobody has called a well-designed API. But there's other misfires as well. OpenCL hasn't exactly set the world on fire compared to CUDA. OpenVG was a standard for accelerating 2D Graphics that was a little too late to matter. OpenXR? Well, at least Oculus is actually using it. WebGL? The W3C is working on replacing it with the (far superior) WebGPU. WebCL? Well, that was a JavaScript system for OpenCL, and that was as bad of an idea as it sounds. And of course, most recent example: Vulkan. Almost everyone who has actually used Metal has commented on how it is much, much easier to hit the ground running than Vulkan, because Vulkan requires mountains of boilerplate. (It's also worth remembering that every iOS Developer builds for Metal, so it isn't like there isn't knowledge out there about how to use it - it's just among mobile game developers instead of the AAA developers).
- deleted 3y ago[deleted]
- linusg789 3y agoBetter late than never, I guess. Probably only doing this to make porting games easier since Bootcamp no longer works on the apple silicon devices.
- qwerty456127 3y agoIf only they would also add support for writing on NTFS drives they would probably kill all the competition - who needs a Windows PC when you can have a Mac which can do everything you needed Windows for?
- whywhywhywhy 3y agoAnyone who needs top of the line gpu performance. M series is great but once you’re on desktops it gets left in the dust by Nvidia for 3D and ML.
- qwerty456127 3y agoCan't you just plug a latest nVidia card to you MacBook with Thunderbolt when you need it? Also doesn't M2 have some sort of an accelerator built-in specifically for ML?
- jsheard 3y agoApple used to support external GPUs on Intel-based Macs but they killed that when they switched over to ARM. It seems the new Mac Pro won't support internal PCIe GPUs either. You're just stuck with whatever GPU is built into the SOC now.
- qwerty456127 3y agoNo PCIe even in non-laptop, non-monoblock Macs? Sounds madness.
- whywhywhywhy 3y ago> Can't you just plug a latest nVidia card to you MacBook with Thunderbolt when you need it? No, even when they shipped that support initially it barely worked and then support ended one OS release. Nvidia stopped shipping drivers so it hasn't been possible for around 6+ years now? Looked into it extensively at the time and price and support wise I ended up having to build a PC to use Nvidia for 3D work (Octane Render). > Also doesn't M2 have some sort of an accelerator built-in specifically for ML? Yes, and it's good for a laptop but to put it in perspective M1 Max takes around 45-50 seconds to generate a Stable Diffusion image, 3090 takes around 5 seconds.
- easyThrowaway 3y agoSo at this point we got the following rendering paths for DX12 on wine: - Mainline D3D12 implementation on stock Wine; - Proton (Which in theory should be just the "unstable" channel of the wine reference implementation plus some Gallium/VKDX/Valve specific stuff) plus a bunch of branches floating around (proton-ge, lutris custom builds, etc) ; - Crossover (on the other side, this should lean on the safer side compared to reference wine, with just a bunch of explicitly whitelisted games); - And now, the Game Porting Toolkit by Apple. I wonder if there's some serendipity between those projects or we're gonna end up with some games running on some specific branch of Proton DX12, others stuck on mainline wine, and others for a reason or another working correctly just on Metal.
- boywitharupee 3y agoIs it limited to DX12 only or other versions are supported also?