Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Wine (software)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Design== The goal of Wine is to implement the [[List of Microsoft Windows application programming interfaces and frameworks|Windows API]]s fully or partially that are required by programs that the users of Wine wish to run on top of a Unix-like system. === Basic architecture === The programming interface of Microsoft Windows consists largely of [[dynamic-link library|dynamic-link libraries]] (DLLs). These contain a huge number of wrapper sub-routines for the system calls of the kernel, the NTOS kernel-mode program (ntoskrnl.exe). A typical Windows program calls some Windows DLLs, which in turn calls user-mode gdi/user32 libraries, which in turn uses the kernel32.dll (win32 subsystem) responsible for dealing with the kernel through system calls. The system-call layer is considered private to Microsoft programmers as documentation is not publicly available, and published interfaces all rely on subsystems running on top of the kernel. Besides these, there are a number of programming interfaces implemented as services that run as separate processes. Applications communicate with user-mode services through RPCs.<ref name="archi">{{cite web |title=Wine Developer's Guide/Architecture Overview |url=https://wiki.winehq.org/Wine_Developer%27s_Guide/Architecture_Overview#Wine_Overview |website=WineHQ |access-date=22 April 2019 |archive-date=22 April 2019 |archive-url=https://web.archive.org/web/20190422232117/https://wiki.winehq.org/Wine_Developer%27s_Guide/Architecture_Overview#Wine_Overview |url-status=live }}</ref> Wine implements the Windows [[application binary interface]] (ABI) entirely in [[user space]], rather than as a [[Loadable kernel module|kernel module]]. Wine mostly mirrors the hierarchy, with services normally provided by the kernel in Windows<ref>See the "[[Windows service]]" article</ref> instead provided by a [[daemon (computing)|daemon]] known as the wineserver, whose task is to implement basic Windows functionality, as well as integration with the [[X Window System]], and translation of [[Signal (IPC)|signals]] into native Windows exceptions. Although wineserver implements some aspects of the [[Architecture of Windows NT|Windows kernel]], it is not possible to use native Windows drivers with it, due to Wine's underlying architecture.<ref name="archi"/> ===Libraries and applications=== Wine allows for loading both Windows DLLs and Unix [[shared object]]s for its Windows programs. Its built-in implementation of the most basic [[Microsoft Windows library files|Windows DLLs]], namely [[NTDLL]], [[KERNEL32]], [[GDI32]], and [[USER32]], uses the shared object method because they must use functions in the host operating system as well. Higher-level libraries, such as WineD3D, are free to use the DLL format. In many cases users can choose to load a DLL from Windows instead of the one implemented by Wine. Doing so can provide functionalities not yet implemented by Wine, but may also cause malfunctions if it relies on something else not present in Wine.<ref name="archi"/> Wine tracks its state of implementation through automated [[unit testing]] done at every git commit.<ref>{{cite web |title=Wine Status |url=https://wiki.winehq.org/Wine_Status |website=WineHQ |access-date=22 April 2019 |archive-date=22 April 2019 |archive-url=https://web.archive.org/web/20190422232105/https://wiki.winehq.org/Wine_Status |url-status=live }}</ref> ===Graphics and gaming=== While most office software does not make use of complex GPU-accelerated graphics APIs, computer games do. To run these games properly, Wine would have to forward the drawing instructions to the host OS, and even translate them to something the host can understand. [[DirectX]] is a collection of Microsoft APIs for rendering, audio and input. As of 2019, Wine 4.0 contains a DirectX 12 implementation for [[Vulkan API]], and DirectX 11.2 for OpenGL.<ref name="wine-40">{{cite web |title=Wine 4.0 |url=https://www.winehq.org/announce/4.0 |website=WineHQ |language=en |access-date=22 April 2019 |archive-date=3 April 2019 |archive-url=https://web.archive.org/web/20190403162302/https://www.winehq.org/announce/4.0 |url-status=live }}</ref> Direct2D support has been updated to Direct2D 1.2.<ref name="wine-40"/> Wine 4.0 also allows Wine to run Vulkan applications by handing draw commands to the host OS, or in the case of macOS, by translating them into the [[Metal API]] by [[MoltenVK]].<ref name="wine-40"/> ; XAudio :{{As of|2019|02}}, Wine 4.3 uses the [[FAudio]] library (and Wine 4.13 included a fix for it) to implement the [[XAudio2]] audio API (and more<!--"This is FAudio, an XAudio reimplementation that focuses solely on developing fully accurate DirectX Audio runtime libraries for the FNA project, including XAudio2, X3DAudio, XAPO, and XACT3."-->).<ref>{{cite web |url=https://www.phoronix.com/scan.php?page=news_item&px=Wine-Lands-FAudio-XAudio2 |title=FAudio Lands in Wine For New XAudio2 Re-Implementation |publisher=Phoronix |date=25 February 2019 |access-date=24 March 2019 |archive-date=1 March 2019 |archive-url=https://web.archive.org/web/20190301222555/https://www.phoronix.com/scan.php?page=news_item&px=Wine-Lands-FAudio-XAudio2 |url-status=live }}</ref><ref>{{cite web |url=https://www.winehq.org//announce/4.3 |title=WineHQ - Wine Announcement - The Wine development release 4.3 is now available. |access-date=24 March 2019 |archive-date=15 March 2019 |archive-url=https://web.archive.org/web/20190315020045/https://www.winehq.org/announce/4.3 |url-status=live }}</ref> ; XInput and Raw Input : Wine, since 4.0 (2019), supports [[game controller]]s through its builtin implementations of these libraries. They are built as Unix shared objects as they need to access the controller interfaces of the underlying OS, specifically through [[Simple DirectMedia Layer|SDL]].<ref name="wine-40"/> ====Direct3D==== Much of Wine's DirectX effort goes into building WineD3D, a translation layer from Direct3D and [[DirectDraw]] API calls into [[OpenGL]]. As of 2019, this component supports up to DirectX 11.<ref name="wine-40"/> As of 12 December 2016, Wine is good enough to run ''[[Overwatch (video game)|Overwatch]]'' with D3D11.<ref>{{cite web |url=http://www.phoronix.com/scan.php?page=news_item&px=Wine-Patches-Overwatch-Working |title=With Wine Git, You Can Run The D3D11 Blizzard Overwatch Game on Linux |publisher=Phoronix |date=12 December 2016 |access-date=17 December 2016 |archive-date=15 December 2016 |archive-url=https://web.archive.org/web/20161215120551/http://phoronix.com/scan.php?page=news_item&px=Wine-Patches-Overwatch-Working |url-status=live }}</ref> Besides being used in Wine, WineD3D DLLs have also been used on Windows itself, allowing for older GPUs to run games using newer DirectX versions and for old DDraw-based games to render correctly.<ref>{{cite web |last1=Dossena |first1=Federico |title=WineD3D For Windows |url=https://fdossena.com/?p=wined3d%2Findex.frag |website=Federico Dossena |access-date=22 April 2019 |archive-date=13 June 2019 |archive-url=https://web.archive.org/web/20190613212938/https://fdossena.com/?p=wined3d%2Findex.frag |url-status=live }}</ref> Some work is ongoing to move the Direct3D backend to Vulkan API. Direct3D 12 support in 4.0 is provided by a "vkd3d" subproject,<ref name="wine-40"/> and WineD3D has in 2019 been experimentally ported to use the Vulkan API.<ref name="wine-46">{{cite web |title=Wine 4.6 |url=https://www.winehq.org//announce/4.6 |website=WineHQ |access-date=22 April 2019 |language=en |archive-date=13 April 2019 |archive-url=https://web.archive.org/web/20190413105408/https://www.winehq.org/announce/4.6 |url-status=live }}</ref> Another implementation, [[DXVK]], translates Direct3D 8, 9, 10, and 11 calls using Vulkan as well and is a separate project.<ref>{{Citation|last=Rebohle|first=Philip|title=doitsujin/dxvk|date=4 May 2021|url=https://github.com/doitsujin/dxvk|access-date=4 May 2021|archive-date=26 May 2020|archive-url=https://web.archive.org/web/20200526133505/https://github.com/doitsujin/dxvk|url-status=live}}</ref> Wine, when patched, can alternatively run Direct3D 9 API commands directly via a [[Free and open-source software|free and open-source]] [[Gallium3D]] State Tracker (aka Gallium3D GPU driver) without translation into OpenGL API calls. In this case, the Gallium3D layer allows a direct pass-through of DX9 drawing commands which results in performance improvements of up to a factor of 2.<ref name="d3d9">{{cite web |url=https://lists.freedesktop.org/archives/mesa-dev/2013-July/041900.html |title=Direct3D 9 Gallium3D State Tracker |author=Christoph Bumiller |date=16 July 2013 |quote=there are a couple of differences to d3d1x: ''[...]'' it's written in C instead of C++ and not relying on horrific multiple inheritance with ''[...]'' So far I've tried Skyrim, Civilization 5, Anno 1404 and StarCraft 2 on the nvc0 and r600g drivers, which work pretty well, at up to x2 the fps I get with wined3d (Note: no thorough benchmarking done yet). |access-date=10 January 2021 |archive-date=27 January 2021 |archive-url=https://web.archive.org/web/20210127092353/https://lists.freedesktop.org/archives/mesa-dev/2013-July/041900.html |url-status=live }}</ref> As of 2020, the project is named Gallium.Nine. It is available now as a separate standalone package and no longer needs a patched Wine version.<ref name="Gallium.Nine">{{cite web |title=Gallium Nine Standalone |url=https://github.com/iXit/wine-nine-standalone |website=github |access-date=3 December 2020 |language=en |archive-date=12 November 2020 |archive-url=https://web.archive.org/web/20201112032739/https://github.com/iXit/wine-nine-standalone |url-status=live }}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Wine (software)
(section)
Add topic