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

Fix OSMesa context creation error for GL 3.x versions #111

Merged
merged 1 commit into from Nov 1, 2017

Conversation

@MortimerGoro
Copy link
Collaborator

MortimerGoro commented Nov 1, 2017

OSMesa context creation fails on Servo headless mode tests when using webgl 2.0 contexts.

This happens because OSMesa uses a OSMESA_COMPAT_PROFILE by default and it seems that it only supports compatibility profiles in GL versions <= 3.0 and core profiles for >= 3.1

With this PR:
A 3.0 compatibility profile is preferred for a major 3 context version (e.g. WebGL 2).
A 2.1 profile is created for a major 2 context version (e.g. WebGL 1).

In the future we could include a new setting to select Core/Compatibility profiles for all the backends.

@@ -38,7 +38,10 @@ impl OSMesaContext {
}

let (major, minor) = match api_version {
GLVersion::Major(major) => (major, 1), // OpenGL 2.1, 3.1
// OSMesa only suppots compatibility (non-Core) profiles in GL versions <= 3.0.

This comment has been minimized.

@Eijebong

Eijebong Nov 1, 2017

Member

supports :p

This comment has been minimized.

@MortimerGoro

MortimerGoro Nov 1, 2017

Author Collaborator

Fixed, thanks!

@MortimerGoro MortimerGoro force-pushed the MortimerGoro:osmesa_webgl2 branch from 97fd428 to 6f236f6 Nov 1, 2017
@jdm jdm merged commit d3cbdf9 into servo:master Nov 1, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.