-
Notifications
You must be signed in to change notification settings - Fork 373
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
Allow controlling the graphics backend & power preference through standard wgpu env vars #1332
Conversation
Yes, this means we're pretty much down to the default. At least this gives a nice place for all these comments.
// * Some Windows VMs only provide DX12 drivers, observed with Parallels on Apple Silicon | ||
// * May run into Linux issues that warrant trying out the GL backend. | ||
// | ||
// For changing the backend we use standard wgpu env var, i.e. WGPU_BACKEND. |
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.
The wgpu docs are quite lacking here in what WGPU_BACKEND
expects, but reading the code it seems like it would be:
WGPU_BACKEND=gl,metal
?
Please add a comment here so that the next reader can just use the env-var instead of having to dig into the wgpu code!
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.
oh. yes I'll sneak that in some future PR. Also I'll create a PR for our troubleshooting doc page.
For everyone stumbling in here. This makes us support:
WGPU_BACKEND
with a comma separated list of the backends you want to use: vulkan
, metal
, dx12
, dx11
, or gl
).
WGPU_POWER_PREF
with the power preference to choose when a specific adapter name isn't specified - high
or low
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.
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.
This PR introduces two new environment variables that control the behavior of Rerun:
WGPU_BACKEND
and WGPU_POWER_PREF
.
We should document them!
It would make sense to me if rerun --help
would list them, and that's indeed where RERUN_TRACK_ALLOCATIONS
is already documented (in crates/rerun/src/run.rs
). Please add the above environment variables to that list, and maybe throw in RERUN
while your at it, since we seems to have forgotten that one :)
Didn't realize that these env-vars are opt-ins from
wgpu::util
(kinda makes sense thinking about it!)This might help us with troubleshooting in tickets like #1324
Depicted is my Ubuntu vm running with GL - note how this completely meses up gamma handling -.-
Checklist
CHANGELOG.md
(if this is a big enough change to warrant it)