Closed Bug 623807 Opened 14 years ago Closed 14 years ago

GDI compatible swap chains break optimus

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b9
Tracking Status
blocking2.0 --- beta9+

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Details

Attachments

(1 file)

For bug 613790 we introduced the GDI compatible swap chain flag for our swap chain creation in order to work around an NVidia driver bug. It seems however that this change is causing problems on optimus graphics hardware which seems to have internal issues. I'm investigating if there's some middle ground we can find to work in both systems.
So this looks very much like another driver issue. The stack of one of the device removals looks as follows. KernelBase.dll!_RaiseException@16() + 0x58 bytes D3D10SDKLayers.DLL!CInfoQueue::AddMessage() + 0x523 bytes D3D10SDKLayers.DLL!NDebug::CDevice::ReportMessage() + 0x96 bytes D3D10SDKLayers.DLL!NDebug::CDevice::RemoveDevice() + 0xb3 bytes dxgi.dll!CD3D10Device::RemoveDevice() + 0xb7 bytes d3d10_1core.dll!CDevice::UMSetError_() + 0x6b bytes nvumdshim.dll!73d79bb8() [Frames below may be incorrect and/or missing, no symbols loaded for nvumdshim.dll] nvumdshim.dll!73d80401() nvumdshim.dll!73d83772() nvumdshim.dll!73d672d1() nvwgf2um.dll!7342f06e() nvwgf2um.dll!7341c05d() nvumdshim.dll!73d7e1b6() nvumdshim.dll!73d81fc4() nvumdshim.dll!73d7a7a9() nvumdshim.dll!73d7a473() nvumdshim.dll!73d7b1a1() nvumdshim.dll!73d7ed44() d3d10_1core.dll!CBaseResource<ID3D10Texture1D,0>::FinalRelease() + 0x4c bytes d3d10_1core.dll!CLayeredObject<CTexture2D<2> >::~CLayeredObject<CTexture2D<2> >() + 0x13 bytes d3d10_1core.dll!CLayeredObject<CTexture2D<2> >::`scalar deleting destructor'() + 0xd bytes d3d10_1core.dll!CLayeredObject<CElementLayout>::Release() + 0xf bytes dxgi.dll!CD3D10DeviceChild<IDXGISurface>::~CD3D10DeviceChild<IDXGISurface>() + 0xd bytes dxgi.dll!CLayeredObject<CD3D10Resource>::~CLayeredObject<CD3D10Resource>() + 0x2e bytes dxgi.dll!CLayeredObject<CD3D10Resource>::`scalar deleting destructor'() + 0xd bytes dxgi.dll!CLayeredObject<CRemoteBuffer>::Release() + 0xf bytes D3D10SDKLayers.DLL!ATL::AtlComPtrAssign() + 0x2b bytes D3D10SDKLayers.DLL!ATL::CComPtr<IDXGILayeredDevice>::operator=() + 0x15 bytes D3D10SDKLayers.DLL!CD3D10LayeredChild<ID3D10Texture3D,NSwitchToRef::CDevice,48>::FinalRelease() + 0xf bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CTexture2D>::~CLayeredObject<NDebug::CTexture2D>() + 0x13 bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CTexture2D>::`scalar deleting destructor'() + 0xd bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CPreMTPixelShader>::Release() + 0xf bytes d3d10_1core.dll!ATL::AtlComPtrAssign() + 0x2b bytes d3d10_1core.dll!ATL::CComPtr<ILayeredUseCounted>::operator=() + 0x15 bytes d3d10_1core.dll!CD3D10LayeredChild<ID3D10RasterizerState,NMultithread::CDevice,16>::FinalRelease() + 0xf bytes d3d10_1core.dll!CLayeredObject<NMultithread::CTexture2D>::~CLayeredObject<NMultithread::CTexture2D>() + 0x13 bytes d3d10_1core.dll!CLayeredObject<NMultithread::CTexture2D>::`scalar deleting destructor'() + 0xd bytes d3d10_1core.dll!CLayeredObject<CElementLayout>::Release() + 0xf bytes D3D10SDKLayers.DLL!ATL::AtlComPtrAssign() + 0x2b bytes D3D10SDKLayers.DLL!ATL::CComPtr<IDXGILayeredDevice>::operator=() + 0x15 bytes D3D10SDKLayers.DLL!CD3D10LayeredChild<ID3D10Texture3D,NSwitchToRef::CDevice,48>::FinalRelease() + 0xf bytes D3D10SDKLayers.DLL!NDebug::CPreMTDeviceChild<ID3D10Query>::FinalRelease() + 0xa bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CPreMTTexture2D>::~CLayeredObject<NDebug::CPreMTTexture2D>() + 0x13 bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CPreMTTexture2D>::`vector deleting destructor'() + 0xd bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CPreMTPixelShader>::Release() + 0xf bytes dxgi.dll!ATL::AtlComPtrAssign() + 0x29 bytes dxgi.dll!ATL::CComPtr<ILayeredUseCounted>::operator=() + 0x15 bytes dxgi.dll!NOutermost::CDeviceChild::FinalRelease() + 0x15 bytes dxgi.dll!CDelegatingUseCountedObject<NOutermost::CDeviceChild>::~CDelegatingUseCountedObject<NOutermost::CDeviceChild>() + 0x20 bytes dxgi.dll!CDelegatingUseCountedObject<NOutermost::CDeviceChild>::`scalar deleting destructor'() + 0xd bytes dxgi.dll!CUseCountedObject<NOutermost::CDeviceChild>::Delete() + 0x12 bytes dxgi.dll!CDXGISwapChainBase<IDXGISwapChainDWM>::DestroyOwnedBuffer() + 0x2d bytes dxgi.dll!CDXGISwapChainBase<IDXGISwapChainDWM>::DestroyBackBuffers() + 0x2a bytes dxgi.dll!CDXGISwapChainBase<IDXGISwapChain>::FinalRelease() + 0x2b bytes dxgi.dll!CMTUseCountedObject<CDXGISwapChain>::~CMTUseCountedObject<CDXGISwapChain>() + 0x32 bytes dxgi.dll!CMTUseCountedObject<CDXGISwapChain>::`scalar deleting destructor'() + 0xd bytes dxgi.dll!CMTUseCountedObject<CDXGISwapChain>::Delete() + 0x12 bytes dxgi.dll!CMTUseCountedObject<CDXGISwapChain>::UCReleaseUse() - 0x7 bytes dxgi.dll!CPublicUseCountWatcher::UCReleaseUse() + 0x3f bytes dxgi.dll!CDelegatingUseCountedObject<NOutermost::CDeviceChild>::UCReleaseUse() + 0x11 bytes d3d10_1core.dll!CView<ID3D10RenderTargetView>::FinalRelease() + 0x20 bytes d3d10_1core.dll!CLayeredObject<CRenderTargetView>::~CLayeredObject<CRenderTargetView>() + 0x13 bytes d3d10_1core.dll!CLayeredObject<CRenderTargetView>::`scalar deleting destructor'() + 0xd bytes d3d10_1core.dll!CLayeredObject<CElementLayout>::Release() + 0xf bytes D3D10SDKLayers.DLL!ATL::AtlComPtrAssign() + 0x2b bytes D3D10SDKLayers.DLL!ATL::CComPtr<IDXGILayeredDevice>::operator=() + 0x15 bytes D3D10SDKLayers.DLL!CD3D10LayeredChild<ID3D10Texture3D,NSwitchToRef::CDevice,48>::FinalRelease() + 0xf bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CRenderTargetView>::~CLayeredObject<NDebug::CRenderTargetView>() + 0x13 bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CRenderTargetView>::`vector deleting destructor'() + 0xd bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CPreMTPixelShader>::Release() + 0xf bytes d3d10_1core.dll!ATL::AtlComPtrAssign() + 0x2b bytes d3d10_1core.dll!ATL::CComPtr<ILayeredUseCounted>::operator=() + 0x15 bytes d3d10_1core.dll!CD3D10LayeredChild<ID3D10RasterizerState,NMultithread::CDevice,16>::FinalRelease() + 0xf bytes d3d10_1core.dll!CLayeredObject<NMultithread::CRenderTargetView>::~CLayeredObject<NMultithread::CRenderTargetView>() + 0x13 bytes d3d10_1core.dll!CLayeredObject<NMultithread::CRenderTargetView>::`vector deleting destructor'() + 0xd bytes d3d10_1core.dll!CLayeredObject<CElementLayout>::Release() + 0xf bytes D3D10SDKLayers.DLL!ATL::AtlComPtrAssign() + 0x2b bytes D3D10SDKLayers.DLL!ATL::CComPtr<IDXGILayeredDevice>::operator=() + 0x15 bytes D3D10SDKLayers.DLL!CD3D10LayeredChild<ID3D10Texture3D,NSwitchToRef::CDevice,48>::FinalRelease() + 0xf bytes D3D10SDKLayers.DLL!NDebug::CPreMTDeviceChild<ID3D10Query>::FinalRelease() + 0xa bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CPreMTRenderTargetView>::~CLayeredObject<NDebug::CPreMTRenderTargetView>() + 0x13 bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CPreMTRenderTargetView>::`scalar deleting destructor'() + 0xd bytes D3D10SDKLayers.DLL!CLayeredObject<NDebug::CPreMTPixelShader>::Release() + 0xf bytes dxgi.dll!ATL::AtlComPtrAssign() + 0x29 bytes dxgi.dll!ATL::CComPtr<ILayeredUseCounted>::operator=() + 0x15 bytes dxgi.dll!NOutermost::CDeviceChild::FinalRelease() + 0x15 bytes dxgi.dll!CUseCountedObject<NOutermost::CDeviceChild>::~CUseCountedObject<NOutermost::CDeviceChild>() + 0x2b bytes dxgi.dll!CUseCountedObject<NOutermost::CDeviceChild>::`vector deleting destructor'() + 0xd bytes dxgi.dll!CUseCountedObject<NOutermost::CDeviceChild>::Delete() + 0x12 bytes dxgi.dll!CUseCountedObject<NOutermost::CDeviceChild>::Release() + 0x89b bytes > D3D10SDKLayers.DLL!CLayeredObject<NDebug::CGeometryShader>::CContainedObject::Release() + 0x11 bytes xul.dll!nsRefPtr<nsNodeInfo>::~nsRefPtr<nsNodeInfo>() + 0xf9958 bytes C++ xul.dll!nsXULWindow::Destroy() Line 556 C++ This appears to be doing a perfectly valid resource deallocation until it hits the optimus DLL (nvumdshim.dll) and then it bounces through the normal NVidia driver DLL and then ends up in a device removal.
Status: NEW → ASSIGNED
This will avoid using the flag on optimus devices by looking for the optimus DLL being loaded by our process. This should function as a temporary solution to ship b9.
Attachment #502196 - Flags: review?(jmuizelaar)
Attachment #502196 - Flags: review?(jmuizelaar) → review+
blocking2.0: --- → beta9+
We should relnote this too, probably in capital letters with fire.
This was checked in in time for beta 9. http://hg.mozilla.org/mozilla-central/rev/2aa85f69c1a4
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: