obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

decklink-output-ui: Pipeline GPU data for preview

Open jpark37 opened this issue 3 years ago • 1 comments

Description

Mapping a GPU resource for CPU read immediately after GPU write creates a large stall on the graphics thread. Use a small circular buffer, and read the oldest frame instead.

Motivation and Context

Bubbles are bad.

How Has This Been Tested?

Graphics thread time, preview off -> on, before: 1.5 ms -> 11 ms Graphics thread time, preview off -> on, after: 1.5 ms -> 2 ms

Types of changes

  • Performance enhancement (non-breaking change which improves efficiency)

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [x] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [x] I have included updates to all appropriate documentation.

jpark37 avatar Sep 05 '22 23:09 jpark37

@paulh-aja It looks like the Aja plugin copied the same pattern. You probably want to implement and test similar on your end.

jpark37 avatar Sep 05 '22 23:09 jpark37