PIX Debugging Question / Tips
by Jay Verba · in Torque Game Engine Advanced · 05/28/2008 (6:30 pm) · 4 replies
Just started getting my feet wet with the PIX debugging tool, it is super sweet as many have pointed out here in the past.
Anyway, I was utilizing it to do some performance research, I suspected we had some weird texture memory issues and I was curious as to what is going on, I found ~560 alive textures in one frame, check out this inspection shot

I see roughly 530 (i didn't count them so say 30 are actual textures we are using... so 500 textures is still over 100mb of texture ram) 256x256 textures of "garbage" data like what you see in the image above, they appear to be mostly random data. I know we have some 256x256 textures but a good portion of them are trash like you see above. Am I actually wasting memory somewhere? Is there a way to track down whats wasting all this memory?
Anyway, I was utilizing it to do some performance research, I suspected we had some weird texture memory issues and I was curious as to what is going on, I found ~560 alive textures in one frame, check out this inspection shot

I see roughly 530 (i didn't count them so say 30 are actual textures we are using... so 500 textures is still over 100mb of texture ram) 256x256 textures of "garbage" data like what you see in the image above, they appear to be mostly random data. I know we have some 256x256 textures but a good portion of them are trash like you see above. Am I actually wasting memory somewhere? Is there a way to track down whats wasting all this memory?
#2
If your not using DDS then you must have some code which is creating textures and not releasing them when its done.
Try taking snapshots in Pix at different times... like 20 seconds in the game... 40 seconds... 100 seconds. Then check to see if the texture count keeps going up.
If thats happening try putting a breakpoint in GFXTextureManager::createTexture() and see who might be calling it over and over once the game is running.
05/28/2008 (10:50 pm)
What version of TGEA are you using? There use to be a bug would load the same DDS texture on each request instead of using the cached one.If your not using DDS then you must have some code which is creating textures and not releasing them when its done.
Try taking snapshots in Pix at different times... like 20 seconds in the game... 40 seconds... 100 seconds. Then check to see if the texture count keeps going up.
If thats happening try putting a breakpoint in GFXTextureManager::createTexture() and see who might be calling it over and over once the game is running.
#3
I'll throw the breakpoints in and see what happens, performance is totally crushed (~1-2 fps) if I look at a lot of objects in our scene, that and the texture count goes from 80 - 600+ almost instantly, and stays there as well.
I'll report back more later today with progress.
05/29/2008 (6:47 am)
I am using 1.7. I'll throw the breakpoints in and see what happens, performance is totally crushed (~1-2 fps) if I look at a lot of objects in our scene, that and the texture count goes from 80 - 600+ almost instantly, and stays there as well.
I'll report back more later today with progress.
#4
05/29/2008 (9:00 am)
We had a malformed DIF with missing textures that was quintupling our texture usage and using 600+mb of system memory.
Torque Owner Jeremiah Fulbright