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

Use SendTexture to lower the overhead of the spout filter #46

Merged
merged 4 commits into from
Sep 13, 2022

Conversation

y2kcyborg
Copy link
Contributor

These changes replace some GPU->CPU and CPU->GPU copies with on-GPU copies and conversions, lowering the overhead of the spout filter and hopefully addressing #42 . In my test setup the render time went from around 5.5ms to 0.3ms with two spout filters active.

I've fixed the issues I found in my own limited testing, but others may remain. There may also be further improvements possible to the rendering.

Anecdotally, this might also resolve a crash on exit when using the spout filter, although I can't reproduce it 100% on master.

Copy link
Collaborator

@campbellwmorgan campbellwmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Thank you so much for this contribution. I've tested locally and it's working really well.

If you have time, do you think you could rebase this on top of the latest master (the OBS v. 28 release)?

I have rebased it myself locally and it works very well on OBS 28, so don't feel you need to go through the pain of updating your local dev environment to 28 to test it (at least it was a pain for me). In any case, before releasing it we will thoroughly QA it.

Many thanks again!

source/win-spout-filter.cpp Outdated Show resolved Hide resolved
source/win-spout-filter.cpp Show resolved Hide resolved
source/win-spout-filter.cpp Show resolved Hide resolved
@y2kcyborg
Copy link
Contributor Author

Thanks for taking a look! I've tidied up and rebased as you asked.

@campbellwmorgan campbellwmorgan merged commit 35642b0 into Off-World-Live:master Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants