在Windows 10上将D3D11调试层与VS2013一起使用 [英] Use D3D11 debug layer with VS2013 on Windows 10

查看:82
本文介绍了在Windows 10上将D3D11调试层与VS2013一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的D3D 11项目中,我总是添加

In my D3D 11 projects, I always add

#if (defined(DEBUG) || defined(_DEBUG))
deviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
#endif /* (defined(DEBUG) || defined(_DEBUG)) */

到设备创建标志以启用调试输出。自从我升级到Windows 10以来,这不再起作用。设备创建失败,并显示以下输出:

to the device creation flags to enable debug output. Since I upgraded to Windows 10, this does not work any more. The device creation fails with the following output:


D3D11CreateDevice:指定了标志(0x2),这些标志需要Windows 10的D3D11 SDK层,但是它们不在系统上。
必须删除这些标志,或者必须安装Windows 10 SDK。
标志包括:D3D11_CREATE_DEVICE_DEBUG

D3D11CreateDevice: Flags (0x2) were specified which require the D3D11 SDK Layers for Windows 10, but they are not present on the system. These flags must be removed, or the Windows 10 SDK must be installed. Flags include: D3D11_CREATE_DEVICE_DEBUG

但是,我不能使用Windows 10 SDK,也不能将项目从VS2013升级到VS 2015自动取款机有什么方法可以解决此问题,即我可以在Windows 10上使用VS2013启用D3D11调试层吗?

However, I cannot use the Windows 10 SDK nor can I upgrade the project from VS2013 to VS 2015 atm. Is there any way to resolve this issue, ie can I enable the D3D11 debug layer on Windows 10 with VS2013?

推荐答案

调试消息有点误导。对于Windows 10,Windows SDK不再安装Direct3D调试层。相反,您需要启用一个称为图形工具的Windows可选功能,其中包括调试层。在Windows 10上安装VS 2015和Windows 10 SDK也会自动启用此功能,但是您可以直接执行此功能。

The debug message is a little misleading. For Windows 10, the Windows SDK no longer installs the Direct3D debug layer. Instead, you need to enable a Windows Optional Feature called "Graphics Tools" which includes the debug layer. Installing VS 2015 and the Windows 10 SDK on Windows 10 should automatically enable this feature as well, but you can do it directly.

(a)设置面板->系统- >应用和功能->管理可选功能->添加功能->从管理命令行提示符下选择图形工具

(a) Settings panel -> System -> Apps & features -> Manage optional Features -> Add a feature -> Select "Graphics Tools"

(b):

Dism /online /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0

请参见这篇文章


请注意,您从Windows 10(10240)升级到2015年11月更新(10586),则可能需要重新启用图形工具可选功能。

Note that when you upgrade from Windows 10 (10240) to the November 2015 update (10586), you may need to re-enable the Graphics Tools optional feature.

这篇关于在Windows 10上将D3D11调试层与VS2013一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