{"record":{"id":"be8a4218b64d1aad","repo":"gfx-rs/wgpu","slug":"gettimestampfrequency","errorCode":null,"errorMessage":"GetTimestampFrequency","messagePattern":"GetTimestampFrequency","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/dx12/mod.rs","lineNumber":1744,"sourceCode":"\n        let (interval, flags) = match sc.present_mode {\n            // We only allow immediate if ALLOW_TEARING is valid.\n            wgt::PresentMode::Immediate => (0, Dxgi::DXGI_PRESENT_ALLOW_TEARING),\n            wgt::PresentMode::Mailbox => (0, Dxgi::DXGI_PRESENT::default()),\n            wgt::PresentMode::Fifo => (1, Dxgi::DXGI_PRESENT::default()),\n            m => unreachable!(\"Cannot make surface with present mode {m:?}\"),\n        };\n\n        profiling::scope!(\"IDXGISwapchain3::Present\");\n        unsafe { sc.raw.Present(interval, flags) }\n            .ok()\n            .into_device_result(\"Present\")?;\n\n        Ok(())\n    }\n\n    unsafe fn get_timestamp_period(&self) -> f32 {\n        let frequency = unsafe { self.raw.GetTimestampFrequency() }.expect(\"GetTimestampFrequency\");\n        (1_000_000_000.0 / frequency as f64) as f32\n    }\n\n    unsafe fn wait_for_idle(&self) -> Result<(), crate::DeviceError> {\n        let value = self\n            .idle_fence_value\n            .fetch_add(1, core::sync::atomic::Ordering::Relaxed)\n            + 1;\n        unsafe { self.raw.Signal(&self.idle_fence, value) }\n            .into_device_result(\"Signal idle fence\")?;\n        unsafe {\n            self.idle_fence\n                .SetEventOnCompletion(value, self.idle_event.0)\n        }\n        .into_device_result(\"SetEventOnCompletion\")?;\n        unsafe { Threading::WaitForSingleObject(self.idle_event.0, Threading::INFINITE) };\n        Ok(())\n    }","sourceCodeStart":1726,"sourceCodeEnd":1762,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/dx12/mod.rs#L1726-L1762","documentation":"Panic marked GetTimestampFrequency: querying the swapchain's timestamp frequency (needed to normalize presentation timing) returned a failing HRESULT, so the timing data cannot be interpreted. The faulty input is the DXGI swapchain/driver state.","triggerScenarios":"Thrown at wgpu-hal/src/dx12/mod.rs:1744 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Report the driver/swapchain incompatibility; avoid timing-sensitive presentation features on it","Ensure the surface was configured before presenting and that the swapchain is valid"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}