Struct wgpu_core::command::RenderBundleEncoder
source · pub struct RenderBundleEncoder {
base: BasePass<RenderCommand>,
parent_id: DeviceId,
pub(crate) context: RenderPassContext,
pub(crate) is_depth_read_only: bool,
pub(crate) is_stencil_read_only: bool,
current_bind_groups: BindGroupStateChange,
current_pipeline: StateChange<RenderPipelineId>,
}
Fields§
§base: BasePass<RenderCommand>
§parent_id: DeviceId
§context: RenderPassContext
§is_depth_read_only: bool
§is_stencil_read_only: bool
§current_bind_groups: BindGroupStateChange
§current_pipeline: StateChange<RenderPipelineId>
Implementations§
source§impl RenderBundleEncoder
impl RenderBundleEncoder
pub fn new( desc: &RenderBundleEncoderDescriptor<'_>, parent_id: DeviceId, base: Option<BasePass<RenderCommand>>, ) -> Result<Self, CreateRenderBundleError>
pub fn dummy(parent_id: DeviceId) -> Self
pub(crate) fn to_base_pass(&self) -> BasePass<RenderCommand>
pub fn parent(&self) -> DeviceId
sourcepub(crate) fn finish(
self,
desc: &RenderBundleDescriptor<'_>,
device: &Arc<Device>,
hub: &Hub,
) -> Result<Arc<RenderBundle>, RenderBundleError>
pub(crate) fn finish( self, desc: &RenderBundleDescriptor<'_>, device: &Arc<Device>, hub: &Hub, ) -> Result<Arc<RenderBundle>, RenderBundleError>
Convert this encoder’s commands into a RenderBundle
.
We want executing a RenderBundle
to be quick, so we take
this opportunity to clean up the RenderBundleEncoder
’s
command stream and gather metadata about it that will help
keep ExecuteBundle
simple and fast. We remove redundant
commands (along with their side data), note resource usage,
and accumulate buffer and texture initialization actions.
pub fn set_index_buffer( &mut self, buffer_id: BufferId, index_format: IndexFormat, offset: BufferAddress, size: Option<BufferSize>, )
Trait Implementations§
source§impl Debug for RenderBundleEncoder
impl Debug for RenderBundleEncoder
source§impl<'de> Deserialize<'de> for RenderBundleEncoder
impl<'de> Deserialize<'de> for RenderBundleEncoder
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RenderBundleEncoder
impl RefUnwindSafe for RenderBundleEncoder
impl Send for RenderBundleEncoder
impl Sync for RenderBundleEncoder
impl Unpin for RenderBundleEncoder
impl UnwindSafe for RenderBundleEncoder
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
Mutably borrows from an owned value. Read more