About Skia Graphite Dawn !

310 views
Skip to first unread message

soh...@chromium.org

unread,
Jan 30, 2024, 10:22:20 AM1/30/24
to skia-discuss
Hi ! 

On the back of the earlier request for the Graphite arch , here are some Q's if they make sense,

Is Skia-Graphite only to be used with dawn in all platforms except Mac ?
Dawn being a WebGPU standard implementation, how does it help Skia-Graphite performance ? Or is it primarily for cross platform usage via D3D12(on Windows) and Vulkan (on Linux, Android etc.) ?

What is the performance improvement when switching to GraphiteVk from GaneshVk, especially for Chromium use-cases. Thread-safety and Parallelization ? Anything else ? 
Do we have some publicly available benchmarking data ?

Br,
Sohan

Greg Daniel

unread,
Jan 31, 2024, 9:21:40 AM1/31/24
to skia-d...@googlegroups.com
Unfortunately we don't currently have many or any(?) good public docs for Graphite, sorry.

The Dawn backend for Graphite is meant to be used on all platforms including Mac. Mac is actually the first platform we're mostly testing and looking to launch on. But it will eventually also work with D3D11/12, Vulkan, and GLES 2.0/3.0+.

In terms of performance it really depends on the content and what you're trying to improve. Immediately out of the box when ready, Graphite will mostly be on par for path rendering with Ganesh if you were using the latest dmsaa path renderers in Ganesh. There are some other improvements mostly from just being more streamlined code. Long term Graphite will allow performance gains from a few major things. The ability to take easier advantage of newer features on "modern" apis (vulkan, d3d12, metal), ability to record command buffers (i.e. Recordings) on multiple threads, the ability to replay Recordings, taking advantage of compute work on the GPU, and easier ability to pre-compile shaders (at run time) to avoid compilation jank in the middle of execution.

--
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/181ba0e8-d2e6-44a7-9df8-bf0b5d0f4302n%40googlegroups.com.

Sohan Jyoti Ghosh

unread,
Feb 1, 2024, 3:59:42 AM2/1/24
to skia-d...@googlegroups.com
Thank you for the insight. It helps.
From the browser/Chromium perspective, we have been using motionmark. Although sometimes Graphite-Dawn-Vk scores are 20% better than Ganesh-Vk, sometimes they are lower as well. Testing on a Pixel6 Pro (Mali-G78).Is there some public benchmark data for the Graphite back-end ?

Br,
Sohan

Greg Daniel

unread,
Feb 1, 2024, 9:22:43 AM2/1/24
to skia-d...@googlegroups.com
I'm not sure what benchmarks are easily discoverable/public on the Chrome side of things, you'd be best trying to ask the Chrome team to see if they have things they could point at. On Skia you can try searching https://perf.skia.org/e/ for our various Graphite perf traces. But to be honest those are mostly meant for developers to look at and even once you figure out the right filters to find things of interest, these tests are not necessarily trivial to make general assertions about performance unless you have a good understanding of what you're looking at.

From my personal point of view, I would not use motionmark as a bench of how well any browser performs. Those tests are not even close to representing real work content you see on the web. Over focus on motionmark can cause you to optimize for the 0.5% while hurting the 99.5%. Now it is interesting to look at occasionally to see if there is any low hanging fruit for improving the extreme corner cases, but don't let motionmark be your overall target. Now saying all that, Graphite is intended to be on par with Ganesh (or more likely better)  when it first launches. But after launch and we can start taking advantage of many of the new features Graphite enables as described above, I expect we'll see much larger gains. It is not surprising that running Dawn Vulkan shows some regressions as there hasn't been much focus on that backend yet and there are some known missing features that would drastically hurt motionmark. For example, Dawn Graphite currently has no performant way to read the current destination pixel value in the fragment shader in order to do custom blending. So we end up on an extremely slow path to handle things with advanced blend modes which I believe at least one of the motionmark tests use.

Sohan Jyoti Ghosh

unread,
Feb 1, 2024, 11:01:40 AM2/1/24
to skia-d...@googlegroups.com
Thanks for the hints and thoughts ! They are really helpful. I have asked in the Chromium group.

Maybe something related to the choice of Dawn back-end for Graphite ? Was going via Dawn needed to support webGPU(via Canvaskit?) ? Or re-using some shader pre-compile optimization?

Br,
Sohan

Reply all
Reply to author
Forward
0 new messages