log unknown vendor id

This commit is contained in:
Junkui Zhang 2025-07-29 16:03:59 +08:00
parent 741b38f906
commit a1f03ee42c
2 changed files with 2 additions and 3 deletions

View file

@ -236,7 +236,6 @@ impl DirectXAtlasState {
let textures = match id.kind {
crate::AtlasTextureKind::Monochrome => &self.monochrome_textures,
crate::AtlasTextureKind::Polychrome => &self.polychrome_textures,
// crate::AtlasTextureKind::Path => &self.path_textures,
};
textures[id.index as usize].as_ref().unwrap()
}

View file

@ -549,13 +549,13 @@ impl DirectXRenderer {
0x10DE => "NVIDIA Corporation".to_string(),
0x1002 => "AMD Corporation".to_string(),
0x8086 => "Intel Corporation".to_string(),
_ => "Unknown Vendor".to_string(),
id => format!("Unknown Vendor (ID: {:#X})", id),
};
let driver_version = match desc.VendorId {
0x10DE => nvidia::get_driver_version(),
0x1002 => amd::get_driver_version(),
0x8086 => intel::get_driver_version(&self.devices.adapter),
_ => Err(anyhow::anyhow!("Unknown vendor detected.")),
id => Err(anyhow::anyhow!("Unknown vendor detected (ID: {:#X}).", id)),
}
.context("Failed to get gpu driver info")
.log_err()