Skip to main content

RenderBundle

Struct RenderBundle 

Source
pub struct RenderBundle {
    pub(crate) state: ResourceState<RenderBundleState>,
    base: BasePass<ArcRenderCommand, Infallible>,
    pub(super) is_depth_read_only: bool,
    pub(super) is_stencil_read_only: bool,
    pub(crate) device: Arc<Device>,
    pub(super) buffer_memory_init_actions: Vec<BufferInitTrackerAction>,
    pub(super) texture_memory_init_actions: Vec<TextureInitTrackerAction>,
    label: String,
    pub(crate) tracking_data: TrackingData,
    discard_hal_labels: bool,
}
Expand description

cbindgen:ignore

Fields§

§state: ResourceState<RenderBundleState>§base: BasePass<ArcRenderCommand, Infallible>§is_depth_read_only: bool§is_stencil_read_only: bool§device: Arc<Device>§buffer_memory_init_actions: Vec<BufferInitTrackerAction>§texture_memory_init_actions: Vec<TextureInitTrackerAction>§label: String

The label from the descriptor used to create the resource.

§tracking_data: TrackingData§discard_hal_labels: bool

Implementations§

Source§

impl RenderBundle

Source

pub(crate) fn state(&self) -> Result<&RenderBundleState, InvalidResourceError>

Source

pub(crate) fn check_is_valid(&self) -> Result<(), InvalidResourceError>

Source

pub fn invalid( device: Arc<Device>, desc: &RenderBundleDescriptor<'_>, ) -> Arc<Self>

Source

pub(crate) fn to_base_pass( &self, ) -> BasePass<RenderCommand<ArcReferences>, Infallible>

Available on crate feature trace only.
Source

pub(super) unsafe fn execute( &self, raw: &mut dyn DynCommandEncoder, indirect_draw_validation_resources: &mut DrawResources, indirect_draw_validation_batcher: &mut DrawBatcher, snatch_guard: &SnatchGuard<'_>, ) -> Result<(), ExecutionError>

Actually encode the contents into a native command buffer.

This is partially duplicating the logic of render_pass_end. However the point of this function is to be lighter, since we already had a chance to go through the commands in render_bundle_encoder_finish.

Note that the function isn’t expected to fail, generally. All the validation has already been done by this point. Execution can still fail if a resource was destroyed or indirect draw validation cannot allocate a buffer.

Trait Implementations§

Source§

impl Debug for RenderBundle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for RenderBundle

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Labeled for RenderBundle

Source§

fn label(&self) -> &str

Returns a string identifying this resource for logging and errors. Read more
Source§

fn error_ident(&self) -> ResourceErrorIdent

Source§

impl ParentDevice for RenderBundle

Source§

fn device(&self) -> &Arc<Device>

Source§

fn is_equal(self: &Arc<Self>, other: &Arc<Self>) -> bool

Source§

fn same_device_as<O: ParentDevice>(&self, other: &O) -> Result<(), DeviceError>

Source§

fn same_device(&self, device: &Device) -> Result<(), DeviceError>

Source§

impl ResourceType for RenderBundle

Source§

const TYPE: &'static str = "RenderBundle"

Source§

impl Trackable for RenderBundle

Source§

impl Send for RenderBundle

Available on send_sync only.
Source§

impl Sync for RenderBundle

Available on send_sync only.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,