IddCx 驱动程序帧卡顿,可能是由操作系统版本问题引起的
我正在开发 IddCx 间接显示驱动程序。我遇到了一个错误,我找不到任何理由归咎于我自己的代码。每两秒左右,IddCxSwapChainReleaseAndAcquireBuffer
需要 100 毫秒以上,最多需要 8000 毫秒才能完成。通常需要 16 毫秒以下才能完成(取决于您的帧速率)。
我什至将时间戳添加到 IddCx 示例代码微软。它仍然存在这个问题,所以这不可能是我自己的代码的错误。我已经用尽了大部分调试选项。
- 通过定位库、标头并定义宏(IDDCX_VERSION_MAJOR、IDDCX_VERSION_MINOR、IDDCX_MINIMUM_VERSION_REQUIRED)来更改我正在编译的 IddCx 版本(1.4 到 1.8)。顺便说一句,1.9 似乎运行得不太好,如果我选择 1.9 版本,IddCxDeviceInitConfig() 会因参数无效而失败。
- 更改我正在编译的 UMDF 版本(2.25 到 2.33)。
- 更改我正在使用的 Windows SDK 版本(10.0.19041.0、10.0.20348.0、10.0.22000.0、10.0.22572.0)。
- 将我的操作系统更换为 win11 的 Insider Program 预览版(当前为 22000.588 co_release)。
我认为可能是我需要帮助的解决方案。
当我在 dxdiag 中运行驱动程序时,显示器显示其使用 WDDM 版本 1.3,而我的其他显示器使用 WDDM 版本 3.0。 WDDM 1.3 太旧了,所以这可能会导致问题吗?如何告诉 Visual Studio 编译我的驱动程序以使用 WDDM 版本 3.0 进行编译?我的驱动程序需要先获得 WHQL 徽标吗?
无论我更改什么(SDK、IDDCx 版本等),IddCxGetVersion() 都会返回版本 1801 或 1803,这是从 2018 年开始的!那么我在这里做错了什么让操作系统选择使用较新版本的 IddCx 呢?这可能与 WDDM 版本为 1.3 而不是 3.0 有关。
换回 Windows 10。我最初换到 Windows 11 是因为 WDK 开发环境完全不稳定,示例有时无法创建功能驱动程序,无法调用“EVT_IDD_CX_ADAPTER_INIT_FINISHED”,我已确认其编译不正确(有时)在 Windows 10 上,当天早些时候的旧 dll 仍然可以工作,但新 dll 则不能。这就是我继续使用 Windows 11 的原因,无论如何我也需要切换到 Windows 11,因为我们应该前进,而不是倒退。
I am working on a IddCx indirect Display Driver. I have run into a bug that I cant find any reason to blame my own code on. Every two seconds or so IddCxSwapChainReleaseAndAcquireBuffer
takes over 100ms, up to 8000ms to complete. It normally takes below 16ms to complete (depends on your frame rate).
I even added timestamps to the IddCx Sample code from Microsoft. It still has this issue, so it cant be a fault with my own code. I have exhausted most of my debugging options.
- Changing IddCx versions I am compiling with (1.4 to 1.8) by targeting the libs, the headers, and defining the macros (IDDCX_VERSION_MAJOR, IDDCX_VERSION_MINOR, IDDCX_MINIMUM_VERSION_REQUIRED). 1.9 btw doesnt seem to run well, IddCxDeviceInitConfig() fails with Invalid Parameter if I choose version 1.9.
- Changing which UMDF version I am compiling with (2.25 to 2.33).
- Changing the Windows SDK version I am using (10.0.19041.0, 10.0.20348.0, 10.0.22000.0, 10.0.22572.0).
- Swapping my OS to the Insider Program preview version of win11 (currently 22000.588 co_release).
Things I think may be solutions that I need help on.
When I am running the Driver, within dxdiag, the display says its using WDDM version 1.3, while my other displays use WDDM version 3.0. WDDM 1.3 is old, so maybe this could be causing issues? How do I tell visual studio to compile my driver to compile with WDDM version 3.0? Does my driver need to WHQL Logo'd first?
IddCxGetVersion() returns with version 1801 or 1803 no matter what I change (SDK, IDDCx version, etc), which is from 2018! So what am I doing wrong here to get the OS to choose to use a newer version of IddCx? This may be related to the WDDM version being 1.3 instead of 3.0.
Swapping back to Windows 10. I originally swapped to Windows 11 because the WDK dev environment is completely unstable, with the samples sometimes not creating functional drivers, that fail to call into 'EVT_IDD_CX_ADAPTER_INIT_FINISHED', I have confirmed its being compiled incorrectly (sometimes) on windows 10, and the old dlls from earlier that day will still work, but the new dlls will not. So thats why I am staying with Windows 11, I also need to swap to Windows 11 anyways since we should be moving forwards, not backwards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
忘记关闭这个了。
意识到问题是显示器桌面根本没有更新。因此,操作系统只是减少了渲染桌面的频率,导致推送到交换链供我抓取的帧更少
forgot to close this.
Realized the issue was that the monitor desktop simply wasnt updating. So the OS was just rendering the desktop less often, resulting in less frames being pushed to the swapchain for me to grab