Skip to content

Enumerate adapters? #2022

Answered by cwfitzgerald
toloudis asked this question in Q&A
Oct 5, 2021 · 3 comments · 4 replies
Discussion options

You must be logged in to vote

enumerate_adapters is exactly the function you should be using. You get a iterator of adapters which you can then use to get information Adapter::features Adapter::limits Adapter::get_info etc. From there you can decide on an adapter and call request_device on it.

We use it as part of our user space utilities: https://github.com/gfx-rs/wgpu/blob/master/wgpu/src/util/init.rs#L40-L59 selects an adapter based on its name.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by cwfitzgerald
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@cwfitzgerald
Comment options

@kvark
Comment options

@toloudis
Comment options

@cwfitzgerald
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants