drm: include st_rdev in Drm object
This commit is contained in:
parent
9a084a53aa
commit
b754e37bfe
9 changed files with 41 additions and 34 deletions
|
|
@ -91,8 +91,6 @@ pub enum VulkanError {
|
|||
CreateInstance(#[source] vk::Result),
|
||||
#[error("Could not create a debug-utils messenger")]
|
||||
Messenger(#[source] vk::Result),
|
||||
#[error("Could not fstat the DRM FD")]
|
||||
Fstat(#[source] OsError),
|
||||
#[error("Could not enumerate the physical devices")]
|
||||
EnumeratePhysicalDevices(#[source] vk::Result),
|
||||
#[error("Could not find a vulkan device that matches dev_t {0}")]
|
||||
|
|
|
|||
|
|
@ -104,11 +104,7 @@ impl VulkanInstance {
|
|||
}
|
||||
|
||||
fn find_dev(&self, drm: &Drm) -> Result<PhysicalDevice, VulkanError> {
|
||||
let stat = match uapi::fstat(drm.raw()) {
|
||||
Ok(s) => s,
|
||||
Err(e) => return Err(VulkanError::Fstat(e.into())),
|
||||
};
|
||||
let dev = stat.st_rdev;
|
||||
let dev = drm.dev();
|
||||
log::log!(
|
||||
self.log_level,
|
||||
"Searching for vulkan device with devnum {}:{}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue