确保system32下面有D3D12SDKLayers.dll,没有的装
会遇到error
800F0954
1. regedit
2. HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
3. UseWUServer -> 0
4. net stop wuauserv && net start wuauserv from cmd
然后
#if defined(_DEBUG)
// Enable the debug layer (requires the Graphics Tools "optional feature").
// NOTE: Enabling the debug layer after device creation will invalidate the active device.
{
ComPtr
if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&debugController))))
{
debugController->EnableDebugLayer();
// Enable additional debug layers.
dxgiFactoryFlags |= DXGI_CREATE_FACTORY_DEBUG;
}
}
#endif
就ok了
会得到这种错误提示
DXGI ERROR: IDXGIFactory::CreateSwapChain: Flip model swapchains (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL and DXGI_SWAP_EFFECT_FLIP_DISCARD) do not support multisampling. DXGI_SWAP_CHAIN_DESC{ SwapChainType = …_HWND, BufferDesc = DXGI_MODE_DESC1{Width = 1280, Height = 720, RefreshRate = DXGI_RATIONAL{ Numerator = 0, Denominator = 1 }, Format = R8G8B8A8_UNORM, ScanlineOrdering = …_UNSPECIFIED, Scaling = …_UNSPECIFIED, Stereo = FALSE }, SampleDesc = DXGI_SAMPLE_DESC{ Count = 4, Quality = 0 }, BufferUsage = 0x20, BufferCount = 2, OutputWindow = 0x0000000000010720, Scaling = …_STRETCH, Windowed = TRUE, SwapEffect = …_FLIP_DISCARD, AlphaMode = …_UNSPECIFIED, Flags = 0x0 } [ MISCELLANEOUS ERROR #102: ]
手机扫一扫
移动阅读更方便
你可能感兴趣的文章