Skip to content

[WIP] Optional GPU - #241

Merged
mattleibow merged 13 commits into
masterfrom
optional-gpu
Feb 16, 2017
Merged

mattleibow merged 13 commits into
masterfrom
optional-gpu

Conversation

@mattleibow

Copy link
Copy Markdown
Contributor

Linux build can now produce a non-GPU .so. Right now this part is working, but the configuration needs love. (basically, all the linux configuration needs love)

This must be merged first: mono/skia#49

Related to #90

@kekekeks

Copy link
Copy Markdown
Contributor

I'm pretty sure that it's possible to keep GPU support without referencing libGL/libGLU/libX11 by exposing GrGLAssemble*Interface: https://github.com/mono/skia/blob/xamarin-mobile-bindings/include/gpu/gl/GrGLAssembleInterface.h#L17

@kekekeks

kekekeks commented Feb 13, 2017 •

Copy link
Copy Markdown
Contributor

I've removed -lGL -lGLU -lX11 from makefile, glXGetCurrentContextand glXGetProcAddress are the only missing imports:

../../externals/skia/out/x64/Release/libskia_skgpu.a(skgpu.GrGLCreateNativeInterface_glx.o): In function `glx_get':
/io/SkiaSharp/externals/skia/out/x64/Release/../../../src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp:24: undefined reference to `glXGetProcAddress'
../../externals/skia/out/x64/Release/libskia_skgpu.a(skgpu.GrGLCreateNativeInterface_glx.o): In function `GrGLCreateNativeInterface()':
/io/SkiaSharp/externals/skia/out/x64/Release/../../../src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp:28: undefined reference to `glXGetCurrentContext'

Just remove GrGLCreateNativeInterface_glx from the build and you should get a library that doesn't depend on OpenGL.

@kekekeks

Copy link
Copy Markdown
Contributor

BTW, GLX won't be present in "pure" Wayland/Mir environment, they use EGL instead.

@mattleibow

mattleibow commented Feb 13, 2017 •

Copy link
Copy Markdown
Contributor Author

@kekekeks Thanks for the work, I will get it all merged. BTW, I already expose the GRGLAssemble*Interface members on the GRGlInterface type in SkiaSharp - that is actually how I do the ANGLE bits on UWP.

Doing it via assemble is better than having no support at all. Good point.

@mattleibow
mattleibow merged commit 61cd9d3 into master Feb 16, 2017
@mattleibow
mattleibow deleted the optional-gpu branch February 16, 2017 20:04
@mattleibow mattleibow added this to the 1.56.2 milestone May 5, 2018
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.

2 participants