Closed nia-e closed 1 year ago
I too have come across this issue. On bevy main (https://github.com/bevyengine/bevy/commit/de677dbfc9dacf1724367024fc1965dae27325a4).
The output of cargo run --release --features wayland --example bevymark
:
INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce GTX 1050 Ti", vendor: 4318, device: 7298, device_type: DiscreteGpu, backend: Vulkan }
thread 'main' panicked at 'Error in Surface::configure: requested format Bgra8UnormSrgb is not in list of supported formats: [Bgra8Unorm]', /home/zen/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs:214:9
I believe that this issue should be labeled C-Crash too.
I've also experienced this issue, I'm using Fedora 36 with an NVIDIA RTX 2070 SUPER. Enabling the wayland feature gives me the same error.
What problem does this solve or what need does it fill?
The current
bevy_render
crate assumes the supported texture format based on OS. This may lead to issues, e.g. Nvidia on Wayland not supporting the expectedBgra8UnormSrgb
format (only supportingBgra8Unorm
).What solution would you like?
Perform platform-independent querying of supported texture formats in swapchain, with a preferred one then being picked for
Surface:: configure
.What alternative(s) have you considered?
(In my case) using Xwayland by disabling the
wayland
feature works, but causes blurriness with fractional scaling.Additional context
My current (incomplete) fix can be found at https://github.com/a-b-c-1-2-3/bevy on branch
support-non-srgb
, but this only allows for a feature to disable sRGB, not proper runtime querying of supported formats.