Trait wgpu_hal::Queue

source ·
pub trait Queue: WasmNotSendSync {
    type A: Api;

    // Required methods
    unsafe fn submit(
        &self,
        command_buffers: &[&<Self::A as Api>::CommandBuffer],
        surface_textures: &[&<Self::A as Api>::SurfaceTexture],
        signal_fence: Option<(&mut <Self::A as Api>::Fence, FenceValue)>
    ) -> Result<(), DeviceError>;
    unsafe fn present(
        &self,
        surface: &<Self::A as Api>::Surface,
        texture: <Self::A as Api>::SurfaceTexture
    ) -> Result<(), SurfaceError>;
    unsafe fn get_timestamp_period(&self) -> f32;
}

Required Associated Types§

source

type A: Api

Required Methods§

source

unsafe fn submit( &self, command_buffers: &[&<Self::A as Api>::CommandBuffer], surface_textures: &[&<Self::A as Api>::SurfaceTexture], signal_fence: Option<(&mut <Self::A as Api>::Fence, FenceValue)> ) -> Result<(), DeviceError>

Submits the command buffers for execution on GPU.

Valid usage:

  • All of the CommandBuffers were created from CommandEncoders that are associated with this queue.

  • All of those CommandBuffers must remain alive until the submitted commands have finished execution. (Since command buffers must not outlive their encoders, this implies that the encoders must remain alive as well.)

  • All of the SurfaceTextures that the command buffers write to appear in the surface_textures argument.

source

unsafe fn present( &self, surface: &<Self::A as Api>::Surface, texture: <Self::A as Api>::SurfaceTexture ) -> Result<(), SurfaceError>

source

unsafe fn get_timestamp_period(&self) -> f32

Implementors§

source§

impl Queue for Context

§

type A = Api

source§

impl Queue for wgpu_hal::gles::Queue

Available on gles only.
§

type A = Api

source§

impl Queue for wgpu_hal::vulkan::Queue

Available on vulkan only.
§

type A = Api