Add Flush to GL Queue::submit (#6941)

This commit is contained in:
Connor Fitzgerald 2025-01-18 15:02:42 -05:00 committed by GitHub
parent 3b3e1939f9
commit dcdb10348b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1860,6 +1860,11 @@ impl crate::Queue for super::Queue {
.map_err(|_| crate::DeviceError::OutOfMemory)?; .map_err(|_| crate::DeviceError::OutOfMemory)?;
signal_fence.pending.push((signal_value, sync)); signal_fence.pending.push((signal_value, sync));
// This is extremely important. If we don't flush, the above fences may never
// be signaled, particularly in headless contexts. Headed contexts will
// often flush every so often, but headless contexts may not.
unsafe { gl.flush() };
Ok(()) Ok(())
} }