-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix WSL support, update troubleshooting guide #8610
Conversation
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
Latest documentation preview deployed successfully.
Note: This comment is updated whenever you push a commit. |
// We avoid doing anything wonky with surfaces anyways, so we won't hit this. | ||
.intersection(wgpu::DownlevelFlags::SURFACE_VIEW_FORMATS.complement()) | ||
// Lack means we only get 2^24-1 indices for drawing. | ||
// Typically we don't reach this limit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum. excellent question. I'll find out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to be undefined behavior, couldn't find anything on it.
Clairifed comment though a bit: This is not the number of indices but the value for the indices, i.e. the vertex count is limited to 16.8mio if this flag is not present on the adapter
Related
WgpuSetup
,egui_kittest
now prefers software rasterizers for testing emilk/egui#5506What
What's broken
Since Rerun 0.19 we picking in 2D & 3D view was broken & accompanied by log spam.
The reason we failed 0.19+ is unknown but likely either that something caused us picking the "webgl-like" compatibility tier or a change in wgpu no longer allows us to texture copy depth buffers.
Rerun 0.21 then broke startup entirely. This happens due to two distinct problems
This Fix
I decided to move forward more aggressively in a manner that leaves all these intertwined issues behind and sets us up better for simpler & more advanced rendering in the future:
-> As a result we can draw with Vulkan rather than a (typically) outdated GL driver which is in line with us moving slowly towards WebGPU support as the minspec.
(See code comments for remaining weirdness ;-))
Turns out another benefit with this is that multi-gpu setups behave like on the host now: Previously,
MESA_D3D12_DEFAULT_ADAPTER_NAME
had to be set to pick which adapter is used. Now all adapters are passed through WSL correctly, meaning that our regular adapter selection logic (which is to be further improved) works fine, i.e. it prefers discrete over integrated GPU unlessWGPU_POWER_PREF=low
is set.Tested on WSL with
previous tests indicate that Ubuntu 20 should behave similar to 22.
Future work
Currently, there's a little bit of not super straight forward logging left from wgpu, warning about the wild GPU setup, but I actually feel better leaving this in for now - after all the WSL rendering stack is still rather adventurous and we should keep encouraging using the host system directly.
(what does bug me is the duplicated messages, may hint at some issues in either wgpu or our init dance... but that's a story for another time)