News for hackers. Stuff that matters.
Re:Paving the Road to Vulkan on Asahi Linux by ozarker on Monday March 20, 2023 @12:53PM (#35234557)
I wonder how long it's going to take for games to start generally supporting ARM. Getting Linux running well on M1/M2/etc.. seems like only half the battle for making a good gaming machine out of these.
Re:Paving the Road to Vulkan on Asahi Linux by nicoburns on Monday March 20, 2023 @12:59PM (#35234686)
I'd guess that will probably only happen when either windows gets widespread ARM adoption, or there's a new Xbox or PlayStation console that uses an ARM processor. Which... might be a while.
Re:Paving the Road to Vulkan on Asahi Linux by mepian on Monday March 20, 2023 @01:41PM (#35235456)
There's the Nintendo Switch which does get ports.
Re:Paving the Road to Vulkan on Asahi Linux by cubefox on Monday March 20, 2023 @02:00PM (#35235781)
The Nintendo Switch console already uses an ARM SoC by Nvidia. But I'm not sure whether this has meaningfully increased the probability of porting games to MacOS. The Switch uses Vulkan, but Apple uses Metal, a proprietary graphics API. Whether ports make sense probably depends on how strongly the Mac market share increases compared to Windows.
Re:Paving the Road to Vulkan on Asahi Linux by jsheard on Monday March 20, 2023 @02:34PM (#35236398)
The Switch can use Vulkan but it's unusual in offering a wide range of APIs, from OpenGL and Vulkan (the implementations derived from Nvidia's proprietary desktop driver) or a custom low-level API tailored to the hardware called NVN. From what I gather from the emulation scene, the majority of Switch titles with non-trivial performance demands use NVN.
Re:Paving the Road to Vulkan on Asahi Linux by cubefox on Tuesday March 21, 2023 @10:04AM (#35246255)
Interesting, I didn't know that. I thought Vulkan was already pretty low-level compared to OpenGL.

Then I guess Metal on Mac can't be such a big issue either.

Re:Paving the Road to Vulkan on Asahi Linux by smoldesu on Monday March 20, 2023 @01:16PM (#35234968)
I wouldn't count on many developers going back to update old games with ARM support. It's more likely that the community will work to build some sort of Box86 + Proton stack to get games working, which should get a lot of the classics working[0]. From there, I think the struggle will be getting Box86 to run fast enough for modern games. Apple's ARM CPUs have great IPC, but that can still get annihilated when it's forced to simulate SIMD/AVX instructions. I assume Apple has some sort of vector acceleration framework in Apple Silicon, but it will take time and effort to reverse-engineer and implement.

Things are certainly looking better than they did a couple years ago, but getting ARM to run x86 code faster-than-native is an uphill battle. Maybe even an impossible one, but I've been surprised before (like with DXVK).

[0] Crysis on a Rockchip ARM SOC, for example: https://youtu.be/k6C5mZvanFU?t=1069

Re:Paving the Road to Vulkan on Asahi Linux by nicoburns on Monday March 20, 2023 @01:22PM (#35235083)
> I assume Apple has some sort of vector acceleration framework in Apple Silicon, but it will take time and effort to reverse-engineer and implement.

I'm pretty sure it's just vanilla ARM NEON so I don't think it will take any reverse engineering. The Apple Silicon GPU is custom, but the CPU is just minor extensions to (and compatible with) AArch64. Rumour has it that this is because AArch64 was designed by Apple and donated to ARM (who Apple has close relationship with being that they were a founding member).

Re:Paving the Road to Vulkan on Asahi Linux by saagarjha on Monday March 20, 2023 @02:07PM (#35235907)
Apple support NEON (and uses it for most SIMD code) but it also has other proprietary ISA extensions for e.g. matrix multiply.
Re:Paving the Road to Vulkan on Asahi Linux by shaunsingh0207 on Monday March 20, 2023 @08:49PM (#35241077)
note that the proprietary extensions are extremely unlikely to gain linux support though, unless upstream arm adopts something similar

though amx won’t help out with emulation much

Re:Paving the Road to Vulkan on Asahi Linux by smoldesu on Monday March 20, 2023 @02:39PM (#35236485)
Interesting, that's what I was curious about. NEON is a bit slow last I checked, but at least Apple is sticking to spec here. It does make me wonder how much performance is left on the table for ARM architectures that want to emulate x86, though.

...it also raises the question of how emulated titles fare against translated ones. It would be fascinating to see how something like Dark Souls Remastered performs through Yuzu vs DXVK on Apple Silicon.

Re:Paving the Road to Vulkan on Asahi Linux by kitsunesoba on Monday March 20, 2023 @01:49PM (#35235604)
It's a little frustrating how it's the norm in the game industry for companies to toss a binary over the wall and maybe patch it for a short period after release (not a given, ports in particular are vulnerable to being forever stuck at 1.0), with significant technical updates being out of the question until it's been long enough for them to try to sell you a remaster.

Not having any experience in that industry, I wonder what the driving forces of this are. I suspect it's some combination of incredibly brittle codebases that cease to build if glanced at the wrong way and aversion to spending anything on games post-release.

Re:Paving the Road to Vulkan on Asahi Linux by stonemetal12 on Monday March 20, 2023 @02:09PM (#35235945)
>aversion to spending anything on games post-release.

I am pretty sure that is the answer. Unless the game is Cyberpunk levels of unplayable, there is no money in post release support unless it is bundled with DLC or GOTY releases.

Back in the day it was pretty commonly sited figure that like 90% of a game's revenue came in the first 3-4 weeks of release. DLC and "seasons" are an attempt to stretch it out and make more off a single release, but I haven't heard how well that works.

Re:Paving the Road to Vulkan on Asahi Linux by masklinn on Monday March 20, 2023 @02:27PM (#35236271)
> DLC and "seasons" are an attempt to stretch it out and make more off a single release, but I haven't heard how well that works.

That also dates back to back in the days, we just called it expansion packs.

Re:Paving the Road to Vulkan on Asahi Linux by masklinn on Monday March 20, 2023 @02:31PM (#35236349)
> I suspect it's some combination of incredibly brittle codebases that cease to build if glanced at the wrong way and aversion to spending anything on games post-release.

The primary reason is that there's no money in it. Like movies, your "one shot" game (without some sort of continuous billing e.g. mmo, subscription, continuous stream of DLCs) makes most of its revenue in the first few weeks, and once the kinks are ironed out what it makes afterwards doesn't really depend on maintenance.

Additional maintenance doesn't pay for itself, the producer doesn't pay the devs for that, and thus the devs take on the next contract to pay the bill. Not to mention additional maintenance is a risk.

Re:Paving the Road to Vulkan on Asahi Linux by Gigachad on Monday March 20, 2023 @10:51PM (#35241978)
Most of the time if the game was good and it’s been abandoned, someone will make a remaster or a modern take on it which now works on modern systems again
Re:Paving the Road to Vulkan on Asahi Linux by ynx on Monday March 20, 2023 @02:26PM (#35236256)
Not supporting new platforms is because

- Total dependency on an engine's build system

- Lack of official support for uncommon platforms

- Extremely low expected ROI even if it were possible to deliver on other platforms

Gamedevs aren't in the business of building platforms, they're in the business (mostly) of consuming them and going where the players are.

Gamedevs not updating is because

- The engines themselves are indeed outrageously brittle at times, with LTS releases sometimes containing significant bugs that persist against newer releases of minor and major versions

- New releases can actually cause dramatic regressions, not just in terms of bugs, but in terms of features, stability, binary size, and more

- AAAs are wasting time chasing the next big thing, non-AAAs are struggling with few people and need to constantly be building the next thing because they're building products, not services

- Gamedevs are largely media/entertainment companies, very few act like technology companies

Re:Paving the Road to Vulkan on Asahi Linux by jacquesm on Monday March 20, 2023 @01:57PM (#35235742)
I much prefer that model over services that suddenly disappear.
Re:Paving the Road to Vulkan on Asahi Linux by kitsunesoba on Monday March 20, 2023 @02:11PM (#35235992)
The "binary abandonment" model can have effectively the same result, though.

An example that come to mind immediately is how much of a mess it is to get games that were built with Games for Windows Live like the PC port of Fable 3 running on modern Windows. It's possible, but there's a ridiculous number of hoops to jump through, none of which would be necessary if Microsoft shipped a quick and dirty update that pulled out the Games for Windows Live dependency.

Re:Paving the Road to Vulkan on Asahi Linux by howinteresting on Monday March 20, 2023 @07:44PM (#35240516)
GFWL games are really an exception -- most games on Windows or Proton work fine years down the road.
Re:Paving the Road to Vulkan on Asahi Linux by izacus on Monday March 20, 2023 @02:48PM (#35236621)
Not to mention the predatory subscription models that are rampant in mobile for software that is equally as broken, just costing more.
Re:Paving the Road to Vulkan on Asahi Linux by smoldesu on Monday March 20, 2023 @02:34PM (#35236403)
On a technical level, the assumption is that the runtime stays the same. This is a given on game consoles and generally well-managed on Windows. It can be emulated on MacOS and Linux, but it relies on people not scrapping execution modes or graphics libraries willy-nilly. I wager most people have done the math and realized that charging for a game like a product while updating it like a service makes little financial sense.
Re:Paving the Road to Vulkan on Asahi Linux by 58028641 on Monday March 20, 2023 @03:11PM (#35237005)
The problem with Box86 is that it requires 32 bit ARM, which Apple Silicon does not support.
Re:Paving the Road to Vulkan on Asahi Linux by est31 on Monday March 20, 2023 @02:33PM (#35236385)
Desktop games*. ARM is a major target for gaming already. Games are 61 percent of app store revenue and 71 percent of play store revenue. And mobile games are the majority of the gaming market (51%).

https://www.businessofapps.com/data/mobile-games-revenue/

Re:Paving the Road to Vulkan on Asahi Linux by ajvs on Monday March 20, 2023 @02:46PM (#35236586)
Getting Waydroid to run well on Linux has big issues still unfortunately if you wanted to use it to play Android games. Managed to get it working for a few months on a previous Ubuntu version, now can't get it to work at all.
Re:Paving the Road to Vulkan on Asahi Linux by kuschku on Monday March 20, 2023 @08:45PM (#35241041)
How many sprites to you need to add to a one-armed bandit before it becomes a game?
Re:Paving the Road to Vulkan on Asahi Linux by klooney on Monday March 20, 2023 @02:54PM (#35236716)
16k pages is going to make everything hard, I'm not holding my breath.
Re:Paving the Road to Vulkan on Asahi Linux by sophacles on Monday March 20, 2023 @03:02PM (#35236850)
What role does page size play here, and why is 16K a problem?
Re:Paving the Road to Vulkan on Asahi Linux by gavinsyancey on Monday March 20, 2023 @04:22PM (#35238074)
The page size dictates the minimum size and alignment requirements for `mmap`, and also for regions of memory with different levels of protection (e.g. read-only vs read+write vs read+execute, etc). If a program expects to be able to `mmap` in 4kb chunks and can't, it will probably not work properly.

On macOS, IIRC the userspace and kernel-space page size can be different and different userspace programs can run with diferent page sizes, however on Linux the page size is currently fixed across the system and set at compile time. The M1's IOMMU only supports 16k-aligned pages, so memory regions that need to be shared with other hardware (e.g. the GPU) need to be 16k-aligned. As such (and because Linux doesn't currently have great support for mixed page sizes), the Asahi Linux project has decided to run with 16k pages globally. However, that breaks a number of applications that are expecting 4k pages.

More info: https://github.com/AsahiLinux/docs/wiki/Broken-Software

Re:Paving the Road to Vulkan on Asahi Linux by pxc on Monday March 20, 2023 @09:50PM (#35241560)
Damn. There's some really important software on that list: libvirt/QEMU/KVM, LVM, WINE
Re:Paving the Road to Vulkan on Asahi Linux by worthless-trash on Monday March 20, 2023 @11:44PM (#35242320)
I imagine that there will be a lot of work to improve this over the coming years, not just because of asahi, but the cloud ARM systems that are being developed.

I think that Fedora may be leading the pack here, see https://danielpocock.com/power9-aarch64-64k-page-sizes/

Re:Paving the Road to Vulkan on Asahi Linux by londons_explore on Monday March 20, 2023 @04:25PM (#35238132)
Pages have been 4k on a lot of systems for 30+ years.

That means a lot of software has come to assume that.

Certain memory buffers need to be page size aligned, or a multiple of pages long. Code can only be loaded to a page aligned memory address. Memory mapping and read/write/execute permissions can only be set on a per-page basis.

If all that stuff is hardcoded now, there will be lots of fixes necessary to make things work properly with a different page size.

And those fixes probably will need the software to be recompiled. And some software is only distributed in binary form, and getting someone to recompile it may be nearly impossible.

Re:Paving the Road to Vulkan on Asahi Linux by jraph on Monday March 20, 2023 @06:15PM (#35239560)
Sibling comments said it all, though "The Quest for Netflix on Asahi Linux", posted on HN [1] as a very good, detailed explanation of this and is a nice read.

[1] https://news.ycombinator.com/item?id=35081510

Re:Paving the Road to Vulkan on Asahi Linux by nicoburns on Monday March 20, 2023 @06:05PM (#35239431)
I think the Asahi project will release a 4k kernel version for those really need/want it at some point. As I understand there are no technical barriers, they're just delaying it to push more projects into supporting the 16k mode (which has better perf).
Re:Paving the Road to Vulkan on Asahi Linux by sliken on Wednesday March 22, 2023 @04:17PM (#35266540)
I believe 4k pages works with Asahi Linux today. However the CPU can do 4k and 16k pages, the GPU is 16k pages only. So you give up accelerated 3D to run 4k pages.
Re:Paving the Road to Vulkan on Asahi Linux by nicoburns on Thursday March 23, 2023 @09:48AM (#35274748)
Looks like 4k support has just been added to the GPU driver https://twitter.com/LinaAsahi
Re:Paving the Road to Vulkan on Asahi Linux by sliken on Thursday March 23, 2023 @10:41AM (#35275559)
Nice, I was right ... up to yesterday. Now it's fixed. Things are moving quickly.
Re:Paving the Road to Vulkan on Asahi Linux by fulafel on Monday March 20, 2023 @03:43PM (#35237490)
Linux gaming has been developing in the opposite direction for a while, moving away from even x86 Linux native ports and toward running x86 Windows games under emulation.
Re:Paving the Road to Vulkan on Asahi Linux by kccqzy on Monday March 20, 2023 @03:45PM (#35237517)
They are running x86 Windows games under Wine. Remember that Wine stands for Wine is not an emulator.
Re:Paving the Road to Vulkan on Asahi Linux by foresto on Monday March 20, 2023 @04:34PM (#35238264)
Try to remember that hardware emulation is not the only kind of emulation.

Wine (written as WinE when I first encountered it, IIRC) emulates the Windows runtime environment.

Re:Paving the Road to Vulkan on Asahi Linux by fulafel on Monday March 20, 2023 @03:59PM (#35237719)
The recursive acronym tradition of course (GNU's Not Unix, Eine Is Not Emacs etc) traditionally implied the implementation being superset or better than the thing it's replacing and referencing in the acronym.

Wine FAQ concludes

> "Wine is not just an emulator" is more accurate. Thinking of Wine as just an emulator is really forgetting about the other things it is. Wine's "emulator" is really just a binary loader that allows Windows applications to interface with the Wine API replacement.

Re:Paving the Road to Vulkan on Asahi Linux by sofixa on Thursday March 23, 2023 @06:04AM (#35272367)
I have Steam on a Mac, and roughly 1/3 of my library supports M1 Macs. I have some old games in my library, so that's pretty decent numbers for a relatively new platform that is 64 bit only, relatively niche in general, and extremely niche for gaming.