mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
fix(android,vulkan): forcibly convert to u64 in *devid checks
This commit is contained in:
committed by
Connor Fitzgerald
parent
6f65d3db2a
commit
61eda14256
@@ -73,7 +73,13 @@ impl super::Instance {
|
||||
let render_devid =
|
||||
libc::makedev(drm_props.render_major as _, drm_props.render_minor as _);
|
||||
|
||||
if [primary_devid, render_devid].contains(&drm_stat.st_rdev) {
|
||||
// Various platforms use different widths between `dev_t` and `c_int`, so just
|
||||
// force-convert to `u64` to keep things portable.
|
||||
#[allow(clippy::useless_conversion)]
|
||||
if [primary_devid, render_devid]
|
||||
.map(u64::from)
|
||||
.contains(&drm_stat.st_rdev)
|
||||
{
|
||||
physical_device = Some(device)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user