Integrate latest vk.xml changes (#2513)

* update ash

* update autogen for vk.xml updates

* add fields

* fix new clippy warning

* define enum and bitfield

didn't look at the actual type before

* comment
This commit is contained in:
Martin Charles 2024-04-08 15:22:48 -05:00 committed by GitHub
parent fe74e0aac8
commit 0918ac84d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3553 additions and 905 deletions

View File

@ -95,7 +95,7 @@ fn properties_output(members: &[PropertiesMember]) -> TokenStream {
properties_ffi.#ffi_member.map(|s|
unsafe {
std::slice::from_raw_parts(
s #ffi_member_field .#ffi_name as _,
s #ffi_member_field .#ffi_name .cast_const(),
s #ffi_member_field .#len_field_name as _,
)
}
@ -622,6 +622,14 @@ fn vulkano_type(ty: &str, len: Option<LenKind<'_>>) -> TokenStream {
"VkShaderFloatControlsIndependence" => quote! { ShaderFloatControlsIndependence },
"VkShaderStageFlags" => quote! { ShaderStages },
"VkSubgroupFeatureFlags" => quote! { SubgroupFeatures },
"VkImageLayout" => quote! { ImageLayout },
"VkImageUsageFlags" => quote! { ImageUsage },
"VkBufferUsageFlags" => quote! { BufferUsage },
"VkChromaLocation" => quote! { ChromaLocation },
"VkLayeredDriverUnderlyingApiMSFT" => quote! { LayeredDriverUnderlyingApi },
"VkPhysicalDeviceSchedulingControlsFlagsARM" => {
quote! { PhysicalDeviceSchedulingControlsFlags }
}
_ => unimplemented!("{}", ty),
},
}

View File

@ -3623,6 +3623,27 @@ impl From<ash::vk::ShaderCorePropertiesFlagsAMD> for ShaderCoreProperties {
}
}
vulkan_enum! {
#[non_exhaustive]
LayeredDriverUnderlyingApi = LayeredDriverUnderlyingApiMSFT(i32);
// TODO: document
None = NONE,
// TODO: document
D3D12 = D3D12,
}
vulkan_bitflags! {
#[non_exhaustive]
PhysicalDeviceSchedulingControlsFlags = PhysicalDeviceSchedulingControlsFlagsARM(u64);
// TODO: document
SHADER_CORE_COUNT = SHADER_CORE_COUNT,
}
vulkan_bitflags! {
#[non_exhaustive]

View File

@ -5,8 +5,12 @@ use super::physical::{
ShaderFloatControlsIndependence, SubgroupFeatures,
};
use crate::{
device::{DeviceExtensions, QueueFlags},
image::{SampleCount, SampleCounts},
buffer::BufferUsage,
device::{
physical::{LayeredDriverUnderlyingApi, PhysicalDeviceSchedulingControlsFlags},
DeviceExtensions, QueueFlags,
},
image::{sampler::ycbcr::ChromaLocation, ImageLayout, ImageUsage, SampleCount, SampleCounts},
instance::InstanceExtensions,
memory::DeviceAlignment,
render_pass::ResolveModes,
@ -259,6 +263,50 @@ impl FromVulkan<ash::vk::SubgroupFeatureFlags> for SubgroupFeatures {
}
}
impl FromVulkan<ash::vk::BufferUsageFlags> for BufferUsage {
#[inline]
fn from_vulkan(val: ash::vk::BufferUsageFlags) -> Option<Self> {
Some(val.into())
}
}
impl FromVulkan<ash::vk::ImageUsageFlags> for ImageUsage {
#[inline]
fn from_vulkan(val: ash::vk::ImageUsageFlags) -> Option<Self> {
Some(val.into())
}
}
impl FromVulkan<ash::vk::ChromaLocation> for ChromaLocation {
#[inline]
fn from_vulkan(val: ash::vk::ChromaLocation) -> Option<Self> {
val.try_into().ok()
}
}
impl FromVulkan<ash::vk::PhysicalDeviceSchedulingControlsFlagsARM>
for PhysicalDeviceSchedulingControlsFlags
{
#[inline]
fn from_vulkan(val: ash::vk::PhysicalDeviceSchedulingControlsFlagsARM) -> Option<Self> {
Some(val.into())
}
}
impl FromVulkan<ash::vk::LayeredDriverUnderlyingApiMSFT> for LayeredDriverUnderlyingApi {
#[inline]
fn from_vulkan(val: ash::vk::LayeredDriverUnderlyingApiMSFT) -> Option<Self> {
val.try_into().ok()
}
}
impl FromVulkan<ash::vk::ImageLayout> for ImageLayout {
#[inline]
fn from_vulkan(val: ash::vk::ImageLayout) -> Option<Self> {
val.try_into().ok()
}
}
impl<U: for<'a> FromVulkan<&'a T>, T> FromVulkan<&[T]> for Vec<U> {
#[inline]
fn from_vulkan(val: &[T]) -> Option<Vec<U>> {

View File

@ -406,6 +406,7 @@ pub(crate) enum FormatCompatibilityInner {
Class_10bit_2plane_444,
Class_12bit_2plane_444,
Class_16bit_2plane_444,
Class_8bit_alpha,
}
/// Describes a uniform value that will be used to fill an image.

File diff suppressed because it is too large Load Diff