Unified nVidia TNT/GeForce 3D driver for Haiku
nVidia TNT/GeForce videodriver history:
In 2002 Bruno van Dooren wanted to setup a nVidia graphics driver for openBeOS (now Haiku). He actually worked on this, using the Matrox MGA driver as a starting point. Unfortunately it turned out he had not enough time to work on it because of 'reallife' issues.
So where does this leave us?
Because I already have some experience with nVidia graphics cards (see BeTVOut) and also with writing BeOS graphicscard drivers I decided I wanted to work on the Haiku nVidia driver too. So Bruno turned the driver and it's development over to me. Unfortunately the work he had done already has become 'aged' because in the meantime the MGA driver has improved a lot. Because of this, and because no real functionality had yet been built in, I decided to start over 'from scratch' with the latest version of the Matrox driver (0.14) to begin with.
Rudolf Cornelissen.

Current nVidia 3D driver features:
- Works on TNT1 (NV04) upto/including GeForce 4MX (NV18);
- Works with Mesa 3.4.2 (included);
- Supports basic openGL 3D acceleration;
- Supports forced screen retrace synchronisation.
Supported cards (as far as is known):
- TNT 1/2;
- TNT 2-M64;
- Vanta/Aladdin TNT2;
- GeForce 256;
- GeForce 2 MX/Ti/GTS/Go;
- GeForce 2 Integrated GPU (Nforce);
- GeForce 4 MX/Go;
- GeForce 4 Integrated GPU (Nforce 2);
- GeForce 4 MX4000;
- GeForce (4 MX) PCX 4300;
- Quadro (2/4/Go).
Known limitations:
- Only works in 16 and 32 bit color at the moment;
- Only works for one application at a time;
- There are other limitations: a more extensive list is included in the downloads.

