PDA

View Full Version : NVidia drivers and UT2003


MadEgg
04-03-03, 06:22 AM
I've been using the nvidia drivers on Linux for a while and they're quite good, but as the performance of UT2003 kind of disappointed me, I started checking some thing.

I found this in my ~/.ut2003/System/UT2003.log:


Init: GL_VENDOR : NVIDIA Corporation
Init: GL_RENDERER : GeForce4 Ti 4400/AGP/SSE2
Init: GL_VERSION : 1.4.0 NVIDIA 43.49
Init: Device supports: GL
Init: Device supports: GL_EXT_bgra
Init: Device supports: GL_ARB_texture_compression
Init: Device supports: GL_EXT_texture_compression_s3tc
Init: Device supports: GL_ARB_texture_cube_map
Init: Device supports: GL_ARB_texture_env_combine
Init: Device supports: GL_NV_texture_env_combine4
Init: Device supports: GL_EXT_texture_lod_bias
Init: Device supports: GL_ARB_multitexture
Init: Device supports: GL_NV_vertex_array_range
Init: Device supports: GL_NV_vertex_array_range2
Init: C16 RGB565 Z24 S8
Init: OpenGL: allocated 32 MByte of AGP memory
Init: Game engine initialized


The second last line bothers me... 32 MByte of AGP memory.

I've got a GF4 Ti4400 with 128 MB memory, while it says it's only using 32 MByte(correct me if i'm wrong).

Do I need to tell the nvidia driver how many video-memory I've got before it uses everything or something?

I tried adding

VideoRam 131072


to my /etc/X11/XF86Config but that didn't make much difference.

Am I checking the wrong settings or it is really using only 1/4th of my video ram?

bwkaz
04-03-03, 08:46 AM
The nvidia X drivers ignore the VideoRam option.

The "32MB of AGP memory" does not mean that it's using 32MB of video memory. It means it's able to use up to 32MB of system memory as extra video memory, through the AGP bus (that is, after all, the only difference between AGP and PCI other than clock rate -- AGP has direct access to system memory at a high speed).

Does it help performance to use a 24-bit color depth?

MadEgg
04-03-03, 10:23 AM
Okay, thanks for the explanation.

How'd you know I'm using 16 bits color anyway? And increasing color depth is supposed to increase performance? I'm gonna try as soon as my gnome-compile is finished... somewhere later today.

Thanks so far.

Hmmz.. that increased the FPS a bit, I'm getting an average of 30 now... But that's still a ****load lower than others with way lower systemspecs are claiming to achieve.

bwkaz
04-03-03, 11:33 AM
Originally posted by MadEgg
Init: C16 RGB565 Z24 S8 That line is how I knew. ;)

RGB color type, 5, 6, and 5 bits per channel (5 red, 6 green, 5 blue, or something similar to that), is 16 bits total.

The reason 24-bit is sometimes faster is that it really isn't 24-bit, in memory. It's 8 color bits per pixel, plus 8 more of padding to align stuff on a 32-bit boundary in memory. When it's aligned that way, accesses on recent x86 CPUs are much faster.

16-bit alignment is decently fast too, but with 16-bit, each channel is only a piece of a byte, which means that a sequence like "increase red value of this pixel, increase green value, increase blue value" will do 3 separate writes to the same pair of bytes in memory, when it only needs to do 2. Plus, it does a bunch of bit shifting and masking on the "red" write so it doesn't destroy half of the green channel, so that takes even longer.

With an 888 layout, each channel is one byte, plus an individual pixel is one memory word. So writing to each of the channels doesn't need any masking (the x86 processors have support for writing a single byte, though it is a slight bit slower than a full word) or shifting, which helps.

What kind of performance are you getting? I'll have anywhere from 60fps (or so -- that's a guess) when I'm alone in a small room, down to 10-15 when there are five-ten bots in a large, open space with me. That's on a GF4 Ti4200, 128MB.

MadEgg
04-03-03, 03:19 PM
Ok, very clear :)

The performance I'm getting... Well, if I'm on my own in a room, and staring at the floor or in a corner or sumthing I get about 110 fps.

When I'm in open space i'm getting about 35 - 50 fps
When I'm in a room somewhere with bots or other players 15 - 30 fps...

At least it's less than i got in windows before i wiped it.