Skip to content

Comments

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

Merged
jdm merged 1 commit intoservo:masterfrom
MortimerGoro:osmesa_webgl2
Nov 1, 2017
Merged

Fix OSMesa context creation error for GL 3.x versions#111
jdm merged 1 commit intoservo:masterfrom
MortimerGoro:osmesa_webgl2

Conversation

@MortimerGoro
Copy link
Contributor

@MortimerGoro 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.


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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supports :p

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

@jdm jdm merged commit d3cbdf9 into servo:master Nov 1, 2017
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.

3 participants