Fixes for current nVidia 3D driver alpha 4.1 (companion to 2D driver 0.80):
This version should be considered a stable release. However, if you
first try it, you'd better not run anything crucial as it might hang
your screen and app_server..
Status since Alpha 3.5:
- Alpha 4.x versions use Mesa 3.4.2 again. Alpha 4.0 contains numerous
bugfixes compared to all older versions. Alpha 4.1 is, on top of that,
the fastest version upto now:
- on a P4@2.8Ghz with NV18, GeForce4-MX440 the teapot now spins at 800fps using default settings;
- on the same system Quake2 timedemo1 runs at 140fps in 640x480x16 fullscreen mode using default settings;
- on that same system using a NV15, GeForce2 Ti, Quake2 timedemo1 runs at 150fps: NV15 is currently the fastest supported card.
- The driver still only works on NV04 (TNT1) upto/including NV18
(GeForce 4 MX). Although I spent a lot of time to overcome this, that
didn't happen yet.
- The driver is still slow compared to Windows and Linux
closed-source drivers. This is partly because we're using such an old
version of Mesa, and partly because of lacking info on enabling some
nice features (like compressed Z-buffering and a higher level GPU
interface).
- The driver still only supports one 3D app at a time, and only works 'completely' in 16- and 32bit desktops.
- Still, this driver outperforms the original UtahGLX driver a
lot (both speed and quality wise), and gives us some interesting options
on BeOS. So enjoy it if you can. :-)
- Added features (require reboots to take effect currently):
- Force retrace synced swapbuffer execution: enable this option via
the driver's nv.settings file option: force_sync true. This option is
nice to use, it improves output quality considerably (removes tearing),
although it slows the fps down;
- Force GPU speed: enable and set this option via the driver's
nv.settings file option: gpu_clk. The number is the clock frequency in
Mhz. Personally, I wouldn't use this one though: it's dangerous if used
incorrectly while currently not improving speed much;
- Force RAM speed: enable and set this option via the driver's
nv.settings file option: ram_clk. The number is the clock frequency in
Mhz. Although I recommend not using this option either, it potentially
speeds up rendering some more, since currently RAM access is the biggest
bottleneck in the hardware for us. Still: dangerous option.
- Note please: the 'primary' nv.setting is not compatible with
the 3D add-on currently. Therefore you shouldn't enable it when you want
to use accelerated 3D.
Fixes for Alpha 4.1:
- 3D speed is (much) higher now depending on the card you use (thanks to improvements in the 2D driver):
- TNT cards run at the same speed as Alpha 4.0 did;
- TNT2 style cards run at upto 104% of the previous release;
- Most supported GeForce style cards now run at upto 140%;
- GeForce2Ti cards now run at upto 200% speed compared to Alpha 4.0.
- Fixed lacking synchronisation between GPU and driver managing
textures: this (at least) fixes texturing errors on setups that require
texture deletion/loading on-the-fly during rendering because of
(relative) low graphics memory;
- Driver now reports info about the graphicscard in use, along with the driver's own version number.
I want to thank BeOS Mr.X explicitly for his help and extensive testing
during development of Alpha 4. Without him this release would have
contained a lot less bug-fixes. So, thanks Mr.X!!
(Mr. X is a real 'BeOS-based' hardcore gamer I'd say! :-)

Fixes for old nVidia 3D driver alpha 4 (companion to 2D driver 0.74):
This version should be considered a stable
release. However, if you first try it, you'd better not run anything
crucial as it might hang your screen and app_server..
Status since Alpha 3.5:
- Alpha 4 uses Mesa 3.4.2 again. Alpha 4 contains numerous bugfixes
compared to all older versions, and it remains at the speed of Alpha 3.5
now (sometimes even better):
- on a P4@2.8Ghz with NV18, GeForce4-MX440 the teapot now spins at 800fps using default settings;
- on the same system Quake2 timedemo1 runs at 125fps in 640x480x16 fullscreen mode using default settings.
- The driver still only works on NV04 (TNT1) upto/including NV18
(GeForce 4 MX). Although I spent a lot of time to overcome this, that
didn't happen yet.
- The driver is still slow compared to Windows and Linux
closed-source drivers. This is partly because we're (still) using such
an old version of Mesa, and partly because of lacking info on enabling
some nice features (like compressed Z-buffering).
- The driver still only supports one 3D app at a time, and only works 'completely' in 16- and 32bit desktops.
- Still, this driver outperforms the original UtahGLX driver a
lot now (both speed and quality wise), and gives us some interesting
options on BeOS. So enjoy it if you can. :-)
- Added features (require reboots to take effect currently):
- Force retrace synced swapbuffer execution: enable this option via
the driver's nv.settings file option: force_sync true. This option is
nice to use, it improves output quality considerably (removes tearing),
although it slows the fps down;
- Force GPU speed: enable and set this option via the driver's
nv.settings file option: gpu_clk. The number is the clock frequency in
Mhz. Personally, I wouldn't use this one though: it's dangerous if used
incorrectly while currently not improving speed much;
- Force RAM speed: enable and set this option via the driver's
nv.settings file option: ram_clk. The number is the clock frequency in
Mhz. Although I recommend not using this option either, it potentially
speeds up rendering some more, since currently RAM access is the biggest
bottleneck in the hardware for us. Still: dangerous option.
- Note please: the 'primary' nv.setting is not compatible with
the 3D add-on currently. Therefore you shouldn't enable it when you want
to use accelerated 3D.
Fixes for Alpha 4:
- Quake 2 now renders the gamescores, texts, crosshair, etc.
correctly: driver now calls _mesa_swapbuffers() to let Mesa finish all
rendering before Swapbuffers() is executed;
- Quake 2's 'menu_playerconfig'/multiplayer setup (for example)
was fixed by (re)enabling support for partly erasing color and
Z-buffers;
- Fixed texture filtering: engine nolonger hangs while using
GL_LINEAR_MIPMAP_LINEAR. The driver programmed the engine incorrectly
when switching back from textured drawing to 'untextured' drawing
(selecting the next higher filtering 'level' instead of selecting 'no
filtering');
- Partly rendering lines and triangles (scissoring) was
(re)enabled: this seems to fix rendering slowness during 'observe' mode
in Quake 2 when you are outside of a map;
- The driver incorrectly programmed fog colorspaces into the engine (forgot a color-component). Now fixed;
- Fixed programming of openGL context colorspaces: the BGLview
constructor in the software driver incorrectly used a 'zero-define'
(BGL_RGB) to determine colorspace info. Also added modifying the context
colorspace setting upon modeswitches. This fixes (among others)
'grabbing' the teapot;
- Removed old 'fake-bitmap' code: resized output is now 'in sync'
trhoughout the driver. This (at least) fixes some rendering faults
during software rendering mode (fault looked like lost h_sync on a
analog TVset);
- Added extra wait_for_engine_idle function for all software
interface routines accessing color- and Z-buffers. This makes grabbing
the teapot work 'smooth' even in high-res modes (among others);
- Added 'workaround' for backface culling (Mesa internal
roundoff!?!) errors. Now rendering triangles that are 'nearly' visible
too. This fixes 'next room pixels shining trough walls error' on Quake2
(at least). Note that this was especially visible when you were in a
room with a outside wall, if the outside view behind it was very bright
(Enabling hardware culling also fixes the problem, but it's much slower
than using software culling at this point!);
- The looper is now locked when LockGL() is called; but also when
Swapbuffers() is executed. Note BTW that apps should call LockGL()
before calling Swapbuffers(): Quake2 apparantly forgets this for the
audio options in the menu system;
- Fixed Quake2 output left-top position offset in fullscreen mode
after modeswitches (R5 exhibited this fault only). Driver now issues
BWindow's Hide()/Show() explicitly upon BGLview's Show() events to keep
Quake2 rendering in direct mode (previously it fell-back into indirect
rendering mode). It seems BTW R5's Window Frame() function doesn't
(always) return updated content;
- There might even be a few more fixes in the driver that I forgot about.
I want to thank BeOS Mr.X explicitly for his help and extensive testing
during development of Alpha 4. Without him this release would have
contained a lot less bug-fixes. So, thanks Mr.X!!
(Mr. X is a real 'BeOS-based' hardcore gamer I'd say! :-)

Fixes for old nVidia 3D driver alpha 3.5 (companion to 2D driver 0.67):
This version should be considered a more or
less stable release. If it works for you, it shouldn't cause any
trouble, other than maybe some rendering faults. However, if you first
try it, you'd better not run anything crucial as it might hang your
screen and app_server..
Status since Alpha 3:
- Alpha 3.5 uses the 3da driver from Alpha3, combined with Mesa 3.2.1
because this combination seems to give the best overall results:
- on a P4@2.8Ghz with NV18, GeForce4-MX440 the teapot now spins at 800fps using default settings;
- on the same system Quake2 timedemo1 runs at 125fps in 640x480x16 fullscreen mode using default settings.
- Alpha 3.5 is otherwise just a recompile against the 2D driver version 0.67 so you can use 3D with that driverversion.
- Note please: the new 'primary' nv.setting is not compatible
with the 3D add-on currently. Therefore you shouldn't enable it when you
want to use accelerated 3D.

Fixes for old nVidia 3D driver alpha 3 (companion to 2D driver 0.53):
This version should be considered a more or
less stable release. If it works for you, it shouldn't cause any
trouble, other than maybe some rendering faults. However, if you first
try it, you'd better not run anything crucial as it might hang your
screen and app_server..
Fixes for this release:
- Upgraded to Mesa 3.4.2 (which is still openGL 1.2 though)
- Runs slightly faster on fast CPU's;
- Runs some apps slower on slow CPU's;
- Probably runs more apps with less faults;
- Use with 2D driver 0.53 (included in download);
- No changes in supported cards, but if your card isn't supported, the driver will segfault now instead of 'hang' your system.

Fixes for old nVidia 3D driver alpha 2-final (companion to 2D driver 0.53):
This version should be considered a more or
less stable release. If it works for you, it shouldn't cause any
trouble, other than maybe some rendering faults.
However, if you first try it, you'd better not run anything crucial as
it might hang your screen and app_server..
Fixes for this release:
- Runs in DMA mode (alpha 1 ran in PIO mode), so it's much faster. Use with 2D driver 0.53 (included in download);
- NV17 and NV18 are now decently supported (fastest supported cards currently);
- Switched to Mesa 3.2.1 because of the numerous openGL conformity fixes it has compared to Mesa 3.2;
- Concurrent use of overlay and 3D is now possible without (hanging) trouble;
- The driver contains some other more minor fixes as well.

Fixes for old nVidia 3D driver alpha 1-final (companion to 2D driver 0.43):
This version should be considered a more or
less stable release. If it works for you, it shouldn't cause any
trouble, other than maybe some rendering faults.
However, if you first try it, you'd better not run anything crucial as it might hang your screen and app_server..
Fixes for this release:
- Initial release;
- GLQuake doesn't yet work correctly: you might have to kill it on another workspace than you are running it;
- Works with Quake2;
- Works with the demo's GLteapot, 3Dlife, Demo and Sample (all included);
- Other apps aren't tested yet. Feedback is welcome ;-)

Things that are scheduled to be implemented or fixed:
- Upgrade to current MESA version;
- Seperate 3D add-on from MESA compiled library with internal 'hardcoded' 3D add-on;
- Improve/extend various stuff when/if possible.
NOTE PLEASE: This list is kind of a forward looking statement. So I don't know if any or all of this stuff will ever get implemented. I will keep working on the driver for as long as it makes sense and only as long as I have time for it to spare.

Rudolf.
(Page last updated on May 2, 2016)