mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-28 21:47: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::c_void,
|
||||||
ffi::CStr,
|
ffi::CStr,
|
||||||
ffi::CString,
|
ffi::CString,
|
||||||
io::{self, Read, Write},
|
io::{self, Read, Seek, SeekFrom, Write},
|
||||||
mem,
|
mem,
|
||||||
os::raw::{c_char, c_int, c_uint},
|
os::raw::{c_char, c_int, c_uint},
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
|
@ -206,6 +206,7 @@ impl SpirvModule {
|
||||||
let status = compiler_cmd.status()?;
|
let status = compiler_cmd.status()?;
|
||||||
assert!(status.success());
|
assert!(status.success());
|
||||||
let mut result = Vec::new();
|
let mut result = Vec::new();
|
||||||
|
compiled_binary.seek(SeekFrom::Start(0))?;
|
||||||
compiled_binary.read_to_end(&mut result)?;
|
compiled_binary.read_to_end(&mut result)?;
|
||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue