Update ash and other dependencies (#1653)

This commit is contained in:
Rua 2021-08-01 16:39:04 +02:00 committed by GitHub
parent 8167ffb97c
commit 016942f0aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2812 additions and 757 deletions

View File

@ -16,7 +16,7 @@ build = "build.rs"
[dependencies]
# When updating Ash, also update vk.xml to the same Vulkan patch version that Ash uses.
# All versions of vk.xml can be found at https://github.com/KhronosGroup/Vulkan-Headers/commits/master/registry/vk.xml.
ash = "0.32.1"
ash = "0.33.0"
crossbeam-queue = "0.3"
fnv = "1.0"
half = "1.7"
@ -27,6 +27,6 @@ smallvec = "1.6"
[build-dependencies]
heck = "0.3"
indexmap = "1.6"
indexmap = "1.7"
regex = "1.5"
vk-parse = "0.6"

View File

@ -323,6 +323,7 @@ fn vulkano_type(ty: &str, len: Option<&str>) -> &'static str {
match ty {
"float" => "f32",
"int32_t" => "i32",
"int64_t" => "i64",
"size_t" => "usize",
"uint8_t" => "u8",
"uint32_t" => "u32",

View File

@ -162,6 +162,13 @@ impl FromVulkan<i32> for i32 {
}
}
impl FromVulkan<i64> for i64 {
#[inline]
fn from_vulkan(val: i64) -> Option<Self> {
Some(val)
}
}
impl FromVulkan<f32> for f32 {
#[inline]
fn from_vulkan(val: f32) -> Option<Self> {

View File

@ -43,9 +43,9 @@ impl From<u32> for Version {
#[inline]
fn from(val: u32) -> Self {
Version {
major: ash::vk::version_major(val),
minor: ash::vk::version_minor(val),
patch: ash::vk::version_patch(val),
major: ash::vk::api_version_major(val),
minor: ash::vk::api_version_minor(val),
patch: ash::vk::api_version_patch(val),
}
}
}
@ -56,7 +56,9 @@ impl TryFrom<Version> for u32 {
#[inline]
fn try_from(val: Version) -> Result<Self, Self::Error> {
if val.major <= 0x3ff && val.minor <= 0x3ff && val.patch <= 0xfff {
Ok(ash::vk::make_version(val.major, val.minor, val.patch))
Ok(ash::vk::make_api_version(
0, val.major, val.minor, val.patch,
))
} else {
Err(())
}

File diff suppressed because it is too large Load Diff