Direct3D11 获取最后一个错误
我对 d3d11 应用程序做了一些操作,现在我遇到了 GPU 崩溃,并且在调用 Present 之后的某个时间发生了 WDDM TDR 重置。
由于 Present(以及任何绘图调用!)函数不再返回 HRESULT,我们应该如何找到问题呢?
I did something to my d3d11 application and now I'm getting a GPU crash with WDDM TDR reset happening sometime after Present is called.
Since Present (nor any of the draw call!) functions returns an HRESULT anymore, how are we supposed to find the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要打开 DirectX 调试信息并在程序运行时密切观察调试输出。
打开 DIRECTX 控制面板,然后在 Direct3D10.x/11 下,
现在在“调试模式”下启动应用程序,您应该会看到调试消息从 DIRECT3D11 溢出到 Visual Studio 输出运行时的窗口。在渲染代码中放置一个断点并逐步执行,直到看到警告或错误消息。这将帮助您解决问题。
ERROR 消息中包含大量信息 — 实际上比 MSDN 上提供的信息要多得多。奇怪的是,这么多文档存储在 D3D11 调试器中,事实就是如此。
You need to turn on DirectX debug information and watch debug output closely as your program is running.
Open the DIRECTX CONTROL PANEL and under Direct3D10.x/11,
Now launch your application in DEBUG MODE and you should see debug messages spill out FROM DIRECT3D11 to the Visual Studio output window when you run. Place a break point in your rendering code and step through until you see WARNING or ERROR messages. That will help you fix the problem.
There is a wealth of information in the ERROR messages -- much more than is available on MSDN in fact. Its weird that so much documentation is stored in the D3D11 debugger it is what it is.