Open
Conversation
…H(function_name) in dlsym()
… init(), which will go away with the later patches by using C macros
…_lib() and use them in init()
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #6, adding support for OpenGL timer queries to libframetime is highly desirable because of accuracy improvements.
This pull request takes care of that.
This new measuring method will by used by default when available at compiletime AND at runtime.
This can be overruled at runtime by setting the
LIBFRAMETIME_TIMERQUERIES_DISABLED=1environment variable.If, for some reason, the timer query approach fails at init, graceful degradation ensures libframetime will continue with the original cpu timer approach.
The README is updated to document this new functionality.
To verify timer queries are used, set the
LIBFRAMETIME_TIMERQUERIES_DEBUG=1environment variable and check whether the following line is printed:This was tested with Mesa on Ivybridge (X11 (GL) and Wayland (EGL)), Skylake (X11), GTX760 (X11) and on Skylake (X11) when
GL_ARB_timer_querywas explicitly#undef-ed at compiletime (in which case it correctly used the cpu timer instead).This pull request builds upon the
feature-ImprovedErrorHandlingAndCodeCleanupV3branch, and only adds one new commit.Because of the added functionality is significant w.r.t. the original functionality, I added my name in the copyright notice.
If you don't agree, please let me know and I'll remove it.