DirectX and memory usage

Hi there!

I'm trying to learn DirectX 10, and now I've just managed to draw an image to the screen(Woohoo!). When I look at Windows Task Manager, my program is using 35MB of memory, and I thought that was a bit much for just drawing one image.

So is this normal or have I done something wrong? My program is running at 2800+ FPS in 1920x1080 resolution so I though maybe it's because I havn't limited the FPS?


The image is 1920x1200 and 1,30MB large BTW.
If it's a debug build, that number is meaningless. Don't try to measure performance or memory usage unless optimizations are turned on and debugging symbols are stripped (ie: Release build)

The FPS will have no impact on system memory usage. Neither would texture size (assuming the textures are stored in video memory - not system memory).
closed account (zb0S216C)
How many back-buffers does your swap chain have? Multiple BBs can cause excessive memory usage. Also, the size of your monitor (which is the same size as mine) can also contribute to the overall memory usage of your program.

Wazzak
Last edited on
Wouldn't back buffers have to be in video memory? I thought task manager only showed system memory usage.
closed account (zb0S216C)
Surfaces can appear in either graphics memory or system memory. It really depends on what Direct3D sees most fit. It's common sense, really: If there's not enough graphics memory or back-buffer is too larger, use the system memory.

Wazzak
Last edited on
I guess -- it just seems unlikely that D3D would put a back buffer in system memory unless you were totally out of video mem.

If it's in system mem then drawing would have to go back and forth over the bus a few times which would destroy performance.
closed account (zb0S216C)
It's possible, but a theory means nothing unless proven, I guess. Still, we could be scratching our heads for days unless Kuzco provides more details regarding how Direct3D is setup in his/her application.

Wazzak
Diagnosing basic problems with DirectX

If you're having problems getting a game or movie to play properly, the DirectX Diagnostic Tool can help you pinpoint the source. DirectX is a suite of technologies used by many of the multimedia programs in Windows.

*Open DirectX Diagnostic Tool by clicking the Start button Picture of the Start button, typing dxdiag in the search box, and then pressing Enter.


If this is the first time you’ve used the DirectX Diagnostic Tool, you might be asked whether you want to check if your drivers are digitally signed. We recommend you click Yes to ensure that your drivers have been signed by a publisher that has verified their authenticity. For more information, see How can I decide which drivers are safe to install?
What to look for

Once the Diagnostic Tool has finished, here are three key things to check:

*Check your video card.

Some programs run very slowly—or not at all—unless Microsoft DirectDraw or Direct3D hardware acceleration is turned on.

To determine this, click the Display tab, and then under DirectX Features, check to see whether DirectDraw, Direct3D, and AGP Texture Acceleration appear as Enabled. If not, try turning on hardware acceleration.
1.Open Screen Resolution by clicking the Start button Picture of the Start button, clicking Control Panel, and then, under Appearance and Personalization, clicking Adjust screen resolution.
2.Click Advanced settings.
3.Click the Troubleshoot tab, and then click Change settings. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
4.Move the Hardware Acceleration slider to Full.

If that fails, you might need to update the video driver or the card, itself. You can typically find the latest drivers for your hardware in the support section of the manufacturer's website.
*Check your game controller.

If a joystick or other input device fails to respond, it might not be installed correctly.

Make sure the device shows up on the Input tab. If not, reinstall the device according to the manufacturer's instructions. If it's a USB device, unplug it and then plug it back in.
*Check for "unsigned" drivers.

A driver that's been digitally signed has been tested by the Microsoft Windows Hardware Quality Lab for DirectX compatibility.

If the Diagnostic Tool flags an unsigned driver, updating the driver might solve your problem. You can typically find the latest driver for your hardware on the support section of the manufacturer's website.

Other things to check

If you're still having problems with a game or movie after running the DirectX Diagnostic Tool, there are a couple of other things you can check.

*Check the display mode of your application or game.

When a DirectX 9 application goes to full-screen mode, the resolution of the application might not match the native resolution of your LCD monitor, the resolution your monitor was designed to display based on its size. If you see black bands on the tops or sides of your screen where a portion isn't used, you can try scaling the full-screen image. If your application or game allows you to choose the display mode, you might be able to change the application or game settings and choose a mode that matches the native resolution of your LCD monitor. This will help you use all of the screen and still preserve the application’s intended resolution.
*Check the version of DirectX that your application or game requires.

Some applications and games require DirectX 9. However, Windows 7 is installed with a more recent version of DirectX. If you install an application or game that requires DirectX 9, you might receive an error message, such as: "The program can't start because d3dx9_35.dll is missing from your computer. Try reinstalling the program to fix this problem." The last two digits of the file name might vary. If you receive the same error message after reinstalling the application or game, go to the DirectX End-User Runtime Web Installer webpage and follow the instructions to install DirectX 9 and receive updates to DirectX 9 and previous versions of DirectX.


http://www.techyv.com/questions/directx-11-issue-and-wpf-interloping
Topic archived. No new replies allowed.