Skip to content

Commit

Permalink
fix: detect rt availability when checking gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAPenguin0 committed Sep 1, 2023
1 parent c4ec598 commit 2a1e539
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/physical_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ impl PhysicalDevice {
}
}

// If raytracing is enabled, check if rt extensions are supported
if settings.raytracing {
if physical_device.extension_properties.iter().all(|ext| {
ext.name != ash::extensions::khr::RayTracingPipeline::name().to_str().unwrap()
&& ext.name != ash::extensions::khr::AccelerationStructure::name().to_str().unwrap()
}) {
return None;
}
}

// Check if all requested extensions are present
if !settings
.gpu_requirements
Expand Down

0 comments on commit 2a1e539

Please sign in to comment.