mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-28 13:37:57 +03:00
Try seeking before reading
This commit is contained in:
parent
3070d983ab
commit
3ce6aee65d
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,7 @@ use std::{
|
|||
ffi::c_void,
|
||||
ffi::CStr,
|
||||
ffi::CString,
|
||||
io::{self, Read, Write},
|
||||
io::{self, Read, Seek, SeekFrom, Write},
|
||||
mem,
|
||||
os::raw::{c_char, c_int, c_uint},
|
||||
path::PathBuf,
|
||||
|
@ -206,6 +206,7 @@ impl SpirvModule {
|
|||
let status = compiler_cmd.status()?;
|
||||
assert!(status.success());
|
||||
let mut result = Vec::new();
|
||||
compiled_binary.seek(SeekFrom::Start(0))?;
|
||||
compiled_binary.read_to_end(&mut result)?;
|
||||
Ok(result)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue