Sign in to follow this  

DirectX 9 Device Creation Failing

This topic is 1983 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

A client is having some issues trying to run our app on a Windows XP machine, wherein the device creation process is repeatedly failing. I don't have access to the computer yet so I know nothing about the hardware specs other than that they said, "The graphics card is rather new". I'm a little skeptical but that's a different problem [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]

They sent me a log and the error messages they're getting look like this:

[CODE]
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
Direct3D9: (WARN) :driver set D3DDEVCAPS_TEXTURENONLOCALVIDMEM w/o DDCAPS2_NONLOCALVIDMEM:turning off D3DDEVCAPS_TEXTURENONLOCALVIDMEM
D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO
Direct3D9: (WARN) :driver set D3DDEVCAPS_TEXTURENONLOCALVIDMEM w/o DDCAPS2_NONLOCALVIDMEM:turning off D3DDEVCAPS_TEXTURENONLOCALVIDMEM
Direct3D9: (ERROR) :Device cannot perform hardware processing. ValidateCreateDevice failed.
Direct3D9: (WARN) :driver set D3DDEVCAPS_TEXTURENONLOCALVIDMEM w/o DDCAPS2_NONLOCALVIDMEM:turning off D3DDEVCAPS_TEXTURENONLOCALVIDMEM
Direct3D9: (WARN) :driver set D3DDEVCAPS_TEXTURENONLOCALVIDMEM w/o DDCAPS2_NONLOCALVIDMEM:turning off D3DDEVCAPS_TEXTURENONLOCALVIDMEM

Direct3D9: (INFO) :======================= Hal SWVP device selected
Direct3D9: (INFO) :HalDevice Driver Style 8
Direct3D9: (ERROR) :Failed to create driver surface
Direct3D9: (ERROR) :Failed to initialize primary swapchain
Direct3D9: (ERROR) :Failed to initialize Framework Device. CreateDevice Failed.
[/CODE]

Now I've been looking into the problem for a whlie and I can't seem to find any solid conclusions as to what is causing the problem. The device creation is indeed first trying to create with the D3DCREATE_HARDWARE_VERTEXPROCESSING, and then if that fails it's changing it to D3DCREATE_SOFTWARE_VERTEXPROCESSING and trying again, or at least it should be.

So can anyone shine some light on this problem? Is this just purely a hardware thing? I'll know more once I get a chance to check out the machine but for now I'm just trying to draw some conclusions so I know what to test out.

Share this post


Link to post
Share on other sites
How are you initializing your present parameters? My gut feeling is that there's something in there - a format or similar - that the driver is unhappy with. If you could post the code where you set these up, it will help with diagnosing this.

Share this post


Link to post
Share on other sites
Sure thing. I'm just going to post the parameters being used though since a lot of the initialization stuff is engine code I really shouldn't be posting. Taken directly from the watch window in VC9.

[CODE]
BackBufferWidth 3862
BackBufferHeight 1222
BackBufferFormat D3DFMT_X8R8G8B8
BackBufferCount 1
MultiSampleType D3DMULTISAMPLE_NONMASKABLE
MultiSampleQuality 2
SwapEffect D3DSWAPEFFECT_DISCARD
hDeviceWindow 0x000201c2 {unused=0 }
Windowed 1
EnableAutoDepthStencil 1
AutoDepthStencilFormat D3DFMT_D16
Flags 0
FullScreen_RefreshRateInHz 0
PresentationInterval 2147483648
[/CODE]

Though these are just the values I'm getting on my system. I can't really know what they are getting, but I don't see any reason it would be different.

I want to remind you also that this is only happening on their computers. We have plenty of other computers running Windows XP and Windows 7 and none of them have issues. So it has to be some hardware limitation but I don't really know where to look for something like that since I'm not really a harware guru or anything.

Also of note is that I thought it might be the AutoDepthStencilFormat, but I already added error checking before setting the value that queries the device via CheckDeviceFormat and CheckDepthStencilMatch to make damn sure it's supported and that isn't failing on their system. Unless my error checking function is broken somehow. I copied it directly from MSDN though:

[CODE]
iTruth mIsDepthFormatSupported(D3DFORMAT adapterFormat, D3DFORMAT renderTargetFormat, D3DFORMAT depthStencilFormat)
{
iTruth result = kFalse;

if (f_pD3D == NULL)
{
f_pD3D = Direct3DCreate9(D3D_SDK_VERSION);
}

if (f_pD3D != NULL)
{
// Verify that the depth format exists.
HRESULT hr = f_pD3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, adapterFormat, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, depthStencilFormat);

if (SUCCEEDED(hr))
{
// Verify that the depth format is compatible.
hr = f_pD3D->CheckDepthStencilMatch(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, adapterFormat, renderTargetFormat, depthStencilFormat);

result = SUCCEEDED(hr);
}
}
return result;
}
[/CODE]

P.S. In case you're wondering about the massive backbuffer size, it's because I have rather large dual monitors and our engine is creating the buffer to fill the entire space in order to avoid having to recreate it every time the window gets resized. Edited by Shenjoku

Share this post


Link to post
Share on other sites

This topic is 1983 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this