Direct3D, the kernel and ReactOS

Stefan Dösinger stefandoesinger at
Wed Mar 29 15:12:06 CST 2006

Hello List,
I had a talk to the DirectX developers of reactos on their irc channel to 
discuss how Reactos and Wine can share efforts on DirectX.
(Please leave the legal issues asside for now, let us concentrate on the 
technical part for now).

I didn't expect much possibility for a cooperation in such a hw-related thing 
as DirextX, but Greatlord told me about the gdi / win32k problem Wine is 
heading to with the current DirectX code.

According to Greatlord, Microsoft's DirectX implementation basically consists 
of a kernel-side part in gdi.dll and win32k.sys, and a user-mode part in 
ddraw.dll, d3d8.dll and d3d9.dll. The user dlls contain the Hardware 
emulation layer code, and calls to the kernel for the Hardware abstraction 
layer. Now that wouldn't be a problem for Wine, as applications are expected 
to use the user mode dlls, and using the kernel interface is highly 
discouraged by Microsoft. However, there are a few apps out there which 
access the kernel interface directly, and Greatlord told me that he knew 
about a few companies which plan to use it to gain speed improvement. 
Expectedly, such apps won't work on Wine.

My long term suggestion is to move the Direct3D->OpenGL translation code from 
WineD3D to gdi and a win32k sys, and write ddraw.dll, d3d8.dll and d3d9.dll 
to use that interface. The user mode dlls can be shared with Reactos, and 
from a technical point of view, even Microsoft's DirectX dlls can be used on 
Wine(including the hardware emulation layer).

I know that this is not easy to achieve. The kernel interface is poorly 
documented, and Greatlord has spent a lot of effort to verify the docs and to 
write a better documentation of the interface. Apps using the kernel 
interface should be considered broken, and I don't give them a long lifetime 
as the interface changes from Windows version to Windows version(According to 
Microsoft, Greatlord says it didn't change since NT(2K?) ). Should we go this 
way and implement the kernel Direct3D interface? If so, I consider this 
something post-1.0, and we should definitely see what changes Vista brings.

Another thing we discussed was DirectInput. ReactOS uses wines dinput.dll, 
with improvements which gets the sdk demos and some nasty games working. I 
can see if I can merge the changes to Wine.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url :

More information about the wine-devel mailing list