DioxusLabs / blitz

A radically modular HTML/CSS rendering engine
Apache License 2.0
2.13k stars 42 forks source link

Error: No compatible device found #154

Closed ducan-ne closed 2 weeks ago

ducan-ne commented 3 weeks ago

I’m getting an error when trying to run Blitz (https://github.com/DioxusLabs/blitz) on a server. Are there any native dependencies required to run Blitz? I suspect the issue might be GPU-related, as my server only has CPU.

The error is triggered by this code: https://github.com/DioxusLabs/blitz/blob/5caf93c7a7e1edc24f93f204d0e15593f7be3513/packages/blitz-renderer-vello/src/renderer.rs#L181

nicoburns commented 3 weeks ago

You likely won't be able to run the current version of Blitz on a server that doesn't have a GPU. This is because of our dependency on wgpu (via vello) for rendering. There are two ways in which this could be made to work:

That's definitely something I would like to do long-term. But isn't on our short-term roadmap. I'd be happy to provide pointers if this is something that you would be interested in implementing.

ducan-ne commented 3 weeks ago

I see, server with a GPU is pretty expensive, I'll keep waiting for someone to implement a Skia renderer 😅

nicoburns commented 2 weeks ago

@ducan-ne I've discovered a 3rd approach. Install software GPU emulation:

See https://github.com/linebender/vello/blob/main/.github/workflows/ci.yml#L210

ducan-ne commented 2 weeks ago

hey @nicoburns, thanks it's working it's consuming CPU and memory than I thought but glad to see the code works, I think the Skia backend would be more efficient on using CPUs than GPU emulation.

Should I close this issue now?

nicoburns commented 2 weeks ago

I'm going to close this one, but I've opened https://github.com/DioxusLabs/blitz/issues/157 to track the cpu-renderer feature.