Skip to main content

ExecutableProgram

Struct ExecutableProgram 

Source
pub struct ExecutableProgram { /* private fields */ }
Expand description

The ExecutableProgram struct provides a reusable host-side execution form for one lexed BESL program.

Implementations§

Source§

impl ExecutableProgram

Source

pub fn run_main( &self, descriptors: &mut DescriptorBindings<'_>, ) -> Result<(), VmError>

Executes the compiled main function using the currently bound descriptor resources.

Source

pub fn run_main_with_config( &self, descriptors: &mut DescriptorBindings<'_>, config: &ExecutionConfig, ) -> Result<(), VmError>

Executes main with explicit execution limits and shader invocation coordinates.

Each call represents one invocation. Workgroup barriers preserve local instruction order but do not schedule or wait for peer invocations.

Source

pub fn run_task_workgroup( &self, descriptors: &mut DescriptorBindings<'_>, configs: &[ExecutionConfig], ) -> Result<(), VmError>

Executes every task invocation in one workgroup with synchronized barriers and shared bound state.

Configurations run in slice order between barriers. This ordering makes atomic compaction deterministic for VM assertions. The scheduler rejects barriers in nested helper functions because only the main frame participates in the rendezvous.

Source§

impl ExecutableProgram

Source

pub fn compile(program: NodeReference) -> Result<Self, VmError>

Compiles a lexed BESL program into a runnable VM program.

Source

pub fn compile_with_specializations( program: NodeReference, specializations: &SpecializationValues, ) -> Result<Self, VmError>

Compiles a lexed BESL program using host-provided specialization values.

Source

pub fn descriptor_layout(&self, slot: ResourceSlot) -> Option<&DescriptorLayout>

Source

pub fn buffer_layout(&self, slot: ResourceSlot) -> Option<&BufferLayout>

Source

pub fn push_constant_layout(&self) -> Option<&BufferLayout>

Source

pub fn input_layout(&self, location: u8) -> Option<&BufferLayout>

Source

pub fn output_layout(&self, location: u8) -> Option<&BufferLayout>

Source

pub fn builtin_position_layout(&self) -> Option<&BufferLayout>

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
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, 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.