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

Make GLES DeviceType unknown by default #2647

Merged
merged 2 commits into from
May 12, 2022
Merged
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
2 changes: 1 addition & 1 deletion wgpu-core/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {

let preferred_gpu = match desc.power_preference {
PowerPreference::LowPower => integrated.or(other).or(discrete).or(virt).or(cpu),
PowerPreference::HighPerformance => discrete.or(other).or(integrated).or(virt).or(cpu),
PowerPreference::HighPerformance => discrete.or(integrated).or(other).or(virt).or(cpu),
};

let mut selected = preferred_gpu.unwrap_or(0);
Expand Down
3 changes: 2 additions & 1 deletion wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl super::Adapter {
// opengl has no way to discern device_type, so we can try to infer it from the renderer string
let strings_that_imply_integrated = [
" xpress", // space here is on purpose so we don't match express
"amd renoir",
"radeon hd 4200",
"radeon hd 4250",
"radeon hd 4290",
Expand Down Expand Up @@ -134,7 +135,7 @@ impl super::Adapter {
} else if strings_that_imply_cpu.iter().any(|&s| renderer.contains(s)) {
wgt::DeviceType::Cpu
} else {
wgt::DeviceType::DiscreteGpu
wgt::DeviceType::Other
};

// source: Sascha Willems at Vulkan
Expand Down