Skip to content

Conversation

Blinue
Copy link
Owner

@Blinue Blinue commented May 17, 2025

使用和 OBS 同样的方法提高 GPU 优先级,某些情况下这可以提高流畅度。有几点需要注意:

  1. 我们始终使用“高”优先级。一方面“实时”优先级会造成系统不稳定:OBS 在硬件加速 GPU 调度 (HAGS) 打开时使用“高”优先级否则使用“实时”优先级,但实际上即使没有打开 HAGS,“实时”优先级也会造成问题。另一方面我不想让过于激进的优化影响到源窗口的流畅度。
  2. OBS 还使用 IDXGIDevice::SetGPUThreadPriority 提高优先级。这个接口一般被认为无用,但 OBS 传了一个未记录的值,似乎真的有用。我尝试传入相同的值但接口返回 0x8876086A (D3DERR_NOTAVAILABLE),顺带一提我这里 OBS 的调用也会失败,证明这不是专为 OBS 开的后门。

@Blinue Blinue merged commit d502ca2 into dev May 17, 2025
4 checks passed
@Blinue Blinue deleted the perf/priority branch May 17, 2025 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant