Skip to content
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

libobs: Remove extra gs_flush calls #10590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkartaltepe
Copy link
Collaborator

@kkartaltepe kkartaltepe commented Apr 24, 2024

Description

These calls introduce pipeline stalls in OpenGL on low end machines which can contribute to a fairly significant 10-30% of total rendering time. On average (since not every frame stalls) this is ~5% improvement with gpu time decreasing from 6.3ms to 6.0ms when encoders are active.

The driver already needs to synchronize events within the context so these calls are not needed for correctness for OpenGL.

Motivation and Context

Squeeze out a bit more perf on very low end devices where encoders could go faster if the rendering was faster. It matters more for intel than AMD in my tests but the intel is far weaker than my AMD device.

How Has This Been Tested?

Rendering vaapi and qsv texture encoders on amd and intel devices and I didnt notice any differences in output.

If I'm reading the D3D11 pages correctly for flush it seems it wont even introduce the gpu-gpu sync that it does on OpenGL so these are only trying to submit commands faster in Windows? I would appreciate testing on windows to know if these were providing any significant performance improvements there.

Types of changes

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

Checklist:

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

These calls introduce pipeline stalls in OpenGL on low end machines
which can contribute to a fairly significant 10-30% of total rendering
time.

The driver already needs to synchronize events within the context so
these calls are not needed for correctness for OpenGL.
@RytoEX RytoEX added the Enhancement Improvement to existing functionality label Apr 24, 2024
@derrod
Copy link
Member

derrod commented May 4, 2024

Seems to work fine on Windows as well.

@kkartaltepe
Copy link
Collaborator Author

There was another question about vram usage on windows without the flush, so maybe its worth checking that too.

@derrod
Copy link
Member

derrod commented May 4, 2024

I don't see any difference in VRAM usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants