diff options
author | Andrzej Janik <[email protected]> | 2021-09-16 23:13:10 +0000 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2021-09-16 23:13:10 +0000 |
commit | 04394dbb04e6a0605539d6a446ff601982f41f4f (patch) | |
tree | bf903f9a6af46152b4d7b927bf6e0e7aabf52a54 /zluda | |
parent | 314e3dcb49e539f6048abd5d887b34e4d58e1b50 (diff) | |
download | ZLUDA-04394dbb04e6a0605539d6a446ff601982f41f4f.tar.gz ZLUDA-04394dbb04e6a0605539d6a446ff601982f41f4f.zip |
Oops
Diffstat (limited to 'zluda')
-rw-r--r-- | zluda/src/impl/module.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/zluda/src/impl/module.rs b/zluda/src/impl/module.rs index ba09869..1cf0a5a 100644 --- a/zluda/src/impl/module.rs +++ b/zluda/src/impl/module.rs @@ -136,15 +136,15 @@ fn compile_amd( let spirv_files = spirv_il .iter() .map(|spirv| { - let mut spirv = NamedTempFile::new_in(&dir)?; - let spirv_il_u8 = unsafe { + let mut spirv_file = NamedTempFile::new_in(&dir)?; + let spirv_u8 = unsafe { slice::from_raw_parts( - spirv_il.as_ptr() as *const u8, - spirv_il.len() * mem::size_of::<u32>(), + spirv.as_ptr() as *const u8, + spirv.len() * mem::size_of::<u32>(), ) }; - spirv.write_all(spirv_il_u8)?; - Ok::<_, io::Error>(spirv) + spirv_file.write_all(spirv_u8)?; + Ok::<_, io::Error>(spirv_file) }) .collect::<Result<Vec<_>, _>>()?; let llvm_spirv_path = match env::var("LLVM_SPIRV") { |