Update VulkanHeaders to 1.1.117 (#222)
* Update VulkanHeaders to 1.1.117 * Mark Ggp definitions as experimental * Fix is_version * Switch to 1.1.117
This commit is contained in:
parent
1637ed4bf4
commit
e67df2650a
7608
ash/src/vk.rs
7608
ash/src/vk.rs
File diff suppressed because it is too large
Load diff
|
@ -1 +1 @@
|
||||||
Subproject commit c200cb25db0f47364d3318d92c1d8e9dfff2fef1
|
Subproject commit fd568d51ed3d9bc6132e1639d7492453a08fe1bc
|
|
@ -355,6 +355,7 @@ pub fn platform_specific_types() -> Tokens {
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
pub type wl_surface = c_void;
|
pub type wl_surface = c_void;
|
||||||
pub type HANDLE = *mut c_void;
|
pub type HANDLE = *mut c_void;
|
||||||
|
pub type HMONITOR = HANDLE;
|
||||||
pub type DWORD = c_ulong;
|
pub type DWORD = c_ulong;
|
||||||
pub type LPCWSTR = *const u16;
|
pub type LPCWSTR = *const u16;
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
@ -367,6 +368,11 @@ pub fn platform_specific_types() -> Tokens {
|
||||||
// Opage types
|
// Opage types
|
||||||
pub type ANativeWindow = c_void;
|
pub type ANativeWindow = c_void;
|
||||||
pub type AHardwareBuffer = c_void;
|
pub type AHardwareBuffer = c_void;
|
||||||
|
/// This definition is experimental and won't adhere to semver rules.
|
||||||
|
pub type GgpStreamDescriptor = u32;
|
||||||
|
/// This definition is experimental and won't adhere to semver rules.
|
||||||
|
pub type GgpFrameToken = u32;
|
||||||
|
pub type CAMetalLayer = c_void;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
|
@ -527,7 +533,7 @@ pub trait FeatureExt {
|
||||||
impl FeatureExt for vkxml::Feature {
|
impl FeatureExt for vkxml::Feature {
|
||||||
fn is_version(&self, major: u32, minor: u32) -> bool {
|
fn is_version(&self, major: u32, minor: u32) -> bool {
|
||||||
let self_major = self.version as u32;
|
let self_major = self.version as u32;
|
||||||
let self_minor = (self.version * 10.0) as u32 - self_major;
|
let self_minor = (self.version * 10.0) as u32 - self_major * 10;
|
||||||
major == self_major && self_minor == minor
|
major == self_major && self_minor == minor
|
||||||
}
|
}
|
||||||
fn version_string(&self) -> String {
|
fn version_string(&self) -> String {
|
||||||
|
@ -718,6 +724,19 @@ fn generate_function_pointers<'a>(
|
||||||
commands: &[&'a vkxml::Command],
|
commands: &[&'a vkxml::Command],
|
||||||
fn_cache: &mut HashSet<&'a str, impl BuildHasher>,
|
fn_cache: &mut HashSet<&'a str, impl BuildHasher>,
|
||||||
) -> quote::Tokens {
|
) -> quote::Tokens {
|
||||||
|
// We filter commands so that we don't have duplicates
|
||||||
|
let commands: Vec<_> = commands
|
||||||
|
.iter()
|
||||||
|
.filter(|cmd| {
|
||||||
|
let ident = cmd.name.as_str();
|
||||||
|
if !fn_cache.contains(ident) {
|
||||||
|
fn_cache.insert(ident);
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
let names: Vec<_> = commands.iter().map(|cmd| cmd.command_ident()).collect();
|
let names: Vec<_> = commands.iter().map(|cmd| cmd.command_ident()).collect();
|
||||||
let names_ref = &names;
|
let names_ref = &names;
|
||||||
let names_ref1 = &names;
|
let names_ref1 = &names;
|
||||||
|
@ -732,19 +751,6 @@ fn generate_function_pointers<'a>(
|
||||||
let names_right = &names;
|
let names_right = &names;
|
||||||
let khronos_links: Vec<_> = raw_names.iter().map(|name| khronos_link(name)).collect();
|
let khronos_links: Vec<_> = raw_names.iter().map(|name| khronos_link(name)).collect();
|
||||||
|
|
||||||
let pfn_commands: Vec<_> = commands
|
|
||||||
.iter()
|
|
||||||
.filter(|cmd| {
|
|
||||||
let ident = cmd.name.as_str();
|
|
||||||
if !fn_cache.contains(ident) {
|
|
||||||
fn_cache.insert(ident);
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
let params: Vec<Vec<(Ident, Tokens)>> = commands
|
let params: Vec<Vec<(Ident, Tokens)>> = commands
|
||||||
.iter()
|
.iter()
|
||||||
.map(|cmd| {
|
.map(|cmd| {
|
||||||
|
@ -802,13 +808,13 @@ fn generate_function_pointers<'a>(
|
||||||
.collect();
|
.collect();
|
||||||
let return_types_ref = &return_types;
|
let return_types_ref = &return_types;
|
||||||
|
|
||||||
let pfn_names: Vec<_> = pfn_commands
|
let pfn_names: Vec<_> = commands
|
||||||
.iter()
|
.iter()
|
||||||
.map(|cmd| Ident::from(format!("PFN_{}", cmd.name.as_str())))
|
.map(|cmd| Ident::from(format!("PFN_{}", cmd.name.as_str())))
|
||||||
.collect();
|
.collect();
|
||||||
let pfn_names_ref = &pfn_names;
|
let pfn_names_ref = &pfn_names;
|
||||||
|
|
||||||
let signature_params: Vec<Vec<_>> = pfn_commands
|
let signature_params: Vec<Vec<_>> = commands
|
||||||
.iter()
|
.iter()
|
||||||
.map(|cmd| {
|
.map(|cmd| {
|
||||||
let params: Vec<_> = cmd
|
let params: Vec<_> = cmd
|
||||||
|
@ -825,7 +831,7 @@ fn generate_function_pointers<'a>(
|
||||||
.collect();
|
.collect();
|
||||||
let signature_params_ref = &signature_params;
|
let signature_params_ref = &signature_params;
|
||||||
|
|
||||||
let pfn_return_types: Vec<_> = pfn_commands
|
let pfn_return_types: Vec<_> = commands
|
||||||
.iter()
|
.iter()
|
||||||
.map(|cmd| cmd.return_type.type_tokens(true))
|
.map(|cmd| cmd.return_type.type_tokens(true))
|
||||||
.collect();
|
.collect();
|
||||||
|
@ -1292,7 +1298,7 @@ pub fn derive_default(_struct: &vkxml::Struct) -> Option<Tokens> {
|
||||||
|
|
||||||
// This are also pointers, and therefor also don't implement Default. The spec
|
// This are also pointers, and therefor also don't implement Default. The spec
|
||||||
// also doesn't mark them as pointers
|
// also doesn't mark them as pointers
|
||||||
let handles = ["LPCWSTR", "HANDLE", "HINSTANCE", "HWND"];
|
let handles = ["LPCWSTR", "HANDLE", "HINSTANCE", "HWND", "HMONITOR"];
|
||||||
let contains_ptr = members.clone().any(|field| field.reference.is_some());
|
let contains_ptr = members.clone().any(|field| field.reference.is_some());
|
||||||
let contains_strucutre_type = members.clone().any(is_structure_type);
|
let contains_strucutre_type = members.clone().any(is_structure_type);
|
||||||
let contains_static_array = members.clone().any(is_static_array);
|
let contains_static_array = members.clone().any(is_static_array);
|
||||||
|
|
Loading…
Reference in a new issue