{"record":{"id":"18c6dc3a20a6d7bf","repo":"gfx-rs/wgpu","slug":"tried-to-set-display-timing-properties-without-the","errorCode":null,"errorMessage":"Tried to set display timing properties without the corresponding feature ({:?}) enabled.","messagePattern":"Tried to set display timing properties without the corresponding feature \\((.+?)\\) enabled\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-hal/src/vulkan/swapchain/native.rs","lineNumber":691,"sourceCode":"    }\n\n    fn as_any_mut(&mut self) -> &mut dyn Any {\n        self\n    }\n}\n\nimpl NativeSwapchain {\n    pub(crate) fn as_raw(&self) -> vk::SwapchainKHR {\n        self.raw\n    }\n\n    pub fn set_next_present_time(&mut self, present_timing: vk::PresentTimeGOOGLE) {\n        let features = wgt::Features::VULKAN_GOOGLE_DISPLAY_TIMING;\n        if self.device.features.contains(features) {\n            self.next_present_time = Some(present_timing);\n        } else {\n            // Ideally we'd use something like `device.required_features` here, but that's in `wgpu-core`, which we are a dependency of\n            panic!(\n                concat!(\n                    \"Tried to set display timing properties \",\n                    \"without the corresponding feature ({:?}) enabled.\"\n                ),\n                features\n            );\n        }\n    }\n\n    /// # Safety\n    ///\n    /// See [`Surface::set_next_present_chain()`](crate::vulkan::Surface::set_next_present_chain).\n    pub unsafe fn set_next_present_chain(&mut self, chain: *mut core::ffi::c_void) {\n        self.next_present_chain = Some(PnextChain::new(chain));\n    }\n\n    /// Mark the current frame finished, advancing to the next acquire semaphore.\n    fn advance_acquire_semaphore(&mut self) {","sourceCodeStart":673,"sourceCodeEnd":709,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-hal/src/vulkan/swapchain/native.rs#L673-L709","documentation":"`Swapchain::set_next_present_time` schedules a present-time via VK_GOOGLE_display_timing, which requires the `Features::VULKAN_GOOGLE_DISPLAY_TIMING` feature. If the device was not created with it, this public method panics with the feature name. It exists because hal does not have access to wgpu-core's required_features record for a nicer validation error.","triggerScenarios":"Calling `set_next_present_time` on a swapchain whose device was created without `wgpu::Features::VULKAN_GOOGLE_DISPLAY_TIMING`.","commonSituations":"Frame-pacing / display-timing code copied from a project that enabled the feature; forgetting to declare the extension-backed feature at device creation; running on a platform where the driver lacks VK_GOOGLE_display_timing.","solutions":["Add `wgpu::Features::VULKAN_GOOGLE_DISPLAY_TIMING` to required_features when creating the device.","Check `adapter.features().contains(Features::VULKAN_GOOGLE_DISPLAY_TIMING)` first and skip present-timing scheduling if unsupported.","Only call set_next_present_time behind a runtime feature check."],"exampleFix":"// before\nswapchain.set_next_present_time(present_time);\n// after\nif device.features().contains(wgpu::Features::VULKAN_GOOGLE_DISPLAY_TIMING) {\n    swapchain.set_next_present_time(present_time);\n}","handlingStrategy":"validation","validationCode":"if !device.features().contains(wgpu::Features::VULKAN_GOOGLE_DISPLAY_TIMING) {\n    return; // skip present-timing scheduling\n}\nswapchain.set_next_present_time(present_time);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate all display-timing calls behind a runtime feature check.","Request VULKAN_GOOGLE_DISPLAY_TIMING in required_features only after the adapter reports it.","Provide a non-timing fallback present path for unsupported drivers."],"tags":["vulkan","swapchain","display-timing","feature-missing","panic"],"backgroundTag":"gpu-feature-not-enabled","analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}