獲取 D3D 調試信息? (Get D3D debug information?)


問題描述

獲取 D3D 調試信息? (Get D3D debug information?)

在初始化我的 D3D 內容期間,我調用以下函數:

        hr = D3D11CreateDevice(nullptr,gDriverTypes[DriverTypeIndex],nullptr,
#ifdef _DEBUG
            D3D11_CREATE_DEVICE_DEBUG,
#else
            0,
#endif
            gFeatureLevels,gNumFeatureLevels,D3D11_SDK_VERSION,&lDevice,&lFeatureLevel,&lImmediateContext);

在調試構建中,為了獲取有關可能的 D3D 錯誤的更多信息,我設置了標誌 D3D11_CREATE_DEVICE_DEBUG。如果沒有任何進一步的操作,這會讓我的應用程序立即終止。

因此根據 在 Windows 10 上使用 D3D11 調試層和 VS2013 我嘗試通過調用

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

在最新 Windows 上的管理控制台中安裝所需的 D3D 調試內容10. 不幸的是,這失敗了

Deployment Image Servicing and Management tool
Version: 10.0.18362.1316
Image Version: 10.0.18363.1316
[==========================100.0%==========================]
Error: 0x8024500c
DISM failed. No operation was performed.

日誌文件也不是很有幫助,它包含大量的錯誤消息和一個不容易理解的錯誤代碼。


參考解法

方法 1:

For Windows 10, support for the Direct3D 11 and Direct3D 12 "Debug Device" is only available with the "Graphics Tools" Windows optional feature enabled.

The HRESULT of 0x8024500c indicates you have some problem with Windows Update on your system. It's WU_E_REDIRECTOR_CONNECT_POLICY.

Most likely your PC is on a corporate network using WSUS. You need to ask the IT admins to allow this Windows optional feature.

(by ElmiChuck Walbourn)

參考文件

  1. Get D3D debug information? (CC BY‑SA 2.5/3.0/4.0)

#direct3d11 #direct3d #windows-10






相關問題

Адлюстраванне дынамічнага буфера ў Direct3D11 у праграме Windows Store (Mapping a dynamic buffer in Direct3D11 in a Windows Store App)

未處理的異常@ClearRenderTargetView() (Unhandled exception @ ClearRenderTargetView())

將 3d 模型導入 Direct3D 11 示例 (Importing 3d model to Direct3D 11 Example)

編譯器不允許我使用“DDSTextureLoader.h”和“WICTextureLoader.h” (Compiler won't let me use "DDSTextureLoader.h" and "WICTextureLoader.h")

在我從舊版 DirectX SDK 更改為 Windows SDK (Visual Studio 2015) 後,鏈接器一直在抱怨 (The linker keeps complaining after I changed from legacy DirectX SDK to Windows SDK (Visual Studio 2015)))

鏈接器給出了我在我的應用程序中根本沒有使用過的函數的錯誤 (Linker gives errors about a function that i have not used in my application at all)

Direct3D 11 中輸出圖像的雙線性過濾 (Bilinear filtering of output image in Direct3D 11)

Direct3D 編程新手:11 與 12 (New to Direct3D programming: 11 vs 12)

如何在 Direct3D 11 上使用字體文件渲染文本? (How can I render text using font files on Direct3D 11?)

獲取 D3D 調試信息? (Get D3D debug information?)

為什麼 XMMatrixLookAtLH 會導致調試錯誤? (Why does XMMatrixLookAtLH result in a debug error?)

InterlockedAdd HLSL 潛在優化 (InterlockedAdd HLSL potential optimization)







留言討論