Fixing the teapot example on ArchLinux (GTX 1650). (#1594)

This commit is contained in:
Nicolas Patry 2021-05-30 22:53:42 +02:00 committed by GitHub
parent f4b189792a
commit 28637e8c67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,6 @@ fn main() {
let surface = WindowBuilder::new()
.build_vk_surface(&event_loop, instance.clone())
.unwrap();
let dimensions: [u32; 2] = surface.window().inner_size().into();
let queue_family = physical
.queue_families()
@ -77,11 +76,13 @@ fn main() {
.unwrap();
let queue = queues.next().unwrap();
let dimensions: [u32; 2] = surface.window().inner_size().into();
let (mut swapchain, images) = {
let caps = surface.capabilities(physical).unwrap();
let format = caps.supported_formats[0].0;
let composite_alpha = caps.supported_composite_alpha.iter().next().unwrap();
let dimensions: [u32; 2] = surface.window().inner_size().into();
Swapchain::start(device.clone(), surface.clone())
.num_images(caps.min_image_count)