Skip to content

Commit

Permalink
disable validation on linux (broken on wgpu 0.20 for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Jul 11, 2024
1 parent 7d26de0 commit ac8b840
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion engine/src/gfx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,21 @@ impl GfxContext {
backends = Backends::VULKAN;
}

let mut flags = if cfg!(debug_assertions) {
// TODO: re enable validation when https://github.com/gfx-rs/wgpu/issues/5231 is fixed
wgpu::InstanceFlags::DEBUG
} else {
wgpu::InstanceFlags::empty()
};

if cfg!(target_os = "windows") {
flags = flags | wgpu::InstanceFlags::VALIDATION
}

let instance = wgpu::Instance::new(InstanceDescriptor {
backends,
dx12_shader_compiler: Default::default(),
flags: wgpu::InstanceFlags::default() | wgpu::InstanceFlags::DEBUG,
flags,
gles_minor_version: wgpu::Gles3MinorVersion::Automatic,
});

Expand Down

0 comments on commit ac8b840

Please sign in to comment.