Flatten vk.rs module structure and use f32
This commit is contained in:
parent
c62172bdf8
commit
d78afd87dd
4085
ash/src/vk.rs
4085
ash/src/vk.rs
File diff suppressed because it is too large
Load diff
|
@ -619,7 +619,7 @@ fn name_to_tokens(type_name: &str) -> Ident {
|
||||||
"int" => "c_int",
|
"int" => "c_int",
|
||||||
"void" => "c_void",
|
"void" => "c_void",
|
||||||
"char" => "c_char",
|
"char" => "c_char",
|
||||||
"float" => "c_float",
|
"float" => "f32",
|
||||||
"long" => "c_ulong",
|
"long" => "c_ulong",
|
||||||
_ => {
|
_ => {
|
||||||
if type_name.starts_with("Vk") {
|
if type_name.starts_with("Vk") {
|
||||||
|
@ -1700,10 +1700,6 @@ pub fn write_source_code(path: &Path) {
|
||||||
let source_code = quote!{
|
let source_code = quote!{
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::os::raw::*;
|
use std::os::raw::*;
|
||||||
#[doc(hidden)]
|
|
||||||
pub use self::extensions::*;
|
|
||||||
#[doc(hidden)]
|
|
||||||
pub use self::bitflags::*;
|
|
||||||
|
|
||||||
pub trait Handle {
|
pub trait Handle {
|
||||||
const TYPE: ObjectType;
|
const TYPE: ObjectType;
|
||||||
|
@ -1719,16 +1715,10 @@ pub fn write_source_code(path: &Path) {
|
||||||
#(#feature_code)*
|
#(#feature_code)*
|
||||||
#(#definition_code)*
|
#(#definition_code)*
|
||||||
#(#enum_code)*
|
#(#enum_code)*
|
||||||
pub mod bitflags {
|
|
||||||
use super::*;
|
|
||||||
#(#bitflags_code)*
|
#(#bitflags_code)*
|
||||||
}
|
|
||||||
#(#constants_code)*
|
#(#constants_code)*
|
||||||
pub mod extensions {
|
|
||||||
use super::*;
|
|
||||||
#(#extension_code)*
|
#(#extension_code)*
|
||||||
#feature_extensions_code
|
#feature_extensions_code
|
||||||
}
|
|
||||||
#const_displays
|
#const_displays
|
||||||
};
|
};
|
||||||
write!(&mut file, "{}", source_code).expect("Unable to write to file");
|
write!(&mut file, "{}", source_code).expect("Unable to write to file");
|
||||||
|
|
Loading…
Reference in a new issue