Struct vulkanalia::bytecode::Bytecode
source · pub struct Bytecode(/* private fields */);
Expand description
A 4-byte aligned SPIR-V bytecode buffer.
This helper struct can be used to ensure the correct alignment of the SPIR-V
bytecode for a shader before providing it to a
crate::vk::ShaderModuleCreateInfo
to create a shader module.
let vert_bytes = include_bytes!("../../tutorial/shaders/09/vert.spv");
let vert_bytecode = Bytecode::new(vert_bytes).unwrap();
let vert_info = vk::ShaderModuleCreateInfo::builder()
.code_size(vert_bytecode.code_size())
.code(vert_bytecode.code());
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bytecode
impl RefUnwindSafe for Bytecode
impl !Send for Bytecode
impl !Sync for Bytecode
impl Unpin for Bytecode
impl UnwindSafe for Bytecode
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