Sign in to follow this  

Deadlock in the D3D10 reference driver?

Recommended Posts

I'm trying to start learning D3D10, but I don't have a Windows Vista physical machine available. So I decided to try running Vista under VMWare Workstation with the reference driver. I'm using Frank Luna's D3D10 book. I appear to get stuck in a deadlock in the D3D Reference Driver code, with a callstack of the following: ntdll.dll!_KiFastSystemCallRet@0() ntdll.dll!_ZwWaitForMultipleObjects@20() + 0xc bytes kernel32.dll!_WaitForMultipleObjectsEx@20() - 0x51 bytes kernel32.dll!_WaitForMultipleObjects@16() + 0x18 bytes D3D10Ref.DLL!KMDevice::WaitFor<KMContext::AvailableDMABuffer>() + 0x5d bytes D3D10Ref.DLL!KMContext::Render() + 0x1f1 bytes D3D10Ref.DLL!_D3DKMTRender@4() + 0x47 bytes dxgi.dll!CD3D10Device::RenderCB() + 0x113 bytes D3D10Ref.DLL!UMDevice::SubmitRenderData() + 0xaf bytes D3D10Ref.DLL!UMDevice::ReserveRenderData() + 0x33 bytes D3D10Ref.DLL!UMDevice::ClearRenderTargetView_Default() + 0x1e bytes d3d10core.dll!CDevice::ID3D10Device_ClearRenderTargetView_() + 0xb7 bytes This happens as you can see when I call ClearRenderTargetView. Strangely it appears to be stuck waiting for a DMA buffer. This is on the main application thread, and the other thread (which appears to have been created by the Direct3D Runtime, even though I selected D3D10_CREATE_DEVICE_SINGLETHREADED), has a callstack of the following: > D3D10Ref.DLL!CHWDevice::ExecClearDepthStencilView() + 0x99 bytes D3D10Ref.DLL!CHWDevice::ExecuteDMAStream() + 0x2bb bytes D3D10Ref.DLL!CHWDevice::ThreadProc() + 0x4e bytes msvcrt.dll!__endthreadex() - 0x2b bytes msvcrt.dll!__endthreadex() + 0xf2 bytes kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes Should I just chalk this one up to VMWare, and forget about learning d3d10 until I get a physical box with Vista on it? Or has anyone ever seen something like this before and perhaps I'm just doing something stupid? For reference, my draw function looks like this: device_->ClearRenderTargetView(renderTargetView_, background_); device_->ClearDepthStencilView(depthStencilView_, D3D10_CLEAR_DEPTH|D3D10_CLEAR_STENCIL, 1.0f, 0); It almost looks like the second call queues asynchronously to a worker thread and can't complete, so the next time around through the loop the first call deadlocks waiting for it to complete.

Share this post

Link to post
Share on other sites

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