Help building skia/canvaskit for webgpu

77 views
Skip to first unread message

Miguel Camba

unread,
Jun 26, 2025, 9:39:48 AM6/26/25
to skia-discuss
I've been trying to try graphite but so far I wasn't able to make it work, so I wonder if there are more detailed instructions on how to do it.

I've created a custom build of canvaskit with ./compile.sh webgpu.
I've created custom builds of canvaskit in the past removing features we didn't use to make it smaller, so this was no issue.

But after I run our app I quickly get an error: TypeError: this._MakeGPUTextureSurface is not a function

This seems to be caused, at first glace, because compiling with the webgpu flag doesn't seem to enable the CK_ENABLE_WEBGPU build flag? I'm guessing here.

Am I doing something obviously wrong? I'm building from the main branch BTW.

Thanks!

Michael Ludwig

unread,
Jun 30, 2025, 9:48:14 AM6/30/25
to skia-discuss
We have not updated CanvasKit to support Graphite yet, although it should be possible to build Graphite with WASM and link it to the browser-provided WebGPU.

Miguel Camba

unread,
Jun 30, 2025, 3:50:09 PM6/30/25
to skia-discuss
This is confusing. My understanding is that the custom build one gets when running `./compile.sh webgpu` was precisely a graphite-enable build of canvaskit. 
Reply all
Reply to author
Forward
0 new messages