Hacker News new | ask | show | jobs
by Delk 1640 days ago
Well, it can be a layer as well. If a game makes DirectX calls, and those calls are translated on the fly to corresponding Vulkan (or in some cases perhaps OpenGL) calls, that adds a layer. That is, unless the calls are AOT or JIT transpiled or something similar -- I don't know if they are.

System calls are also something that would require an additional layer, as the required Linux system calls need to be made in addition to intercepting the Windows system calls in Wine code. Some other APIs in Wine may also be implemented on top of corresponding Linux APIs rather than just being standalone replacements for Windows code.

The majority of code in Wine is probably just reimplementations of Windows APIs, which could be thought of as being parallel to the Windows implementations rather than layers between a Windows API and a Linux one, so you're correct there.

I'd generally expect there to be a performance hit on average, but as you said, it doesn't always happen, and it's not as large as one might expect if thinking about an emulator or something similar.