You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CGLCreateContext fails when creating a context through WebRender from WebGL. #82
CGLCreateContext fails with error code 10009 when creating via WR from WebGL.
"Invalid share context. Two contexts are a bad match if their pixel formats use different renderers; this can happen if, for example, one format required an accumulation buffer that could be provided only by the software renderer, and the other format did not."
This causes Servo to fallback to a nice and slow alternative.
changed the title [-]`CGLCreateContext` fails when creating a context through WR from WebGL.[/-][+]`CGLCreateContext` fails when creating a context through WebRender from WebGL.[/+]on Feb 14, 2017
Yes, I believe this is the same underlying issue than servo/servo#11138. Mainly, WR uses a core context, and we use a compatibility one, and CGL freaks out so we have to fall back to readback.
My idea for this was fixing it properly (only use shared textures via IOSurface/GLXPixmap/etc., and not sharing contexts as a whole), but I don't have neither time right now, nor a OSX machine :(
If we want to fix this sharing contexts, we could request a core context for CGL, and then emulate all the compatibility stuff WebGL requires in the renderer, but I don't know if that's a great idea.
If we want to fix this sharing contexts, we could request a core context for CGL, and then emulate all the compatibility stuff WebGL requires in the renderer, but I don't know if that's a great idea.
Activity
[-]`CGLCreateContext` fails when creating a context through WR from WebGL.[/-][+]`CGLCreateContext` fails when creating a context through WebRender from WebGL.[/+]emilio commentedon Feb 14, 2017
Yes, I believe this is the same underlying issue than servo/servo#11138. Mainly, WR uses a core context, and we use a compatibility one, and CGL freaks out so we have to fall back to readback.
My idea for this was fixing it properly (only use shared textures via IOSurface/GLXPixmap/etc., and not sharing contexts as a whole), but I don't have neither time right now, nor a OSX machine :(
emilio commentedon Feb 14, 2017
If we want to fix this sharing contexts, we could request a core context for CGL, and then emulate all the compatibility stuff WebGL requires in the renderer, but I don't know if that's a great idea.
samgiles commentedon Feb 14, 2017
Isn't this essentially what ANGLE does?
emilio commentedon Feb 14, 2017
Pretty much. I wrote the bindings for the shader validation side of Angle (https://github.com/servo/angle), perhaps we could extend that, though right now the renderer uses Gleam, so hooking the gl functions may be nontrivial. I believe this should be way easier once #81, and the related gleam and WR PRs have landed.
samgiles commentedon Feb 14, 2017
Nice! That definitely looks like a robust path after #81.