Open jthegedus opened 2 years ago
Based on the error message, maybe we could find one that's in the supported list on the current system, and choose that? 🤔
I don't know that implications of changing that value though. 😅
@jthegedus can you try sudo ubuntu-drivers autoinstall
? That fixed the error for me albeit with an Nvidia graphics card.
I'll try to show my suggestion when that error occurs.
I have the same issue on Debian + KDE. (My system lists the same supported formats). I'm also using an AMD CPU with integrated graphics (AMD Ryzen 5 5600G with Radeon Graphics)
This appears to be a bug in mesa.
Fixing this on your end could take some time.
I don't think we can fix this on our end because we need a specific TextureFormat
to render colors correctly, accepting any available TextureFormat
could produce very strange colors in the editor.
Another note: the editor is an early work in progress, current editing functionality is very minimal.
Fix options: Option 1 (changing the source code): You can apply the following change in editor/src/editor/main.rs:
- let render_format = wgpu::TextureFormat::Bgra8Unorm;
+ let render_format = wgpu::TextureFormat::Rgba8UnormSrgb;
This will likely make the colors look different though. See BUILDING_FROM_SOURCE.md to set up building.
Option 2 (updating mesa):
Fair warning; updating graphics drivers can "break" them, it is possible that attempting this could leave you only with the option to log in with the terminal (using Ctrl+Alt+F1
or Ctrl+Alt+F2
). In this case a complete re-install of the OS is often the easiest fix. So I recommend having everything important backed up.
If you still want to try this, execute the following commands:
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update
sudo apt upgrade -y
I got this error when building the editor on PopOS 21.04 system:
Replacing with one of the values in the "supported formats" list got it working for me:
https://github.com/rtfeldman/roc/blob/5b19337089a8f6f9dbcb51a282802f89496528d8/editor/src/editor/main.rs#L106
Unfortunately I do now know Rust or GPU libs well enough to contribute the correct cross-platform fix for this.