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.
回報 GPU 執行期間的暫停。
void ReportGpuHaltX( D3D12XBOX_REPORT_GPU_HALT_FLAGS Flags )
void GpuFullStop(ID3D12Device* device, ID3D12CommandQueue* commandQueue) { Microsoft::WRL::ComPtr<ID3D12Fence> fence = nullptr; DX::ThrowIfFailed(device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_GRAPHICS_PPV_ARGS(fence.ReleaseAndGetAddressOf()))); commandQueue->Signal(fence.Get(), 1); auto originalTime = GetTickCount(); while (0 == fence->GetCompletedValue()) { auto currentTime = GetTickCount(); auto waitTime = 5000U; // 5 seconds if (currentTime > originalTime + waitTime) { D3D12XBOX_REPORT_GPU_HALT_FLAGS flags = D3D12XBOX_REPORT_GPU_HALT_FLAG_NO_TERMINATION; if (m_terminateTitle) { flags = D3D12XBOX_REPORT_GPU_HALT_FLAG_ALL; } if (m_noDebugBreak) { flags |= D3D12XBOX_REPORT_GPU_HALT_FLAG_NO_BREAK; } if (!m_liveDebug) { flags |= D3D12XBOX_REPORT_GPU_HALT_FLAG_NO_LIVE_DEBUG; } if (!m_generateHixDump) { flags |= D3D12XBOX_REPORT_GPU_HALT_FLAG_NO_DUMP; } ID3D12Device11* device11 = nullptr; DX::ThrowIfFailed(device->QueryInterface(IID_GRAPHICS_PPV_ARGS(&device11))); device11->ReportGpuHaltX(flags); } else { auto sleepTime = 10U; // 10 ms Sleep(sleepTime); } } }
Was this page helpful?
Suggestions