pub enum GlFenceBehavior {
Normal,
AutoFinish,
}
Expand description
Dictate the behavior of fences in OpenGL.
Variants§
Normal
Fences in OpenGL behave normally. If you don’t know what to pick, this is what you want.
AutoFinish
Fences in OpenGL are short-circuited to always return true
immediately.
This solves a very specific issue that arose due to a bug in wgpu-core that made
many WebGL programs work when they “shouldn’t” have. If you have code that is trying
to call device.poll(wgpu::Maintain::Wait)
on WebGL, you need to enable this option
for the “Wait” to behave how you would expect.
Previously all poll(Wait)
acted like the OpenGL fences were signalled even if they weren’t.
See https://github.com/gfx-rs/wgpu/issues/4589 for more information.
When this is set Queue::on_completed_work_done
will always return the next time the device
is maintained, not when the work is actually done on the GPU.
Implementations§
source§impl GlFenceBehavior
impl GlFenceBehavior
sourcepub fn is_auto_finish(&self) -> bool
pub fn is_auto_finish(&self) -> bool
Returns true if the fence behavior is AutoFinish
.
Trait Implementations§
source§impl Clone for GlFenceBehavior
impl Clone for GlFenceBehavior
source§fn clone(&self) -> GlFenceBehavior
fn clone(&self) -> GlFenceBehavior
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GlFenceBehavior
impl Debug for GlFenceBehavior
source§impl Default for GlFenceBehavior
impl Default for GlFenceBehavior
source§fn default() -> GlFenceBehavior
fn default() -> GlFenceBehavior
source§impl PartialEq for GlFenceBehavior
impl PartialEq for GlFenceBehavior
impl Copy for GlFenceBehavior
impl Eq for GlFenceBehavior
impl StructuralPartialEq for GlFenceBehavior
Auto Trait Implementations§
impl Freeze for GlFenceBehavior
impl RefUnwindSafe for GlFenceBehavior
impl Send for GlFenceBehavior
impl Sync for GlFenceBehavior
impl Unpin for GlFenceBehavior
impl UnwindSafe for GlFenceBehavior
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)