Skip to content

Commit 65c9326

Browse files
committed
Shader from raw IL
1 parent 0643df0 commit 65c9326

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pso.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ impl Shader {
3434
})
3535
}
3636

37+
pub fn from_raw(data: &[u8]) -> Self {
38+
Shader(d3d12::D3D12_SHADER_BYTECODE {
39+
BytecodeLength: data.len() as _,
40+
pShaderBytecode: data.as_ptr() as _,
41+
})
42+
}
43+
3744
// `blob` may not be null.
3845
pub fn from_blob(blob: Blob) -> Self {
3946
Shader(d3d12::D3D12_SHADER_BYTECODE {

0 commit comments

Comments
 (0)