simple_compute
Generated Rust API reference for byte_engine.
byte_engine / rendering / render_pass / simple_compute
Module simple_compute
Reusable construction for BESL compute render passes that bind their resources by name.
Quick Reference
| Item | Kind | Description |
|---|---|---|
Descriptor | struct | The Descriptor struct identifies one compute pipeline and its command label. |
Pipeline | struct | The Pipeline struct provides reusable compute state to sink-specific retained resource sets. |
Pass | struct | The Pass struct provides one sink with a validated pipeline and descriptor sets for a single compute dispatch. |
ReadyPass | struct | The ReadyPass struct provides immutable recording state after pipeline publication. |
Resource | enum |
Structs
Descriptor<'a>
struct Descriptor<'a> {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/rendering/render_pass/simple_compute.rs:14-17
The Descriptor struct identifies one compute pipeline and its command label.
Implementations
-
fn new(label: &'static str, pipeline_id: &'a str) -> SelfCreates a descriptor for one baked pipeline resource and its human-readable command label.
Trait Implementations
impl ArchivePointee for Descriptor<'a>
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Descriptor<'a>
impl Downcast for Descriptor<'a>
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for Descriptor<'a>
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for Descriptor<'a>
impl LayoutRaw for Descriptor<'a>
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Descriptor<'a>
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for Descriptor<'a>
-
type Metadata = ()
impl Read for Descriptor<'a>
impl WithSubscriber for Descriptor<'a>
Pipeline
struct Pipeline {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/rendering/render_pass/simple_compute.rs:46-50
The Pipeline struct provides reusable compute state to sink-specific retained resource sets.
Implementations
-
fn compile(render_pass_builder: &mut RenderPassBuilder<'_>, descriptor: Descriptor<'_>) -> SelfRelated:
RenderPassBuilder,DescriptorRequests a baked pipeline and defers descriptor adoption until compilation is published.
-
fn bind(&self, descriptor_set_name: &'static str, resources: &[Resource]) -> PassFreezes the named resources for one sink.
The pass validates them against the pipeline's descriptor set layouts and creates its descriptor sets once the
pipeline is published, in
Pass::ready, and logs an error there when they do not match.
Trait Implementations
impl ArchivePointee for Pipeline
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Pipeline
impl Clone for Pipeline
-
fn clone(&self) -> PipelineRelated:
Pipeline
impl Downcast for Pipeline
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for Pipeline
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for Pipeline
impl LayoutRaw for Pipeline
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Pipeline
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for Pipeline
-
type Metadata = ()
impl Read for Pipeline
impl WithSubscriber for Pipeline
Pass
struct Pass {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/rendering/render_pass/simple_compute.rs:86-95
The Pass struct provides one sink with a validated pipeline and descriptor sets for a single compute dispatch.
Implementations
-
fn ready(&mut self, frame: &mut ghi::implementation::Frame<'_>) -> Option<ReadyPass>Related:
ReadyPassAdopts a published pipeline and creates this sink's descriptor sets once, one per layout the shader uses.
-
fn prepare<'a>(&mut self, _frame: &mut ghi::implementation::Frame<'_>, sink: &Sink, frame_allocator: &'a bumpalo::Bump) -> Option<RenderPassReturn<'a>>Related:
Sink,RenderPassReturnAllocates a frame command that records this compute pass for the sink extent.
Trait Implementations
impl ArchivePointee for Pass
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Pass
impl Clone for Pass
-
fn clone(&self) -> PassRelated:
Pass
impl Downcast for Pass
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for Pass
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for Pass
impl LayoutRaw for Pass
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Pass
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for Pass
-
type Metadata = ()
impl Read for Pass
impl WithSubscriber for Pass
ReadyPass
struct ReadyPass {
// [REDACTED: Private Fields]
}Defined in crates/byte-engine/src/rendering/render_pass/simple_compute.rs:170-175
The ReadyPass struct provides immutable recording state after pipeline publication.
Implementations
-
fn record(&self, command_buffer: &mut ghi::implementation::CommandBufferRecording<'_>, extent: Extent)Records this pass without allocating a render-command closure.
Trait Implementations
impl ArchivePointee for ReadyPass
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for ReadyPass
impl Clone for ReadyPass
-
fn clone(&self) -> ReadyPassRelated:
ReadyPass
impl Copy for ReadyPass
impl Downcast for ReadyPass
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for ReadyPass
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for ReadyPass
impl LayoutRaw for ReadyPass
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for ReadyPass
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for ReadyPass
-
type Metadata = ()
impl Read for ReadyPass
impl WithSubscriber for ReadyPass
Enums
Resource
enum Resource {
Buffer(&'static str, ghi::BaseBufferHandle),
PlannedBuffer(&'static str, ghi::BaseBufferHandle),
Image(&'static str, ghi::ImageOrSwapchain),
ImageArray(&'static str, [Option<ghi::BaseImageHandle>; 15]),
CombinedImageSampler(&'static str, ghi::BaseImageHandle, ghi::SamplerHandle, ghi::Layouts),
}Defined in crates/byte-engine/src/rendering/set_layout.rs:356-363
The Resource enum names one concrete resource for a BESL binding, for create_sets to bind by name.
Variants
-
ImageArrayThe first
countimages of an arrayed storage-image binding, element by element.
Implementations
-
fn buffer(name: &'static str, buffer: impl Into<ghi::BaseBufferHandle>) -> Self -
fn planned_buffer(name: &'static str, buffer: impl Into<ghi::BaseBufferHandle>) -> SelfKeeps a buffer ready for a BESL binding that is intentionally not reachable yet.
-
fn image(name: &'static str, image: impl Into<ghi::ImageOrSwapchain>) -> SelfBinds a storage-image destination without exposing whether it is an image or swapchain.
-
fn image_array(name: &'static str, images: &[ghi::BaseImageHandle]) -> SelfBinds
imagesto the first elements of an arrayed storage-image binding, such as the debug target pool ashader declares as
debug_view_targets. Elements past them stay unbound, so the shader must not index them.Panics
Panics with more than
MAX_IMAGE_ARRAY_ELEMENTSimages. -
fn combined_image_sampler(name: &'static str, image: impl Into<ghi::BaseImageHandle>, sampler: ghi::SamplerHandle, layout: ghi::Layouts) -> Self
Trait Implementations
impl ArchivePointee for Resource
-
type ArchivedMetadata = () -
fn pointer_metadata(_: &<T as ArchivePointee>::ArchivedMetadata) -> <T as Pointee>::Metadata
impl<ST> CastableFrom for Resource
impl Clone for Resource
-
fn clone(&self) -> ResourceRelated:
Resource
impl Copy for Resource
impl Downcast for Resource
-
fn into_any(self: Box<T>) -> Box<dyn Any> -
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any> -
fn as_any(&self) -> &dyn Any -
fn as_any_mut(&mut self) -> &mut dyn Any
impl DowncastSync for Resource
-
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
impl Instrument for Resource
impl LayoutRaw for Resource
-
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T, N1> Niching for Resource
-
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool -
fn resolve_niched(out: Place<NichedOption<T, N1>>)
impl Pointee for Resource
-
type Metadata = ()