VRAM requirements

Blitz3D Forums/Blitz3D Programming/VRAM requirements

Shifty Geezer(Posted 2006) [#1]
Am I write in thinking a 3D display with no textures will require...

a) 800 x 600 16 bit = 800x600x2 bytes = 960,000 bytes
b) 800 x 600 32 bit = 800x600x4 bytes = 1,920,000 bytes
c) 1024 x 768 16 bit = 1024x768x2 bytes = 1,572,864 bytes
d) 1024 x 768 32 bit = 1024x768x4 bytes = 3,145,728 bytes

As such, a requires a 1 MB graphics card, b and c need 2 meg cards, and d needs a 4 MB card? If I add a texture with mipmapping, that amount of VRAM will be consumed too in the processing of rendering, so a 2 MB graphics card at 800x600 32 bit will have all of 100kb for textures?

Also has anyone an idea of when 4 MBs became the minimum, and PCs after that time period should have 4 MBs?


jfk EO-11110(Posted 2006) [#2]
Well 1, 2 or 4 MD VRAM is really very out of date. I think most cards with eg. 4 MB are not supported by Direct3D. A lot of Games that are released today do require 256 MB or even more. I think it's ok to expect there are at least 64 MB if you plan to use DirectX 7 to its imits. If you really want to do something for retro hardware, you might think about to use a software renderer instead, that doesn't care about VRam.

Well in your calculation it seems you forgot there's doublebuffering, so you maybe need to double those numbers.


MikeP (Dark Mist Software)(Posted 2006) [#3]
"A lot of Games that are released today do require 256 MB or even more. "

i havnt seen any games that require that much. Most now-a-days require 32MB /w T&L


Shifty Geezer(Posted 2006) [#4]
jfk : Are both Front and Backbuffers in VRAM? For some reason I was thinking front buffer was in main RAM, but then how'd it get out through the graphic card?! 6 Mb cards sounds a lot for me considering my retro audience.

Still, a bit of research shows a Riva TNT+ from 1998 onwards should be enough no worries. It doesn't support DirectX 7 though. Will that be a problem? Can Blitz3D run on DX6 with reduced functionality?


jfk EO-11110(Posted 2006) [#5]
afaik no, it requires dx7, although you may install dx7 on any machine, but it's not sure if direct3D will support your card! Probably you simply won't be able to use Graphics3D, but 2D will work.

Well I'm not sure about these things, but I think both are in Vram, backbuffer and frontbuffer. They are the same, flipping them will only swap some access adresses. In windowed mode it's a bit more complicated since Windows is using some sort of rectangular update system.

Of course, if windows cannot find Vram other than the 640*480 Pixels required by the protected mode, it will try to emulate Vram.


Mustang(Posted 2006) [#6]
Uh hoh... you need front buffer, back buffer and z-buffer for starters. Geometry (vertices/polygons) also take VRAM so 1 meg would definately not be enough... also different color depths take different amount of memory.

16-bit:

(1024[w] * 768[h] * 2[color bytes-per-pixel]) * 3[screen,back,z] = 4.72 megs

32-bit:

(1024[w] * 768[h] * 4[color bytes-per-pixel]) * 3[screen,back,z] = 9.44 megs

Check this thread for more spesific formulas:

http://www.blitzbasic.co.nz/Community/posts.php?topic=24157


Shifty Geezer(Posted 2006) [#7]
Many thanks all.

Mustang, from this...
And you have other stuff there in the VRAM too (depending what 3D-engine you use etc), like vertexes, indexes and geometry which take variable amount of space. You should reserve some VRAM for those, maybe 5-10 megs...

I believe the requirements for a model can be worked out as a 2 bytes (FP16) for each coordinate of the vertex, plus the same for normals, which should put it at 12 bytes per vertex. Using vertex colour probably adds 4 bytes onto that. however, these shouldn't need to all fit into VRAM. The system RAM<>VRAM bus (AGP or PCI-E) carries over traffic for anything needed by the GPU but not present in VRAM, such as textures and vertex info. The CPU feeds the GPU vertex lists over this connection and I don't think that data needs to be cached on the VRAM, though of course if you have enough VRAM to fit everything you'd potentially get a super speed boost. Except for the work the CPU is doing such as transforming vertices as part of an animation. In those cases you'll either be CPU bound or GPU bus bound I think.

So for optimum performance, the more VRAM the better, but to determine the *bare minimum requirements*, I don't think much more than the buffers are needed with a little spare to fit textures.


Mustang(Posted 2006) [#8]
Yeah, of course DirectX will manage the swapping of geo ja tex data over the AGP/PCIE bus... bare minimum would be the screen buffers then I guess.


smilertoo(Posted 2006) [#9]
i'd consider 32mb the minimum for any 3d.