1

我正在尝试启动我的 directX/SharpDX 应用程序,DeviceCreationFlags.Debug但我在启动时遇到以下崩溃:

SharpDX.SharpDXException: HRESULT: [0x80004005], Module: [General], ApiCode: [E_FAIL/Unspecified error], Message: Unspecified error

at SharpDX.Result.CheckError()
at SharpDX.Direct3D11.Device.CreateDevice(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Direct3D11.Device..ctor(Adapter adapter, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Toolkit.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Toolkit.GamePlatform.CreateDevice(GraphicsDeviceInformation deviceInformation)
at SharpDX.Toolkit.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation newInfo)
at SharpDX.Toolkit.GraphicsDeviceManager.ChangeOrCreateDevice(Boolean forceCreate)
at SharpDX.Toolkit.GraphicsDeviceManager.SharpDX.Toolkit.IGraphicsDeviceManager.CreateDevice()
at SharpDX.Toolkit.Game.InitializeBeforeRun()
at SharpDX.Toolkit.GameWindowDesktop.Run()
at SharpDX.Toolkit.GamePlatform.Run(GameContext gameContext)
at SharpDX.Toolkit.Game.Run(GameContext gameContext)
at wrapper.Program.Main(String[] args)

这是在 Win7 32 位上,我确实安装了 June2010 DirextX SDK 和 Runtime 以及适用于 Windows 7 的 Windows SDK。

顺便说一句,这个问题源于这个问题:SharpDX crash when rendering h264 video using MediaFoundation

4

2 回答 2

2

从 MSDN(D3D11_CREATE_DEVICE_FLAG 上的页面):

D3D11_CREATE_DEVICE_DEBUG

创建支持调试层的设备。

要使用此标志,您必须安装 D3D11*SDKLayers.dll;否则,设备创建失败。要获取 D3D11_1SDKLayers.dll,请安装适用于 Windows 8 的 SDK。

这些文件不是 June2010 SDK 的一部分。您必须在其他地方找到它们(如建议的那样,在 Windows 8 SDK 中)。

于 2013-11-06T11:36:02.683 回答
1

Alternative to installing the SDK is installing Visual Studio 2012 or newer. Its installation will install these debug libraries.
Similar problem was mentioned here: link => explanation 3

于 2014-01-14T21:48:38.667 回答