Add comments about attachment image problem

This commit is contained in:
Pierre Krieger 2017-05-21 20:08:25 +02:00
parent d8149a33d1
commit b5be7a7d86
2 changed files with 6 additions and 0 deletions

View File

@ -787,6 +787,8 @@ unsafe impl<I> CommandBuffer for SubmitSyncLayer<I> where I: CommandBuffer {
Err(err) => err
};
// FIXME: this is bad because dropping the submit sync layer doesn't drop the
// attachments of the framebuffer, meaning that they will stay locked
match (img.try_gpu_lock(entry.exclusive, queue), prev_err) {
(Ok(_), _) => (),
(Err(err), AccessCheckError::Unknown) => return Err(err.into()),

View File

@ -238,6 +238,8 @@ unsafe impl<F, A> ImageAccess for AttachmentImageAccess<F, A>
#[inline]
fn try_gpu_lock(&self, _: bool, _: &Queue) -> Result<(), AccessError> {
// FIXME: uncomment when it's working
// the problem is in the submit sync layer which locks framebuffer attachments and
// keeps them locked even after destruction
Ok(())
/*if self.already_locked.swap(true, Ordering::SeqCst) == true {
return false;
@ -249,6 +251,8 @@ unsafe impl<F, A> ImageAccess for AttachmentImageAccess<F, A>
#[inline]
unsafe fn increase_gpu_lock(&self) {
// FIXME: uncomment when it's working
// the problem is in the submit sync layer which locks framebuffer attachments and
// keeps them locked even after destruction
/*debug_assert!(self.already_locked.load(Ordering::SeqCst));
let val = self.img.gpu_lock.fetch_add(1, Ordering::SeqCst);
debug_assert!(val >= 1);*/