Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
您可以调用 RemoveDevice 向 Direct3D 12 运行时指示 GPU 设备遇到了问题,无法再使用。
UINT64_MAX
HANDLE deviceRemovedEvent = CreateEventW(NULL, FALSE, FALSE, NULL); assert(deviceRemovedEvent != NULL); _deviceFence->SetEventOnCompletion(UINT64_MAX, deviceRemoved); HANDLE waitHandle; RegisterWaitForSingleObject( &waitHandle, deviceRemovedEvent, OnDeviceRemoved, _device.Get(), // Pass the device as our context INFINITE, // No timeout 0 // No flags ); void OnDeviceRemoved(PVOID context, BOOLEAN) { ID3D12Device* removedDevice = (ID3D12Device*)context; HRESULT removedReason = removedDevice->GetDeviceRemovedReason(); // Perform app-specific device removed operation, such as logging or inspecting DRED output }
此页面对您有帮助吗?