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

[LinuxRendererGLES] Fix pixelstore usage #15880

merged 1 commit into from Apr 10, 2019


Copy link

commented Apr 8, 2019


Don't call glPixelStorei if not necessary.

Motivation and Context

Should solve discussion here: #15684

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)
if (m_pixelStoreKey > 0)
glGetIntegerv(m_pixelStoreKey, &pixelStore);

This comment has been minimized.

Copy link

popcornmix Apr 9, 2019


You really shouldn't call glGet functions in typical usage. It will likely cause gl rendering pipeline to flush.

glGetFloatv glGetBooleanv glGetDoublev glGetIntegerv
You find that these functions are slow.
That's normal. Any function of the glGet form will likely be slow. nVidia and ATI/AMD recommend that you avoid them. The GL driver (and also the GPU) prefer to receive information in the up direction. You can avoid all glGet calls if you track the information yourself.

Ideally keep track of these through a local variable, not by asking the GPU.

@peak3d peak3d force-pushed the peak3d:pixelstore branch from c2f76bd to ace7269 Apr 9, 2019

@peak3d peak3d merged commit b91695e into xbmc:master Apr 10, 2019

1 check passed

default You're awesome. Have a cookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.