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

dispatch: Try harder to avoid calling the resolver #173

Merged
merged 1 commit into from
May 17, 2018

Conversation

nwnk
Copy link
Collaborator

@nwnk nwnk commented May 15, 2018

Our caller may load (eg) epoxy_glAlphaFunc, which is a function pointer,
and then call through that value multiple times. Until the caller
re-examines the value of that function pointer, which is a copy
relocation in the executable, repeated calls mean repeated work
resolving the GL function.

We can't make the caller reinspect the variable, but the resolver
function can avoid doing redundant work.

Fixes: #171
Signed-off-by: Adam Jackson ajax@redhat.com

Our caller may load (eg) epoxy_glAlphaFunc, which is a function pointer,
and then call through that value multiple times. Until the caller
re-examines the value of that function pointer, which is a copy
relocation in the executable, repeated calls mean repeated work
resolving the GL function.

We can't make the caller reinspect the variable, but the resolver
function can avoid doing redundant work.

Fixes: anholt#171
Signed-off-by: Adam Jackson <ajax@redhat.com>
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.

Redundant glXGetProcAddressARB-calls severely reducing performance
1 participant