pub struct Layout {
pub buffers: Vec<(u32, u32)>,
pub fields: BTreeMap<String, Field>,
}Expand description
The constant buffers a program reads and where each named constant lives. Built from the program’s interface
(Layout::of) or by the caller from a game’s own records when the bytecode carries none.
Fields§
§buffers: Vec<(u32, u32)>Bind slot and size in words of each buffer the program reads.
fields: BTreeMap<String, Field>Each named constant’s place, by the name D3D reflection gives it.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn of(shader: &dyn PixelShader) -> Result<Self, Error>
pub fn of(shader: &dyn PixelShader) -> Result<Self, Error>
The program’s buffers, and every constant its interface names, by name: a structure’s members are flattened to their own names, as D3D reflection names them. A name that occurs twice or a constant off a word boundary is an error.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Layout
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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