wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

Tracking Issue for Wgpu on Raspberry Pi 4

Open cwfitzgerald opened this issue 5 years ago • 5 comments

Description

Summary of all current issues and todos for a seamless raspbery pi 4 experience. Most of these will be driver issues and will also be found on https://github.com/gfx-rs/wgpu/wiki/Known-Driver-Issues. Links to upstream issues will be added as they are filed.

Unless listed otherwise, this was tested on mesa commit a1976e1cb2d817a4d5229994b83c87d82485af9b.

Shadow

There is sporatic corruption of the shadows that pops in weird ways. Video here: https://cwfitz.com/zFpfee.mp4.

Upstream bug filed: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3916

Water

Water works fine until you resize it, then the water looks to have some sort of block-based corruption. If you get lucky when you resize it'll go back to normal. This might be caused by https://github.com/gfx-rs/wgpu-rs/issues/665 as the issue doesn't show up on a pre gfx-master version of wgpu.

Cube

Cube works correctly most of the time, but random frames will have the vertex order reversed so the lines go the other way through the square faces.

cwfitzgerald avatar Dec 03 '20 01:12 cwfitzgerald

I am currently (master, Dec 15 2022) on Pi4 seeing:

'No suitable GPU adapters found on the system!'

Am I right in assuming this is the correct open issue to track?

andrewdavidmackenzie avatar Dec 15 '22 12:12 andrewdavidmackenzie

It is, but if you have a vulkan implementation it should at least find an adapter.

cwfitzgerald avatar Dec 15 '22 23:12 cwfitzgerald

sudo apt install vulkan-tools mesa-vulkan-drivers will now install the vulkan drivers on raspberry pi os. If you run a vulkan using program it'll print a message as it loads that technically the driver isn't fully conformant and it's for testing only, but the program will render.

I didn't test any of the examples from this repo specifically (i was checking out the minimal-winit example from pixels, which uses wgpu). If you want I can possibly check more soon.

Lokathor avatar Jan 28 '23 05:01 Lokathor

Indeed, pixels does work on the Raspberry Pi 4 as mentioned, after installing the Vulkan V3D driver, but I cannot get the built-in examples from WGPU to run.

The following error is typical:

WARNING: v3dv is neither a complete nor a conformant Vulkan implementation. Testing use only.
Using V3D 4.2 (Vulkan)
[2023-05-25T13:39:35Z ERROR wgpu::backend::direct] Error in Adapter::request_device: Not enough memory left
thread 'main' panicked at 'Unable to find a suitable GPU adapter!: RequestDeviceError', wgpu/examples/cube/../framework.rs:236:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The Not enough memory part seems important. I have tried running this on both a standard 4GB Pi 4 as well as an 8GB model - both with GPU RAM set to 256MB rather than the default 64MB. Same error on both.

anselanza avatar May 25 '23 13:05 anselanza

These errors only occur on v0.16.0 and v0.16.1.

If I check out v0.15, the same version Pixels appears to depend on, then the built-in WGPU examples do indeed run using Vulkan on the Pi 4.

anselanza avatar May 25 '23 14:05 anselanza

As there's no active work in this space, I'm going to close this issue. If someone wants to re-own this, please file a new tracking issue with up to date todos.

cwfitzgerald avatar Dec 11 '24 22:12 cwfitzgerald