-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DesktopDuplication call releaseFrame before acquireNextFrame #373
base: master
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
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. |
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... |
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.