DesktopDuplication call releaseFrame before acquireNextFrame - #373
DesktopDuplication call releaseFrame before acquireNextFrame#373Womifa wants to merge 3 commits into
Conversation
psieg-jenkins
commented
Jul 15, 2020
Can one of the admins verify this patch? |
1 similar comment
psieg-jenkins
commented
Jul 15, 2020
Can one of the admins verify this patch? |
psieg
commented
Jul 19, 2020
Thanks for the PR! The issue with this is that it makes the grabbing block until the next frame has been rendered on the GPU. This means that the effectively captured frame rate is ~half of what the grab timer is configured for. (For example, for a 60 FPS monitor/game with 50ms grab interval the theoretical grab FPS is 20. With this, I get only 10. Do you have any data on how much this reduces GPU load? IIUC the DDupl-capturing is purely GPU, the expensive part of the whole operation is copying the frame buffer back to the system memory, which is unaffected by this. In desktop workloads, the impact of this certainly is near zero (maybe relevant for battery life on laptops, which won't use Prismatik), in gaming >30 FPS there could be some gain. You should reset On a side node, please don't reformat half the file for a 4 line patch. |
Womifa
commented
Aug 22, 2020
The effect of halving the framerate is weird, I reverted the changes for now and will test it some more when I have time. I don't have any data of the GPU load, but I noticed a significant drop in performance when using DDupl as it is right now when playing Gears 5 which is why I started searching for some relief. As for your side note: I didn't mean to change all of that formatting, however Visual Studio 2019 did... |
zomfg
commented
Aug 22, 2020
see this for your fps |
According to the documentation ( https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgioutputduplication-releaseframe ) the method releaseFrame should be called before the method acquireNextFrame.