Skip to content

Commit

Permalink
Rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gwihlidal committed Dec 7, 2018
1 parent 104a8eb commit 7726ca9
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/convert.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::ffi;
use crate::types::*;
use num_traits::cast::FromPrimitive;
use spirv_headers;
use crate::types::*;

pub(crate) fn ffi_to_entry_point(ffi_type: &ffi::SpvReflectEntryPoint) -> ReflectEntryPoint {
ReflectEntryPoint {
Expand All @@ -19,34 +19,39 @@ pub(crate) fn ffi_to_entry_point(ffi_type: &ffi::SpvReflectEntryPoint) -> Reflec
ffi_type.input_variables,
ffi_type.input_variable_count as usize,
)
}.iter()
}
.iter()
.map(|&var| ffi_to_interface_variable(&var))
.collect(),
output_variables: unsafe {
std::slice::from_raw_parts(
ffi_type.output_variables,
ffi_type.output_variable_count as usize,
)
}.iter()
}
.iter()
.map(|&var| ffi_to_interface_variable(&var))
.collect(),
descriptor_sets: unsafe {
std::slice::from_raw_parts(
ffi_type.descriptor_sets,
ffi_type.descriptor_set_count as usize,
)
}.iter()
}
.iter()
.map(|&set| ffi_to_descriptor_set(&set))
.collect(),
used_uniforms: unsafe {
std::slice::from_raw_parts(ffi_type.used_uniforms, ffi_type.used_uniform_count as usize)
}.to_vec(),
}
.to_vec(),
used_push_constants: unsafe {
std::slice::from_raw_parts(
ffi_type.used_push_constants,
ffi_type.used_push_constant_count as usize,
)
}.to_vec(),
}
.to_vec(),
}
}

Expand Down

0 comments on commit 7726ca9

Please sign in to comment.