mirror of https://github.com/tracel-ai/burn.git
no wgpu validation layer when not(test)
This commit is contained in:
parent
5bbc5ea944
commit
6f6b3bcc01
|
@ -182,9 +182,17 @@ async fn select_adapter<G: GraphicsApi>(_device: &WgpuDevice) -> wgpu::Adapter {
|
|||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
fn select_adapter<G: GraphicsApi>(device: &WgpuDevice) -> wgpu::Adapter {
|
||||
use wgpu::DeviceType;
|
||||
use wgpu::{DeviceType, InstanceFlags};
|
||||
|
||||
let instance = wgpu::Instance::default();
|
||||
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
|
||||
backends: G::backend().into(),
|
||||
#[cfg(test)]
|
||||
flags: InstanceFlags::debugging(),
|
||||
#[cfg(not(test))]
|
||||
flags: InstanceFlags::empty(),
|
||||
dx12_shader_compiler: wgpu::Dx12Compiler::default(),
|
||||
gles_minor_version: wgpu::Gles3MinorVersion::default(),
|
||||
});
|
||||
let mut adapters_other = Vec::new();
|
||||
let mut adapters = Vec::new();
|
||||
|
||||
|
|
Loading…
Reference in New Issue