Skip to content
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

List Dx12 adapters before vulkan ones #4156

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ By @wumpf in [#4147](https://github.com/gfx-rs/wgpu/pull/4147)

- DX12 doesn't support `Features::POLYGON_MODE_POINT``. By @teoxoy in [#4032](https://github.com/gfx-rs/wgpu/pull/4032).
- Set `Features::VERTEX_WRITABLE_STORAGE` based on the right feature level. By @teoxoy in [#4033](https://github.com/gfx-rs/wgpu/pull/4033).
- Expose DX12 adapters before vulkan ones when enumerating adapters by @nical in [#4156](https://github.com/gfx-rs/wgpu/pull/4156)

#### Metal

Expand Down
18 changes: 9 additions & 9 deletions wgpu-core/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -826,15 +826,6 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
.transpose()?;
let mut device_types = Vec::new();

#[cfg(all(feature = "vulkan", not(target_arch = "wasm32")))]
let (id_vulkan, adapters_vk) = gather(
hal::api::Vulkan,
self.instance.vulkan.as_ref(),
&inputs,
compatible_surface,
desc.force_fallback_adapter,
&mut device_types,
);
#[cfg(all(feature = "metal", any(target_os = "macos", target_os = "ios")))]
let (id_metal, adapters_metal) = gather(
hal::api::Metal,
Expand All @@ -853,6 +844,15 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
desc.force_fallback_adapter,
&mut device_types,
);
#[cfg(all(feature = "vulkan", not(target_arch = "wasm32")))]
let (id_vulkan, adapters_vk) = gather(
hal::api::Vulkan,
self.instance.vulkan.as_ref(),
&inputs,
compatible_surface,
desc.force_fallback_adapter,
&mut device_types,
);
#[cfg(all(feature = "dx11", windows))]
let (id_dx11, adapters_dx11) = gather(
hal::api::Dx11,
Expand Down