Windows NT graphic drivers subsystems

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

etko
Posts: 154
Joined: Thu May 26, 2005 3:43 am
Location: Slovakia
Contact:

Windows NT graphic drivers subsystems

Post by etko »

Hello,

can someone please, some dev, elaborate how does WinNT/Win32 low level graphics actually work? From all my research I arrived to this conclusion, that "Windows Platform" supports no less than 3 graphic driver architectures:

  1. GDI driver - these are old WinNT graphics drivers which are used by actual Windows GUI, they support some very primitive HW acceleration like accelerated bitblts and some primitives drawing + transparency operations on Win2K, but for most of the cards out there these feats are emulated by direct memory access and drawing every pixel by CPU (standard VGA/SVGA).
  2. Direct3D HAL driver - these are completely different type of drivers and are used solely by Direct3D, I guess there are some hacks done in whole windows GUI to be able to draw into window etc.
  3. OpenGL ICD driver - these are another kind of drivers which are used by OpenGL on Windows, guess even more hacking is done to be able to blend OGL output with D3D and plain GDI one. I am unable to imagine how these work.
Am I right?

If this is true it means also, that doing HW accelerated GFX on Windows is quite a mess. Plus it means that that to fully support some GFX card those card's developers have to write all these 3 drivers?

Someone mentioned here that some OpenGL implementations, like nVidia's ones are in reality using some kind of in-house "mini-driver" which is used by D3D and GDI too, and to which all these 3 upper layers talk.
Is it like that? I am just curious what does it all mean for ReactOS, and whether all these 3 types of drivers will be supported?

It was told somewhere here too, that at some point of time nVidia's OpenGL ICDs worked in ReactOS, and I saw it was discussed recently. Does this invalidates above statement about common "mini-driver"?
GreatLord
Developer
Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord »

Hi

I am not home at momnet

The gdi + directx drv are same drv.
differnt is that directx are a extention to gdi
u wirte the drv like a gdi drv, see ms ddk for more info and great example

the win32k have syscall to gdi and directx driver
the syscall name start on ntgdi and ntdd

then it is the gdi32.dll and d3dthk doing the real syscall to win32k
I can expain later how it work later
etko
Posts: 154
Joined: Thu May 26, 2005 3:43 am
Location: Slovakia
Contact:

Post by etko »

How does OpenGL fit in?
oiaohm
Posts: 1322
Joined: Sun Dec 12, 2004 8:40 am

Post by oiaohm »

OpenGL ICD fits in where ever the video card maker decides to take it.

OpenGL ICD driver either does direct calls to the video card driver or to Direct 3d or to a Middle step driver.

Basically no formal rules here other than how ICD plugs into OpenGL. Is the video card wild west. It does matter how you complete the task as long as it works at the end.

So its sometime GDI sometime D3D sometimes direct. Never try to guess what OpenGL is doing. You either build a pure OpenGL application or you don't. Mixing Opengl output with D3D or GDI is a nightmare because it works differently depending on drivers.

Note sections of Nvidia and ATI OpenGL ICD's does direct calls to the video card. When Microsoft talked about blocking this both threated to not provide any drivers for Vista.

Of course due to the wild west nature of opengl they could be making D3D calls as well. I have not seen that with NVidia drivers. But I cannot rule it out from being true at some time or another.
GreatLord
Developer
Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord »

Hi
Sorry for the delay in the answer.

OpenGL ICD
ICD allown to overwtite by any type of opengl drv
here is example if u got software emulations of opengl
the icd interface will take windows own opengl32.dll it is OpenGL 1.2
(if I rember right without locking up which version windows own opengl32.dll support). But when u install a graphic drv the register
entry will be over write or add to the drv list for opengl (do not known
the behvior here, never care how windows really work here, when it come to the registrate the hw opengl drv.) when the entry from the drv hae been writing in windows register the icd can now use hw accelleration drv of u graphice card. With other word the opengl drv that comes with u graphice card communicate directly with the drv.

graphice card Opengl.dll -> directly to graphic driver

Do u whant more informations about how it works let me known. I hope I have not missed a detail here now.

Vista work diffent OpenGL need going through DirectX but some say it have been removed in the release build. so opengl working as it use to. I can not confrim it or deny how vista working here.

of cource u can mix gdi, directdraw/d3d and opengl, the windows is basic always compatible with them.
Radhad
Posts: 605
Joined: Wed Apr 12, 2006 5:09 pm
Contact:

Post by Radhad »

Yes OpenGL Works on Vista RTM.

