mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 00:33:51 +00:00
halmark: change instance flags
This commit is contained in:
parent
7c61fa481f
commit
e21e9c838c
@ -79,7 +79,11 @@ impl<A: hal::Api> Example<A> {
|
||||
fn init(window: &winit::window::Window) -> Result<Self, hal::InstanceError> {
|
||||
let instance_desc = hal::InstanceDescriptor {
|
||||
name: "example",
|
||||
flags: hal::InstanceFlag::all(),
|
||||
flags: if cfg!(debug_assertions) {
|
||||
hal::InstanceFlag::all()
|
||||
} else {
|
||||
hal::InstanceFlag::empty()
|
||||
},
|
||||
};
|
||||
let instance = unsafe { A::Instance::init(&instance_desc)? };
|
||||
let mut surface = unsafe { instance.create_surface(window).unwrap() };
|
||||
@ -101,7 +105,7 @@ impl<A: hal::Api> Example<A> {
|
||||
|
||||
let window_size: (u32, u32) = window.inner_size().into();
|
||||
let surface_config = hal::SurfaceConfiguration {
|
||||
swap_chain_size: 2,
|
||||
swap_chain_size: 3,
|
||||
present_mode: wgt::PresentMode::Fifo,
|
||||
composite_alpha_mode: hal::CompositeAlphaMode::Opaque,
|
||||
format: wgt::TextureFormat::Bgra8UnormSrgb,
|
||||
|
Loading…
Reference in New Issue
Block a user