This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
5,379 additions
and
1,457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
e94bb10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on the Unity "
GL.IssuePluginEvent()
overhead" you observed?e94bb10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our native code clobbers a lot of GL state (and for whatever reason, GL.InvalidateState() did not work for us), so for quite some time we've had code in the native plugin to save and restore bits of GL state during the distortion correction pass. It cropped up as a performance hit, more than we liked, mostly stalling the CPU. So we moved that functionality up into Unity (see CardboardPostRender.cs) in order to not have to do all that state preservation. Maybe the way to say it is that by using GL.IssuePluginEvent we were in a situation where we didn't know the exact state of the pipeline, so it introduced an "ignorance overhead".
e94bb10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e94bb10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, good. This is one of those changes where you may not see much of a difference, if this path is not your bottleneck. It was for at least one of our apps.
Can you see if your CPU utilization has changed?
e94bb10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.