Windy does not work on chromium when the Vulkan backend of ANGLE engine is used
-
Chromium uses the ANGLE engine for WebGL. There is a flag named "#default-angle-vulkan" which can be enabled in chromium (from the chrome://flags/ URL) to change the backend of ANGLE to Vulkan. This has fixed for me some flickering issues I had recently. However, unfortunately, it also makes Windy to fail with the following error:
It seems that wind overlay failed. Failed to initialize WebGL
Overlay wind uses WebGL technology, that can occasionally fail on some devices.
What can you do? Update your browser or Windy application to the latest version. And try again please.
Is this a known issue? Are there any plans to support the Vulkan backend or is there some functionality that is needed for Windy to work and may be still missing from the Vulkan-based renderer of the ANGLE engine?
-
@Petros-Moisiadis Hello, it seems that Chrome with Vulkan ANGLE simply fails to create a WebGL context. At least on my system no other WebGL webpage works either and a simple test script
document.createElement('canvas').getContext('webgl')returns null. Unfortunately there is nothing we can do about this. This is on Chrome's side, you can try reporting this to Google. -
@kubapelc Thank you for your fast reply! I dig it a little more and I found out that more flags are needed to be enabled in order for WebGL to work with the vulkan backend. At least so it seems from your simple test script that now returns a
WebGLRenderingContextobject instead ofnull. Particularly, I enabled the chromium flags #enable-vulkan, #default-angle-vulkan and #vulkan-from-angle. However, Windy still fails with the same error. Now it must be something else because I can see the spinning cube when visiting https://get.webgl.org/. -
@Petros-Moisiadis I've dug around a bit, it's caused by the default flags MapLibre uses when creating a WebGL context. It passes
powerPreference: "high-performance", without it the context gets created fine. I'm reluctant to change this, as this might negatively affect many users. But you can probably use an user script (tampermonkey extension, etc.) to monkey-patch HTMLCanvasElement.getContext function and remove the flag. -
@Petros-Moisiadis On the other hand, patch for this is line 4 lines of code, so I'll put it in, but no promises on when it makes it to production. It probably won't make it into the next release, but possibly the one after that.
-
@kubapelc thank you for your investigation and willingness to implement a patch! To be honest, I am no more in any hurry for you to have this released soon. This is because what I was initially thinking that fixed the flickering issues on Chromium I mentioned in my first report was not enabling of the Vulkan backend, but disabling WebGL altogether, since that was what actually happened by enabling just the #default-angle-vulkan flag first. By enabling next the other two flags too, so really changing to the Vulkan backend, the flickering issues reappeared. However, I have found another workaround, by changing a setting of the Plasma desktop environment I am using on Linux (Plasm was recently upgraded to 6.8 and the issues appeared).
Nevertheless, I think it was fortunate that this helped us discover that Windy wouldn't work with this specific configuration of Chromium's ANGLE engine, and it would be nice to have a workaround in one of the following releases for those who change to that configuration (maybe someday it becomes the default for Chromium on Linux). That said, perhaps it makes sense to report this to the ANGLE project. Maybe your workaround will not be necessary if that
powerPreference: "high-performance"option being passed when creating a WebGL context becomes supported in the Vulkan backend of ANGLE.