I have Vista Business Edition from MSDN AA Educational and I have installed the latest NVIDIA driver and treid to play Quake 3 and it runs well. An employee installed Vista Beta 2 (or Beta 2 TR) and he could not play Quake 3. Maybe I can do a Screenshot where you see Vista Aero and Quake 3 running...
GreatLord
Developer
Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord »

opengl work in vista beta, the question is how they did it in the release build. Opengl was warp around dx

the question if it still is warp or not around dx
Phalanx
Posts: 360
Joined: Sun Dec 19, 2004 12:42 am
Location: Australia

Post by Phalanx »

GreatLord wrote:opengl work in vista beta, the question is how they did it in the release build. Opengl was warp around dx

the question if it still is warp or not around dx
There is a whole section on the OpenGL forums about this. Basically MS back down from translating the instructions.
oiaohm
Posts: 1322
Joined: Sun Dec 12, 2004 8:40 am

Post by oiaohm »

GreatLord is was simple Nvidia and ATI opengl drivers are still direct on Vista no use of Direct X.

It was that or no drivers at all from Nvidia or ATI for Vista for at least 12 months.

If you disabled Glass interface the old direct to driver system in Nvidia and Ati Opengl system would work on Vista in all the Beta's. Nvidia and ATI never build drivers that used the Direct X wrapping as MS wished. Disabling Glass interface also disables playing DRM media. So it was going to be a real nightmare. MS had no option but to back down Nvidia and ATI had them.

I still have not tried to play something DRM protected and run a opengl program to see what happens. Might not work to well. Note I don't have any DRM protected media to try it with.

SIS and Intel was very happen with wraping to direct X. Thinking some of there drivers under Windows XP do exactly that. And are the ones that make mixing Direct 3d calls and opengl calls interesting to say the least. Reason for the normal coding rule don't mix using them because driver bugs do come back and bite.

As I say ICD after the ICD is a wild west. No fixed rules. Video card company sets the rules on how they are going to do it. Even big powerful Microsoft has no say in the matter.
frik85
Developer
Posts: 829
Joined: Fri Nov 26, 2004 7:48 pm
Location: Austria, Europe
Contact:

Post by frik85 »

I have watched several Channel9 videos, and afaik it is this way:

If you run Vista with WinXP graphic drivers you cannot use Aero, but you can use OpenGL without restrictions, the same as in WinXP.

If you want to use Aero, you have to use Vista only graphic drivers, which limit the usage of OpenGL, as OpenGL has to run over a DirectX Wrapper.

Most companies that are in 3D, 3D-CAD, etc. bussiness will use non-aero classic mode anyway, and therefore they won't have problems with OpenGL.
Normal user who use the Aero mode, especially gamers may get problems if they want to play games like Doom3 or Quake4, etc. (OpenGL only games). With problems I mean performance hits.
Radhad
Posts: 605
Joined: Wed Apr 12, 2006 5:09 pm
Contact:

Post by Radhad »

I can only say somtething about Aero and Quake 3. The game runs well at first, but from time to time it hangs for a second, don't know why exactly. Maybe my RAM with 1 GB is not enough...

CPU: Athlon 64 3700+
RAM: 2x 512 MB
Graphic: GeForce 7900GT
Windows Vista Business with Aero
bastetfurry
Posts: 49
Joined: Sun Dec 05, 2004 11:20 am
Location: Deep Umbra ;)
Contact:

Post by bastetfurry »

1 GiB not enough? Did i miss something?
--
Wir sind kein Mensch und keine Katze.
Wir sind wer wir sind.
Wir sind die Kinder des Zwielichtes.
Wir sind Bastet.
cmoibenlepro
Posts: 483
Joined: Tue Nov 30, 2004 5:44 pm
Location: Canada

Post by cmoibenlepro »

1 GiB not enough? Did i miss something?
For Vista, it's a small configuration... Vista requires very powerful computers.
Radhad
Posts: 605
Joined: Wed Apr 12, 2006 5:09 pm
Contact:

Post by Radhad »

Yes, Vista uses around 400 MB only for the procedures, none program runs at this moment. So i would recommend to have 2 GB RAM.
bastetfurry
Posts: 49
Joined: Sun Dec 05, 2004 11:20 am
Location: Deep Umbra ;)
Contact:

Post by bastetfurry »

Um, yeah, sure, what a rescource hog.
Please, dear dev team, dont let ROS become such a res-hog.
I want to, for example, install it on some old p2-200 with 128 MB and it should run smoothly.
--
Wir sind kein Mensch und keine Katze.
Wir sind wer wir sind.
Wir sind die Kinder des Zwielichtes.
Wir sind Bastet.
Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests