JeremyAtGosub

I've had several computers fail to create the DirectX device in full screen mode because of an "out of video memory" error. In two cases, the cards have 128Mb, and I'm sure it's not using even close to that much video memory (front buffer + 2 back buffers = 3*1440*900*4 = 14.8Mb (not even close to 128Mb).

On one computer, I was able to solve the problem by lowering the DirectX quality settings from the control panel. On the other computer, that didn't solve the problem. I'm sure my program isn't requesting high quality settings (MultiSample = none, MultiSampleQuality = 0).

Does anyone have any idea of why this would happen, or what I can do to fix the problem

Thank you,

Jeremy



Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

BLANC Guillaume

Did you try using the Direct3D debug runtime to get more details infomations Once activated, it should write in the debug output some resons about the error you're encountering.





Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

Ralf Kornmann

DirectX error message could be sometime misleading.

From your calculation I can see that you are using an uncommon screen resolution. Is this just an example or do you always try to use this size In any case you should check if the card supports this resolution before you create the device.






Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

JeremyAtGosub

Blanc - The debug output is: A first chance exception of type 'Microsoft.DirectX.Direct3D.OutOfVideoMemoryException' occurred in Microsoft.DirectX.Direct3D.dll

Ralf - I'm using the desktop resolution on this computer, which is 1440x900. It works on my laptop at 1680x1050.

BTW, The BasicHLSL (managed) example also fails to go to full screen mode. It throws the same error.

-Jeremy




Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

Ralf Kornmann

As you use a managed language you need to activate unmanaged debugging or use an external debug monitor to get the messages from the debug runtime.






Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

JeremyAtGosub

How do I do that Through the DirectX control panel, or through Visual C# Express Is that going to tell us anything we don't already know, considering I'm using the debug DirectX runtime, and it's giving us D3DERR_OUTOFVIDEOMEMORY

-Jeremy





Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

Ralf Kornmann

Normally the debug runtime generates additional information that is written to the output window. It should give us a hint why it generates an out of memory error.

Unmanaged debugging need to be selected in the project settings.






Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

BLANC Guillaume

JeremyAtGosub wrote:
Is that going to tell us anything we don't already know, considering I'm using the debug DirectX runtime, and it's giving us D3DERR_OUTOFVIDEOMEMORY

D3DERR_OUTOFVIDEOMEMORY is a return value that is not dependent on the selected runtime. This means that you can use this returned value in the retail version of your code which is sometime very important to test and handle. Try and see if it tells you more than what you already know, at least you'll waste 2 minutes..

I usualy use the directx control panel to select debug runtime and debugging levels for my unmanaged developments .






Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

JeremyAtGosub

Ralph,

C# Express doesn't allow unmanaged debugging. I'm downloading the trial version of Visual Studio, and will see if managed debugging gives us more info.

For now, I've found two different fall back methods that work. 1) Windowed mode, but make the target control full screen. 2) Use full screen mode with a BackBufferCount of 1 (instead of two). Neither method is optimal because fullscreen and a BackBufferCount of 2 gives much smoother animation.

Still, this shouldn't be happening. And the DirectX examples fail for the same reason when going to full screen mode, so it should be easy for anyone with the same hardware configuration to reproduce. FYI, it's a GeForce 6200 LE with 128Mb of video memory, and the desktop resolution is 1440x900. Maybe it's a driver problem.

-Jeremy




Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

JeremyAtGosub

Ok, I got Visual Studio (trial), enabled unmanaged debugging, and used the debug version of DirectX. Here's what I got:


Direct3D9: (INFO) :======================= Hal HWVP Pure device selected

Direct3D9: (INFO) :HalDevice Driver Style 9

Direct3D9: :Subclassing window 00070c86
Direct3D9: :StartExclusiveMode
Direct3D9: (ERROR) :Failed to create driver primary surface chain
Direct3D9: (ERROR) :Failed to initialize primary swapchain
Direct3D9: (ERROR) :Failed to initialize Framework Device. CreateDevice Failed.

Direct3D9: :DoneExclusiveMode
Direct3D9: :INACTIVE: 0000179c: Restoring original mode (1440x900x22x60) at adapter index 0
Direct3D9: :Unsubclassing window 00070c86
A first chance exception of type 'Microsoft.DirectX.Direct3D.OutOfVideoMemoryException' occurred in Microsoft.DirectX.Direct3D.dll
The thread 'Win32 Thread' (0x1430) has exited with code 0 (0x0).





Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

JeremyAtGosub

And since the BasicHLSL example also fails, I thought I'd post the debug output for that also:

Direct3D9: :Subclassing window 00020f7c
Direct3D9: :StartExclusiveMode
Direct3D9: (ERROR) :Failed to create driver primary surface chain
Direct3D9: (ERROR) :Reset failed and Reset/TestCooperativeLevel/Release are the only legal APIs to be called subsequently
Direct3D9: :DoneExclusiveMode
Direct3D9: :INACTIVE: 000014b0: Restoring original mode (1440x900x22x60) at adapter index 0
Direct3D9: :Unsubclassing window 00020f7c
A first chance exception of type 'Microsoft.DirectX.Direct3D.OutOfVideoMemoryException' occurred in Microsoft.DirectX.Direct3D.dll
A first chance exception of type 'Microsoft.DirectX.Direct3D.OutOfVideoMemoryException' occurred in BasicHLSL.exe

... And then it repeats a bunch of times.




Re: Game Technologies: Graphics Out of video memory when I have plenty (128Mb)

BLANC Guillaume

The debug output tells that the creation of the device full screen swap chain has failed. It then try to reset the device to recreate the swapchain and fails again and again. So even if it seems that there's enought memory to store your buffers, you could try some other buffer sizes and formats (also for Z buffer) that are compatible with IDirect3D9::EnumAdapterModes, IDirect3D9::CheckDeviceFormat and IDirect3D9::CheckDepthStencilMatch functions returns.

The 16:10 resolution you're speaking about is indeed not very common. The driver might report it has handled and finally does not.
Also you've said that you where using a GeForce 6200 LE that I think is using TurboCache, isn't it This technology is balancing video memory and main memory which is probably quite complex. A bug in the driver around that memory managements algorithms could probably produce your issue.

As DirectX sample is also failing, you could try to report your issue to NVidia, and see...