Archived

This topic is now archived and is closed to further replies.

nitzan

VAR memory allocation question

Recommended Posts

Can I call wglAllocateMemoryNV more then once ? Or do I have to allocate one big chunk of memory and do my own memory management ? Nitzan ------------------------- www.geocities.com/nitzanw www.scorchedearth3d.net -------------------------

Share this post


Link to post
Share on other sites
Hmm, I was thinking of something. You always have to choose between either allocating video memory or AGP memory, but not both. If you want to use both, you''d need 2 VAR chunks and you''d need to switch the vertex range in the middle of the frame (using glVertexArrayRangeNV()). And that''s very slow.

Does anyone know of a way to use both VidMem and AGP memory in a single frame without needing to flush the range ? Is it even possible on the NV20/25, or are there hardware limitations ?

/ Yann

Share this post


Link to post
Share on other sites
As far as I know, the vertex_array_range2 extension eliminates this speed loss when switching from VAR''s to normal vertex arrays, so it may also reduce or eliminate the speed loss of switching different VARs. I''m not sure, but I suggest you look the second version of the extension up in the registry.

Death of one is a tragedy, death of a million is just a statistic.

Share this post


Link to post
Share on other sites
python_regious, you say "should" rather then "cant". So whats the reasoning against allocating several chunks of memory ?

I am loading many models, and it would be alot easier if I can allocate one chunk for each one.

Nitzan

-------------------------
www.geocities.com/nitzanw
www.scorchedearth3d.net
-------------------------

Share this post


Link to post
Share on other sites
The reasoning is that switching ranges (ie. switching between several different chunks of memory in a single frame) is *extremely* slow. Multiple ranges should be avoided at all costs. Ignoring that will lead to (quoting nVidia) ''terrible performance problems''.

python: I reread the specs of the vertex_array_range2 extension (I never used it before), but it only seems to apply to VAR/standard VA mixing. Would have been cool, if it was for two ranges, you could put static stuff in VidMem and dynamic stuff in AGP. Perhaps for the GF5

/ Yann

Share this post


Link to post
Share on other sites