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

Fixed GLX extensions being loaded too late #1183

Merged
merged 1 commit into from Jan 23, 2017

Conversation

Projects
None yet
2 participants
@binary1248
Member

binary1248 commented Jan 18, 2017

Fixes issue described here in which multisampling information could not be read out of framebuffer configurations because the extension was not yet loaded when GlxContext::selectBestVisual is called from WindowImplX11.

Fixed GLX extensions being loaded too late preventing multisampling c…
…onfiguration information from being read during format selection. GLX extensions are now loaded as early as possible either in a constructor of GlxContext or GlxContext::selectBestVisual.

@binary1248 binary1248 added this to the 2.4.2 milestone Jan 18, 2017

@binary1248 binary1248 self-assigned this Jan 18, 2017

@@ -269,9 +272,6 @@ void GlxContext::display()
////////////////////////////////////////////////////////////
void GlxContext::setVerticalSyncEnabled(bool enabled)
{
// Make sure that extensions are initialized
ensureExtensionsInit(m_display, DefaultScreen(m_display));

This comment has been minimized.

@eXpl0it3r

eXpl0it3r Jan 18, 2017

Member

What was the reasoning for this being here in the first place, or why can it be removed now?

@eXpl0it3r

eXpl0it3r Jan 18, 2017

Member

What was the reasoning for this being here in the first place, or why can it be removed now?

This comment has been minimized.

@binary1248

binary1248 Jan 18, 2017

Member

These calls used to be present in more places right before extensions were used. As code got moved around, the ensuring and using of the extensions moved further apart and we ended up in the current state. Logically it really only makes sense to load the extensions in the constructors and static methods, ensuring that they are always loaded whenever we do anything after.

@binary1248

binary1248 Jan 18, 2017

Member

These calls used to be present in more places right before extensions were used. As code got moved around, the ensuring and using of the extensions moved further apart and we ended up in the current state. Logically it really only makes sense to load the extensions in the constructors and static methods, ensuring that they are always loaded whenever we do anything after.

m_display = OpenDisplay();
// Make sure that extensions are initialized
ensureExtensionsInit(m_display, DefaultScreen(m_display));

This comment has been minimized.

@eXpl0it3r

eXpl0it3r Jan 18, 2017

Member

So what happens if the context is shared?

@eXpl0it3r

eXpl0it3r Jan 18, 2017

Member

So what happens if the context is shared?

This comment has been minimized.

@binary1248

binary1248 Jan 18, 2017

Member

Nothing bad... GLX extension loading only requires a valid X display connection to be available. Since we open one up right before the call it will always succeed as long as the open succeeds.

@binary1248

binary1248 Jan 18, 2017

Member

Nothing bad... GLX extension loading only requires a valid X display connection to be available. Since we open one up right before the call it will always succeed as long as the open succeeds.

@eXpl0it3r

Seem good from my point of view.

@eXpl0it3r eXpl0it3r merged commit 6fabc38 into 2.4.x Jan 23, 2017

15 checks passed

android-armeabi-v7a-api13 Build #69 done.
Details
debian-gcc-64 Build #342 done.
Details
freebsd-gcc-64 Build #304 done.
Details
osx-clang-el-capitan Build #189 done.
Details
static-analysis Build #311 done.
Details
windows-gcc-492-tdm-32 Build #201 done.
Details
windows-gcc-492-tdm-64 Build #198 done.
Details
windows-gcc-610-mingw-32 Build #134 done.
Details
windows-gcc-610-mingw-64 Build #135 done.
Details
windows-vc11-32 Build #313 done.
Details
windows-vc11-64 Build #311 done.
Details
windows-vc12-32 Build #311 done.
Details
windows-vc12-64 Build #310 done.
Details
windows-vc14-32 Build #313 done.
Details
windows-vc14-64 Build #314 done.
Details

@eXpl0it3r eXpl0it3r deleted the bugfix/glx_extensions branch Jan 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment