diogotr7 / Artemis.Plugins

Plugins I wrote for the Artemis RGB app
GNU General Public License v3.0
21 stars 5 forks source link

Fix High GPU usage when layer is idling #4

Closed Cheerpipe closed 3 years ago

Cheerpipe commented 3 years ago

Duplicator keep semi high GPU usage when a frame is not released.

Added a timer to release the last generated frame after 5 frames of inactivity. This workarround fixes GPU usage at the same time the layer keeps the "release frame just before capture" logic.

diogotr7 commented 3 years ago

I didn't actually benchmark the behaviour of releasing righ before capturing. maybe it's not worth the extra logic honestly.

diogotr7 commented 3 years ago

Here is the documentation: https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgioutputduplication-releaseframe#remarks