Skip to first unread message

Mick Pearson

Jul 1, 2021, 9:42:00 AMJul 1
to angleproject
Sorry if this is a waste of time. Out of curiosity I have some code to enumerate the backends and wondered if SwiftShader should be included among them (maybe just for laughs?) and I was a little curious because the machine I do most work on doesn't have Vulkan driver support, so I thought it would be interesting to see what happens. Briefly below was my experience...

First, I'm using a static build, that may not be sanctioned. Other backends seem to work. With Vulkan/SwiftShader eglGetPlatformDisplayEXT works, but eglInitialize  seems to not. (I guess I should be calling eglInitialize before thinking I have a working backend.) So I traced it. It wanted to load the Vulkan DLL because ANGLE_SHARED_LIBVULKAN was defined (I don't know if it should be, I don't even know how to define such macros in yet.)

So I copied over the DLL in angle's build output directory (assuming it's SwiftShader--maybe not--and not really knowing how ANGLE would distinguish between that one and a real one.)

Then it fails because it can't find two extensions in the Vulkan instance. It looks for VK_KHR_SURFACE_EXTENSION_NAME and VK_KHR_WIN32_SURFACE_EXTENSION_NAME (getWSIExtension) and fails because they're not in the list... which only contains two: VK_EXT_debug_report and VK_EXT_debug_utils.

It does set mEnabledICD to SwiftShader. I'm not sure if SwiftShader is statically linked or what. There's another switftshader DLL but I don't know if it's related. I guess all I'm saying if there's any use a guide would be helpful. (I think I've read everything document in the  repo. Maybe this post can get indexed by Google/Bing.)

Nicolas Capens

Jul 5, 2021, 4:41:06 PMJul 5
to angleproject
Hi Mick,

Thanks for your interest in using SwiftShader with ANGLE. Our team is currently integrating the use of ANGLE + SwiftShader Vulkan (aka. "SwANGLE") as a replacement for the legacy SwiftShader OpenGL ES implementation, into multiple projects (e.g. Chrome).

Once that high priority work is done, we'll look into making it easier to use SwANGLE for third-party projects as well. Currently it requires a fair amount of work to satisfy platform-specific requirements. Once we're able to offer easy integration steps, I'll make sure to announce it both the SwiftShader and ANGLE mailing lists.

Nicolas Capens - SwiftShader Tech Lead

Mick Pearson

Jul 6, 2021, 9:54:06 AMJul 6
to angleproject
Thanks Nicolas. For the record my take away (correct me if wrong) is this feature (extension) is currently nonfunctional under ANGLE. (At least doing a code trace it's really not clear how or at what point ANGLE would swerve from system Vulkan to SwiftShader. I'm probably repeating myself, but the first thing ANGLE does on Windows is use LoadModule on "vulkan-1.dll" before it even consults the state set by this extension to choose the ICD. It seems like at some point it would need to map itself to a different DLL or use an internal implementation but using angle_shared_libvulkan=false doesn't build. You probably know all of this. Thanks again for replying.)

Jamie Madill

Jul 6, 2021, 10:05:07 AMJul 6
to, angleproject
You should be able to use the "ANGLE_DEFAULT_PLATFORM=swiftshader" environment variable to try it out. Otherwise you need to use the EGL extension as you indicated above.

You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Mick Pearson

Jul 7, 2021, 6:59:25 AMJul 7
to angleproject
I think it's either not working ATM or there's hidden variables (ANGLE doesn't just magically work using the EGL extension) in terms of the build or execution environment.
Reply all
Reply to author
0 new messages