Reenable per swapchain check in SubmitPresentBuilder::submit (#1088)

There was a comment complaining that an AMD driver (which one? there are
three) was not setting the pResults.
I made this a non issue by replacing mem::uninitilized() with 0.
This commit is contained in:
Lucas Kent 2018-10-27 00:20:42 +11:00 committed by GitHub
parent 869c486053
commit d8d5b58c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,6 @@ use smallvec::SmallVec;
use std::error; use std::error;
use std::fmt; use std::fmt;
use std::marker::PhantomData; use std::marker::PhantomData;
use std::mem;
use std::ptr; use std::ptr;
use device::DeviceOwned; use device::DeviceOwned;
@ -158,7 +157,7 @@ impl<'a> SubmitPresentBuilder<'a> {
} }
}; };
let mut results = vec![mem::uninitialized(); self.swapchains.len()]; // TODO: alloca let mut results = vec![vk::SUCCESS; self.swapchains.len()];
let vk = queue.device().pointers(); let vk = queue.device().pointers();
let queue = queue.internal_object_guard(); let queue = queue.internal_object_guard();
@ -179,10 +178,9 @@ impl<'a> SubmitPresentBuilder<'a> {
check_errors(vk.QueuePresentKHR(*queue, &infos))?; check_errors(vk.QueuePresentKHR(*queue, &infos))?;
// TODO: AMD driver initially didn't write the results ; check that it's been fixed for result in results {
//for result in results { check_errors(result)?;
//try!(check_errors(result)); }
//}
Ok(()) Ok(())
} }