pub struct WgpuProgram {
pub module: Module,
pub bindings: Vec<WgpuBindingAssignment>,
pub workgroup_size: [u32; 3],
pub dispatch_geometry: WgpuDispatchGeometry,
}Expand description
Backend-owned wgpu IR.
Fields§
§module: ModuleStructurally emitted Naga module.
bindings: Vec<WgpuBindingAssignment>Resource binding decisions.
workgroup_size: [u32; 3]Workgroup sizing chosen for the shader entry point.
dispatch_geometry: WgpuDispatchGeometryDispatch geometry derived from program output declarations.
Implementations§
Source§impl WgpuProgram
impl WgpuProgram
Sourcepub fn from_program(
program: &Program,
config: &DispatchConfig,
enabled_features: &EnabledFeatures,
) -> Result<Self, LoweringError>
pub fn from_program( program: &Program, config: &DispatchConfig, enabled_features: &EnabledFeatures, ) -> Result<Self, LoweringError>
Build backend IR from a core program.
§Errors
Returns LoweringError when the program cannot be represented as
wgpu/Naga IR.
Trait Implementations§
Source§impl Clone for WgpuProgram
impl Clone for WgpuProgram
Source§fn clone(&self) -> WgpuProgram
fn clone(&self) -> WgpuProgram
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WgpuProgram
impl RefUnwindSafe for WgpuProgram
impl Send for WgpuProgram
impl Sync for WgpuProgram
impl Unpin for WgpuProgram
impl UnsafeUnpin for WgpuProgram
impl UnwindSafe for WgpuProgram
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