OpenGL backend for Windows ARM64

1,404 views
Skip to first unread message

Daljit

unread,
Jun 3, 2022, 11:42:00 AM6/3/22
to skia-discuss
Hi,
I'd like to build and use Skia on Windows 11 ARM64. The documentation mentions here https://skia.org/docs/user/build/#windows-arm64 that:

> Note that OpenGL is not supported by Windows 10 on ARM, so Skia’s GL backends are stubbed out, and will not work. ANGLE is supported...

Does that mean that it's only possible to use Skia through angle on Window ARM64? Microsoft provides the OpenCL™ and OpenGL® Compatibility Pack which allows to translate OpenGL commands (up to version 3.3) into DirectX12 calls.
I cannot use angle in my project, but would it be possible to "unstub" Skia's GL backends when building for Windows ARM64?

Brian Osman

unread,
Jun 3, 2022, 11:53:40 AM6/3/22
to skia-d...@googlegroups.com
Yes, when the Windows-ARM64 support was added, we only tested GPU acceleration using ANGLE. (I'm not sure if that GL compatibility pack existed at the time). I think you have (at least) two options:

1) You could try installing that, and then enabling the GL backend again. Most of the changes were just to Skia's testing code, not the core library itself. Everything to disable it was (I think) in this change: https://skia-review.googlesource.com/c/skia/+/175984/. GrGLMakeNativeInterface_Win.cpp is probably the most important (plus the GN changes to link in the GL libraries). That CPP file has moved, it now exists in the src/gpu/ganesh/gl/win directory.

2) Skia's native D3D backend might work better. It's less tested than our GL backend - none of our major clients have adopted it yet, but we do run it against our own unit tests and rendering examples.

-Brian

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/573e9e41-4084-4f54-a5a0-a22ca1eafca4n%40googlegroups.com.

Daljit

unread,
Jun 22, 2022, 4:27:50 PM6/22/22
to skia-discuss
Just a quick update on this in case anyone was also wondering about using the OpenGL backend on Windows ARM64. I successfully managed to compile Skia for Windows arm by undoing the changes relevant to the commit above. The Skia OpenGL backend does indeed work on Windows 11 ARM64 with the OpenGL Compatibility pack installed, however the performance is rather poor. In fact, in my tests using a x64 binary that uses Angle (which can run on Windows 11 through emulation) yields far better performance than a natively compile app for ARM64 making use of Skia's OpenGL backend. So practically, using the OpenGL backend of Skia on Windows ARM64 is not really an option (I  expected Microsoft's translation APIs to be somewhat comparable to Angle in terms of performance, but they are much slower).

Daljit

unread,
Jun 23, 2022, 6:06:30 PM6/23/22
to skia-discuss
Ok so after some profiling, I realised that I was mistakenly calling GrGLMakeAssembledInterface every frame. By removing this unnecessary call, the peformance of my Skia demo with OpenGL compatibility pack is great! It's very similar to using ANGLE.
So I'm not sure whether the Skia team wants to reenable the OpenGL support for Windows ARM64, but it's definitely possible and Skia seems to run quite well on it.

Peter Noyes

unread,
Feb 13, 2025, 6:47:43 PMFeb 13
to skia-discuss
I am running into this same issue using SkiaSharp. At this point Windows 10 is on its way out and new Windows 11 arm64 computer appear to come that OpenGL compatibility pack installed so I am wondering if it would be possible to re-enable OpenGL support. 

I logged an issue here with SkiaSharp before I stumbled across this thread :  [BUG] GRGlInterface.Create() returns null on Windows on Arm · Issue #3155 · mono/SkiaSharp

Thanks,
Peter

Daljit

unread,
Feb 14, 2025, 5:03:47 AMFeb 14
to skia-discuss
I agree with your point. I think it would make a lot of sense for Skia to reenable the OpenGL backend for Windows ARM64, given that the OpenGL -> DirectX translations work well in my experience. Perhaps it's worth opening a bug report on https://issues.skia.org?

Best,
Daljit

Jim Van Verth

unread,
Feb 14, 2025, 9:41:52 AMFeb 14
to skia-d...@googlegroups.com
Have you tried the Direct3D backend as Brian suggested?



--

Jim Van Verth |
 Software Engineer | Google.com

Peter Noyes

unread,
Feb 14, 2025, 1:09:52 PMFeb 14
to skia-discuss
Direct3D isn't exposed through SkiaSharp at the moment. There is a PR out for it, but it is quite stale: 

Daljit

unread,
Feb 15, 2025, 8:53:14 AMFeb 15
to skia-discuss
Also, using Direct3D is not a realistic possibility for many apps that are built using OpenGL (other than complicated interop with external textures/buffers). For those application, having an OpenGL backend is the least painful option. Since Skia clearly supports on OpenGL on x64 , I think it'd be good for it re-enable the support on Win11 ARM64 given that it now has a conformant OpenGL 4.6 implementation that works well.

mattl...@live.com

unread,
Mar 10, 2025, 9:46:46 AMMar 10
to skia-discuss
Hi folks, I just merged a PR to the mono fork of skia where I un-stub-out the code and it works. I do build it a bit different in that I dynamically load the opengl32 library at runtime: https://github.com/mono/skia/blob/f8ba1c589c32fdfac947c8d9f6d1398d2d69f406/src/gpu/ganesh/gl/win/GrGLMakeNativeInterface_win.cpp

I have different needs, but by doing this I just need to compile for win32 arm64 and then with the extension pack it just works.

I know this does not help anyone using skia directly as the build links with opengl32 and is currently stubbed out, but it seems to work. Just an FYI

And about the Direct3D PR, I am hoping to merge it very soon.
Reply all
Reply to author
Forward
0 new messages