pub fn as_bytes<T: Pod>(val: &T) -> &[u8] ⓘExpand description
Convert a Pod value to a byte slice suitable for KernelArg::Bytes.
§Safety
The caller must ensure T has the same layout as the corresponding
MSL struct in the shader (matching field order, sizes, and alignment).