Skip to content

Commit

Permalink
Update generated bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleMayes committed Dec 15, 2022
1 parent 96e4e3c commit 29d81d0
Show file tree
Hide file tree
Showing 12 changed files with 1,328 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
- [Reserve a driver ID for NVK (#1983)](https://github.com/KhronosGroup/Vulkan-Docs/commit/34a7173fee63c2c15e2414044710a0a69bbd8984)
- [November 17, 2022 Vulkan 1.3.235 spec update](https://github.com/KhronosGroup/Vulkan-Docs/commit/f4eb3e9a7acdef9ab62ac9af954a50409895ac6d)
- [Merge branch 'main' of github.com:KhronosGroup/Vulkan-Docs into github-main](https://github.com/KhronosGroup/Vulkan-Docs/commit/d4987d251a1f63f184ea6ed9b20f5125cfd6a2d5)
- [December 1, 2022 Vulkan 1.3.236 spec update](https://github.com/KhronosGroup/Vulkan-Docs/commit/db2b908b59b7774da9aa8b07baed4f5d018ae4d9)
- [Re-add commit from PR #1983, which was somehow lost in the internal /](https://github.com/KhronosGroup/Vulkan-Docs/commit/d1442602716ef83e6e8deedfab63c2022c0fba13)
- [December 8, 2022 Vulkan 1.3.237 spec update](https://github.com/KhronosGroup/Vulkan-Docs/commit/0e28607b55dc1eee4ff80967f1e0a7e99356d075)

## [0.16.0] - 2022-09-25

Expand Down
2 changes: 1 addition & 1 deletion Vulkan-Docs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://github.com/KhronosGroup/Vulkan-Docs
d4987d251a1f63f184ea6ed9b20f5125cfd6a2d5
0e28607b55dc1eee4ff80967f1e0a7e99356d075
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,12 @@ data class Function(
private fun extractFunction(e: Element) = Function(
name = e.getElementText("name")!!.intern(),
params = e.getElements("type", ::extractType),
result = when (e.textContent.substring(8, e.textContent.indexOf("(VKAPI_PTR")).trim()) {
result = when (val type = e.textContent.substring(8, e.textContent.indexOf("(VKAPI_PTR")).trim()) {
"void" -> null
"void*" -> PointerType(IdentifierType("void".intern()), false)
"VkBool32" -> IdentifierType("VkBool32".intern())
else -> error("Unsupported function pointer result type.")
"PFN_vkVoidFunction" -> IdentifierType("PFN_vkVoidFunction".intern())
else -> error("Unsupported function pointer result type ($type).")
},
)

Expand Down
30 changes: 30 additions & 0 deletions vulkanalia-sys/src/bitmasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,13 @@ bitflags! {
}
}

bitflags! {
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkDirectDriverLoadingFlagsLUNARG.html>
#[repr(transparent)]
#[derive(Default)]
pub struct DirectDriverLoadingFlagsLUNARG: Flags { }
}

bitflags! {
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkDirectFBSurfaceCreateFlagsEXT.html>
#[repr(transparent)]
Expand Down Expand Up @@ -1421,6 +1428,28 @@ bitflags! {
pub struct PipelineViewportSwizzleStateCreateFlagsNV: Flags { }
}

bitflags! {
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPresentGravityFlagsEXT.html>
#[repr(transparent)]
#[derive(Default)]
pub struct PresentGravityFlagsEXT: Flags {
const MIN = 1;
const MAX = 1 << 1;
const CENTERED = 1 << 2;
}
}

bitflags! {
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPresentScalingFlagsEXT.html>
#[repr(transparent)]
#[derive(Default)]
pub struct PresentScalingFlagsEXT: Flags {
const ONE_TO_ONE = 1;
const ASPECT_RATIO_STRETCH = 1 << 1;
const STRETCH = 1 << 2;
}
}

bitflags! {
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPrivateDataSlotCreateFlags.html>
#[repr(transparent)]
Expand Down Expand Up @@ -1738,6 +1767,7 @@ bitflags! {
const SPLIT_INSTANCE_BIND_REGIONS = 1;
const PROTECTED = 1 << 1;
const MUTABLE_FORMAT = 1 << 2;
const DEFERRED_MEMORY_ALLOCATION_EXT = 1 << 3;
}
}

Expand Down
6 changes: 6 additions & 0 deletions vulkanalia-sys/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3861,6 +3861,12 @@ pub type PFN_vkReleasePerformanceConfigurationINTEL = unsafe extern "system" fn(
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkReleaseProfilingLockKHR.html>
pub type PFN_vkReleaseProfilingLockKHR = unsafe extern "system" fn(_device: Device);

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkReleaseSwapchainImagesEXT.html>
pub type PFN_vkReleaseSwapchainImagesEXT = unsafe extern "system" fn(
_device: Device,
_release_info: *const ReleaseSwapchainImagesInfoEXT,
) -> Result;

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkResetCommandBuffer.html>
pub type PFN_vkResetCommandBuffer = unsafe extern "system" fn(
_command_buffer: CommandBuffer,
Expand Down
59 changes: 59 additions & 0 deletions vulkanalia-sys/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,38 @@ impl fmt::Debug for DeviceMemoryReportEventTypeEXT {
}
}

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkDirectDriverLoadingModeLUNARG.html>
#[repr(transparent)]
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub struct DirectDriverLoadingModeLUNARG(i32);

impl DirectDriverLoadingModeLUNARG {
pub const EXCLUSIVE: Self = Self(0);
pub const INCLUSIVE: Self = Self(1);

/// Constructs an instance of this enum with the supplied underlying value.
#[inline]
pub const fn from_raw(value: i32) -> Self {
Self(value)
}

/// Gets the underlying value for this enum instance.
#[inline]
pub const fn as_raw(self) -> i32 {
self.0
}
}

impl fmt::Debug for DirectDriverLoadingModeLUNARG {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self.0 {
0 => write!(f, "EXCLUSIVE"),
1 => write!(f, "INCLUSIVE"),
_ => self.0.fmt(f),
}
}
}

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkDiscardRectangleModeEXT.html>
#[repr(transparent)]
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
Expand Down Expand Up @@ -5279,6 +5311,15 @@ impl StructureType {
pub const PIPELINE_EXECUTABLE_STATISTIC_KHR: Self = Self(1000269004);
pub const PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR: Self = Self(1000269005);
pub const PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: Self = Self(1000273000);
pub const SURFACE_PRESENT_MODE_EXT: Self = Self(1000274000);
pub const SURFACE_PRESENT_SCALING_CAPABILITIES_EXT: Self = Self(1000274001);
pub const SURFACE_PRESENT_MODE_COMPATIBILITY_EXT: Self = Self(1000274002);
pub const PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT: Self = Self(1000275000);
pub const SWAPCHAIN_PRESENT_FENCE_INFO_EXT: Self = Self(1000275001);
pub const SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT: Self = Self(1000275002);
pub const SWAPCHAIN_PRESENT_MODE_INFO_EXT: Self = Self(1000275003);
pub const SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT: Self = Self(1000275004);
pub const RELEASE_SWAPCHAIN_IMAGES_INFO_EXT: Self = Self(1000275005);
pub const PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV: Self = Self(1000277000);
pub const GRAPHICS_SHADER_GROUP_CREATE_INFO_NV: Self = Self(1000277001);
pub const GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV: Self = Self(1000277002);
Expand Down Expand Up @@ -5454,6 +5495,8 @@ impl StructureType {
pub const RENDER_PASS_CREATION_CONTROL_EXT: Self = Self(1000458001);
pub const RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT: Self = Self(1000458002);
pub const RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT: Self = Self(1000458003);
pub const DIRECT_DRIVER_LOADING_INFO_LUNARG: Self = Self(1000459000);
pub const DIRECT_DRIVER_LOADING_LIST_LUNARG: Self = Self(1000459001);
pub const PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT: Self = Self(1000462000);
pub const PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT: Self = Self(1000462001);
pub const PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT: Self = Self(1000462002);
Expand All @@ -5473,6 +5516,7 @@ impl StructureType {
pub const TILE_PROPERTIES_QCOM: Self = Self(1000484001);
pub const PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC: Self = Self(1000485000);
pub const AMIGO_PROFILING_SUBMIT_INFO_SEC: Self = Self(1000485001);
pub const PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM: Self = Self(1000488000);
pub const PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV: Self = Self(1000490000);
pub const PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV: Self = Self(1000490001);
pub const PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: Self = Self(1000351000);
Expand Down Expand Up @@ -6029,6 +6073,15 @@ impl fmt::Debug for StructureType {
1000269004 => write!(f, "PIPELINE_EXECUTABLE_STATISTIC_KHR"),
1000269005 => write!(f, "PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR"),
1000273000 => write!(f, "PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT"),
1000274000 => write!(f, "SURFACE_PRESENT_MODE_EXT"),
1000274001 => write!(f, "SURFACE_PRESENT_SCALING_CAPABILITIES_EXT"),
1000274002 => write!(f, "SURFACE_PRESENT_MODE_COMPATIBILITY_EXT"),
1000275000 => write!(f, "PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT"),
1000275001 => write!(f, "SWAPCHAIN_PRESENT_FENCE_INFO_EXT"),
1000275002 => write!(f, "SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT"),
1000275003 => write!(f, "SWAPCHAIN_PRESENT_MODE_INFO_EXT"),
1000275004 => write!(f, "SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT"),
1000275005 => write!(f, "RELEASE_SWAPCHAIN_IMAGES_INFO_EXT"),
1000277000 => write!(f, "PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV"),
1000277001 => write!(f, "GRAPHICS_SHADER_GROUP_CREATE_INFO_NV"),
1000277002 => write!(f, "GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV"),
Expand Down Expand Up @@ -6259,6 +6312,8 @@ impl fmt::Debug for StructureType {
1000458001 => write!(f, "RENDER_PASS_CREATION_CONTROL_EXT"),
1000458002 => write!(f, "RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT"),
1000458003 => write!(f, "RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT"),
1000459000 => write!(f, "DIRECT_DRIVER_LOADING_INFO_LUNARG"),
1000459001 => write!(f, "DIRECT_DRIVER_LOADING_LIST_LUNARG"),
1000462000 => write!(f, "PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT"),
1000462001 => write!(f, "PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT"),
1000462002 => write!(f, "PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT"),
Expand All @@ -6280,6 +6335,10 @@ impl fmt::Debug for StructureType {
1000484001 => write!(f, "TILE_PROPERTIES_QCOM"),
1000485000 => write!(f, "PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC"),
1000485001 => write!(f, "AMIGO_PROFILING_SUBMIT_INFO_SEC"),
1000488000 => write!(
f,
"PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM"
),
1000490000 => write!(
f,
"PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV"
Expand Down
71 changes: 71 additions & 0 deletions vulkanalia-sys/src/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2099,6 +2099,25 @@ pub const EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION: Extension = Extension {
promoted_to: None,
};

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_EXT_surface_maintenance1.html>
#[allow(deprecated)]
pub const EXT_SURFACE_MAINTENANCE1_EXTENSION: Extension = Extension {
name: ExtensionName::from_bytes(b"VK_EXT_surface_maintenance1"),
number: 275,
type_: "instance",
author: "EXT",
contact: "Shahbaz Youssefi @syoussefi",
platform: None,
required_extensions: Some(&[
KHR_SURFACE_EXTENSION.name,
KHR_GET_SURFACE_CAPABILITIES2_EXTENSION.name,
]),
required_version: None,
deprecated_by: None,
obsoleted_by: None,
promoted_to: None,
};

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_EXT_swapchain_colorspace.html>
#[allow(deprecated)]
pub const EXT_SWAPCHAIN_COLORSPACE_EXTENSION: Extension = Extension {
Expand All @@ -2115,6 +2134,26 @@ pub const EXT_SWAPCHAIN_COLORSPACE_EXTENSION: Extension = Extension {
promoted_to: None,
};

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_EXT_swapchain_maintenance1.html>
#[allow(deprecated)]
pub const EXT_SWAPCHAIN_MAINTENANCE1_EXTENSION: Extension = Extension {
name: ExtensionName::from_bytes(b"VK_EXT_swapchain_maintenance1"),
number: 276,
type_: "device",
author: "EXT",
contact: "Shahbaz Youssefi @syoussefi",
platform: None,
required_extensions: Some(&[
KHR_SWAPCHAIN_EXTENSION.name,
EXT_SURFACE_MAINTENANCE1_EXTENSION.name,
KHR_GET_PHYSICAL_DEVICE_PROPERTIES2_EXTENSION.name,
]),
required_version: None,
deprecated_by: None,
obsoleted_by: None,
promoted_to: None,
};

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_EXT_texel_buffer_alignment.html>
#[allow(deprecated)]
pub const EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION: Extension = Extension {
Expand Down Expand Up @@ -4094,6 +4133,22 @@ pub const KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION: Extension = Extension
promoted_to: Some("VK_VERSION_1_3"),
};

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_LUNARG_direct_driver_loading.html>
#[allow(deprecated)]
pub const LUNARG_DIRECT_DRIVER_LOADING_EXTENSION: Extension = Extension {
name: ExtensionName::from_bytes(b"VK_LUNARG_direct_driver_loading"),
number: 460,
type_: "instance",
author: "LUNARG",
contact: "Charles Giessen @charles-lunarg",
platform: None,
required_extensions: None,
required_version: None,
deprecated_by: None,
obsoleted_by: None,
promoted_to: None,
};

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_MVK_ios_surface.html>
#[deprecated(note = "deprecated in favor of `VK_EXT_metal_surface`")]
#[allow(deprecated)]
Expand Down Expand Up @@ -4922,6 +4977,22 @@ pub const QCOM_IMAGE_PROCESSING_EXTENSION: Extension = Extension {
promoted_to: None,
};

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_QCOM_multiview_per_view_viewports.html>
#[allow(deprecated)]
pub const QCOM_MULTIVIEW_PER_VIEW_VIEWPORTS_EXTENSION: Extension = Extension {
name: ExtensionName::from_bytes(b"VK_QCOM_multiview_per_view_viewports"),
number: 489,
type_: "device",
author: "QCOM",
contact: "Jeff Leger @jackohound",
platform: None,
required_extensions: None,
required_version: None,
deprecated_by: None,
obsoleted_by: None,
promoted_to: None,
};

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_QCOM_render_pass_shader_resolve.html>
#[allow(deprecated)]
pub const QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION: Extension = Extension {
Expand Down
4 changes: 4 additions & 0 deletions vulkanalia-sys/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ pub type PFN_vkDeviceMemoryReportCallbackEXT =
/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/PFN_vkFreeFunction.html>
pub type PFN_vkFreeFunction = Option<unsafe extern "system" fn(*mut c_void, *mut c_void)>;

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/PFN_vkGetInstanceProcAddrLUNARG.html>
pub type PFN_vkGetInstanceProcAddrLUNARG =
Option<unsafe extern "system" fn(Instance, *const c_char) -> PFN_vkVoidFunction>;

/// <https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/PFN_vkInternalAllocationNotification.html>
pub type PFN_vkInternalAllocationNotification = Option<
unsafe extern "system" fn(*mut c_void, usize, InternalAllocationType, SystemAllocationScope),
Expand Down
Loading

0 comments on commit 29d81d0

Please sign in to comment.