Did the version of WebGL or OpenGL change for Skia between milestones 85 and 104?

165 views
Skip to first unread message

craste...@gmail.com

unread,
Sep 7, 2023, 8:54:15 PM9/7/23
to skia-discuss
Did the version of WebGL or OpenGL change for Skia between milestones 85 and 104?
(this is about WebAssembly Skia)

In my office, we have an older Mac laptop with an AMD Radeon GPU and the upgrade from 85 to 104 caused that machine to drop in performance by a factor of 10.  Which makes me think that it is using the CPU, while other computers are using the GPU.

But I can't test or prove that theory.

Is there some way to find out what that machine is doing?

The release notes for m89 included this bullet-point:

- Numerous changes to SkRuntimeEffect, aligning the capabilities and restrictions with The OpenGL ES Shading Language 1.00 (aka, the shading language of OpenGL ES2 and WebGL 1.0). All built-in functions from sections 8.1 through 8.6 implemented & tested on all backends. Removed types and features that require newer versions of GLSL: https://review.skia.org/346657 [Non-square matrices] https://review.skia.org/347046 [uint, short, ushort, byte, ubyte] https://review.skia.org/349056 [while and do-while loops] https://review.skia.org/350030 [Bitwise operators and integer remainder]

John Stiles

unread,
Sep 8, 2023, 9:52:34 AM9/8/23
to skia-d...@googlegroups.com
I don't think that release note is causing your issue—this was more about making sure that Runtime Effect capabilities aligned properly with baseline GLSL ES2 capabilities. If this were an issue, you would see your custom SkRuntimeEffect shaders failing at MakeShader with compile errors—you wouldn't see a precipitous drop in performance.

See if you can diagnose the root cause with Chrome's performance devtools:
https://developer.chrome.com/docs/devtools/performance/

This should at least give you some clues for further digging.

--
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/77dd7d69-49ad-4fef-b6c0-64beb5b1cf40n%40googlegroups.com.

craste...@gmail.com

unread,
Sep 8, 2023, 12:44:19 PM9/8/23
to skia-discuss
I also updated my version of emscripten and had added the build flag "-s USE_WEBGL2=1" and I think this might be the thing that caused this older machine to use a CPU emulator.  Do you know if there is a way to interrogate that machine to see if it is capable of handling WebGL 2?

Brian Osman

unread,
Sep 8, 2023, 1:02:29 PM9/8/23
to skia-d...@googlegroups.com
If you open chrome://gpu/ in chrome, you can see the support status of both WebGL and WebGL2 (in the top block of "major" features - it's like the 13th line).

John Stiles

unread,
Sep 8, 2023, 1:05:00 PM9/8/23
to skia-d...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages