mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2024-12-27 21:58:18 +01:00
Remove no vulkan flag
This commit is contained in:
parent
37537d1b3b
commit
b5892d195d
1 changed files with 42 additions and 57 deletions
|
@ -165,12 +165,9 @@ pub fn run_udev() -> anyhow::Result<()> {
|
|||
// Initialize session
|
||||
let (session, notifier) = LibSeatSession::new()?;
|
||||
|
||||
// Initialize the compositor
|
||||
let primary_gpu = if let Ok(var) = std::env::var("ANVIL_DRM_DEVICE") {
|
||||
DrmNode::from_path(var).expect("Invalid drm device path")
|
||||
} else {
|
||||
udev::primary_gpu(&session.seat())
|
||||
.unwrap()
|
||||
// Get the primary gpu
|
||||
let primary_gpu = udev::primary_gpu(&session.seat())
|
||||
.expect("unable to get primary gpu path")
|
||||
.and_then(|x| {
|
||||
DrmNode::from_path(x)
|
||||
.ok()?
|
||||
|
@ -183,8 +180,7 @@ pub fn run_udev() -> anyhow::Result<()> {
|
|||
.into_iter()
|
||||
.find_map(|x| DrmNode::from_path(x).ok())
|
||||
.expect("No GPU!")
|
||||
})
|
||||
};
|
||||
});
|
||||
tracing::info!("Using {} as primary gpu.", primary_gpu);
|
||||
|
||||
let gpu_manager = GpuManager::new(GbmGlesBackend::default()).unwrap();
|
||||
|
@ -274,7 +270,6 @@ pub fn run_udev() -> anyhow::Result<()> {
|
|||
anyhow::bail!("Failed to insert libinput_backend into event loop: {err}");
|
||||
}
|
||||
|
||||
let handle = event_loop.handle();
|
||||
event_loop
|
||||
.handle()
|
||||
.insert_source(notifier, move |event, &mut (), data| {
|
||||
|
@ -312,7 +307,9 @@ pub fn run_udev() -> anyhow::Result<()> {
|
|||
// otherwise
|
||||
surface.compositor.reset_buffers();
|
||||
}
|
||||
handle.insert_idle(move |data| data.state.render(node, None));
|
||||
data.state
|
||||
.loop_handle
|
||||
.insert_idle(move |data| data.state.render(node, None));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -326,16 +323,6 @@ pub fn run_udev() -> anyhow::Result<()> {
|
|||
.shm_formats(),
|
||||
);
|
||||
|
||||
let skip_vulkan = std::env::var("ANVIL_NO_VULKAN")
|
||||
.map(|x| {
|
||||
x == "1"
|
||||
|| x.to_lowercase() == "true"
|
||||
|| x.to_lowercase() == "yes"
|
||||
|| x.to_lowercase() == "y"
|
||||
})
|
||||
.unwrap_or(false);
|
||||
|
||||
if !skip_vulkan {
|
||||
if let Ok(instance) = vulkan::Instance::new(Version::VERSION_1_2, None) {
|
||||
if let Some(physical_device) =
|
||||
PhysicalDevice::enumerate(&instance)
|
||||
|
@ -363,7 +350,6 @@ pub fn run_udev() -> anyhow::Result<()> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if udev.allocator.is_none() {
|
||||
tracing::info!("No vulkan allocator found, using GBM.");
|
||||
|
@ -382,7 +368,6 @@ pub fn run_udev() -> anyhow::Result<()> {
|
|||
});
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "egl"), allow(unused_mut))]
|
||||
let mut renderer = udev.gpu_manager.single_renderer(&primary_gpu).unwrap();
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue