Archived

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

More Fun with Voodoo Cards

This topic is 5668 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi gang, Once again, those dratted Voodoo cards are rearing their ugly heads. I''m really beginning to hate those things. Our game uses DX8.0, and is currently being tested by a couple of dozen people. One of them has an old Voodoo3 AGP card. On all other cards, the game works fine. On this card, however, there is a problem. The game gets about three quarters of the way through initialization, and then starts failing with E_OUTOFMEMORY errors. The error logs show that it flails on a couple more calls, and then crashes to the desktop (according to the tester). Now, the user has 128 megs of RAM, which is plenty. He has 16 megs on the video card. All of my textures are made using D3DPOOL_MANAGED, so they *should* drop to system memory when not needed (right?). The first call that fails is a CreateImageSurface() call, which is supposed to create a surface in system memory. Since there is no way we are using up 128 megs of system memory data (not to mention the entire swap file), the only thing I can think of is that the voodoo card driver is forcing all surfaces onto that 16 megs, which is certainly not enough memory to hold all my textures. This CreateImageSurface() call that fails is not the first the program uses. Several others are made before this one using the exact same parameters, and apparently they work fine, which supports the conclusion that there is indeed a memory problem here. Has anyone seen this before? Is there some workaround? Suggestions? Thanks, Ron

Share this post


Link to post
Share on other sites
This is the problem with supporting old hardware. You will not be able to make a game designed for a GeForce 3 look the same as on a Voodoo3. How many other 16MB-no-AGP cards did you test?

Better texture management might save you, alternately, shrink the textures when you''re loading on a 16MB card.

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
I just tried a sample DirectDraw program on a voodoo 3, and the funniest thing happened. If I asked it to wait for the retrace, it didn''t. And if I didn''t ask for it to wait, it did. How strange is that? I tried to find any options that may have been set for the card outside of the DirectX domain, and I couldn''t (sometimes in advanced properties, there are settings that force a wait for retrace no matter what the application asks). I thought this was very strange...

Has anyone else found odd things like this on the voodoo cards?


Jason Doucette
http://www.jasondoucette.com/

Share this post


Link to post
Share on other sites
do any of the CreateImageSurface() calls work? how much memory are you requesting in total? why not post a small list of all the texture and surface sizes and format. as wel as the very first all which returns an error.

btw, your app crashing is of your own doing by not gracfully handling the errors.

D3DPOOL_MANAGED textures will be in system memory regardless if they are being used in vram. check your virtual memory settings as well as disk space. you could be using more memory then you realize.

i think you are just dealing with what you are trying to do in the wrong fashion. why do you need ImageSurfaces?

Share this post


Link to post
Share on other sites
A lot of questions

quote:
Original post by a person
do any of the CreateImageSurface() calls work?


Yes, several. It failed on the fifth or sixth call to CIS(). I mentioned that in my post. And they *all* work on any card that is using 32 bit texture modes.

quote:

how much memory are you requesting in total?


Depends on the texture format being used, which is not always the same from system to system. It picks the best hardware accelerated format available. Assuming a 32 bit mode, I think we''re up to around 20 megs so far, but I could be off.

quote:

why not post a small list of all the texture and surface sizes and format. as wel as the very first all which returns an error.


Not possible, too large a list, not to mention the texture formats are variable. Hell, some of the sizes of the textures are varaible as well (esp the fonts). This isn''t Tetris we''re talking about here, this is a pretty large program with a lot of graphics

quote:

btw, your app crashing is of your own doing by not gracfully handling the errors.


I handle most of them quite well, thanks. I have a pretty sophisticated error logging system in place which runs in a seperate thread from the program. This log writes to text files, so when my testers encounter a problem, they simply send me the log and I can always tell exactly where the problem occured, and usually (but not always) why. If it crashes to the desktop without making an entry into the error log, then something *really* went wrong That doesn''t, in general, happen though (much). Could it be improved? Sure. But it works well enough for now.

quote:

i think you are just dealing with what you are trying to do in the wrong fashion. why do you need ImageSurfaces?

What an odd thing to say. Actually, I *think* I''m dealing with them in a very smart fasion. I have graphics that are >256x256 in size that I need to load. Because of some of the older cards (esp Voodoo), which max out at 256x256, I use CreateImageSurface() to make a temporary system memory surface, load the graphic, cut it up into some number of 256x256 textures, then release the surface. Is there some other method that you use to accomplish this task?

I actually found the problem, and it was nothing y''all could have helped me with. Turned out to be a dumb memory overwriting problem caused by the fact that 16 bit textures have only 2 bytes per pixel rather than 4 I fixed it, and sent it off to the guy with the old Voodoo card, and he reported it worked fine.

So, thanks for the suggestions. Just one of those silly mistakes I had to work out on my own.

Ron

Share this post


Link to post
Share on other sites