Enable parallel encoding for NVENC and AMF#660
Enable parallel encoding for NVENC and AMF#660cgutman wants to merge 1 commit intoLizardByte:nightlyfrom
Conversation
|
There doesn't seem to be any performance impact in my case (#553 (comment)). |
|
Apologies for the delay, I haven't had much time to test due to my laptop's keyboard developing a hardware fault that needed addressing. This change has mixed results. Focusing on GravityMark, normalizing all tests to run at 1440p/60 on host and client, using Vulkan fullscreen: capture averages ~50fps (noticeable dips to 40). So far so good (as the Vulkan results, if not perfect, are still better than before), but a new problem arises when the host renders at a framerate below the target FPS. If I cap GravityMark to 30fps (using AMD Radeon Chill, but RTSS will probably work the same), the benchmark will look OK with Moonlight's statistics showing 30fps, but once you move the mouse, the capture statistics will increase beyond 40, and the video will show a kind of judder or temporal distortion, where frames look to be played in the wrong order. This happens only with the Vulkan API, suggesting a problem related to Screencast.from.2023-01-01.16-26-05.webmThis problem also seems to affect the
I haven't been able to reproduce this problem yet. |
I was able to reproduce this. Additionally, this PR is causing low framerate content (e.g. typing in notepad) to exhibit the same kind of delay that was present before this fix was committed: LizardByte/build-deps#18 |
|
I'm going to take a different approach and try using 2 separate That should avoid the synchronization performance overhead and hopefully address the other issues mentioned. |
Description
This PR introduces the required use of the
ID3D10Multithreadinterface and enablesPARALLEL_ENCODINGfor NVENC and AMF encoders to hopefully improve performance for capturing Vulkan applications.This works fine for me (no warnings with the debug runtime using NVENC), but I'd like a test from @psyke83 on AMD to verify that it works fine there and see if it improves performance for Gravity Mark in Vulkan mode.
Screenshot
Issues Fixed or Closed
Type of Change
.github/...)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.