Skip to content

Commit 72c115e

Browse files
authored
Merge pull request #22 from msiglreith/shader-il
Shader from raw IL
2 parents 0643df0 + 65c9326 commit 72c115e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pso.rs

+7
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)