Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Vulkan-Headers to 1.4.303 #951

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Update Vulkan-Headers to 1.4.303 #951

wants to merge 8 commits into from

Conversation

MarijnS95
Copy link
Collaborator

No description provided.

@MarijnS95 MarijnS95 changed the title Update Vulkan-Headers to 1.3.297 Update Vulkan-Headers to 1.3.298 Oct 11, 2024
@MarijnS95
Copy link
Collaborator Author

MarijnS95 commented Oct 11, 2024

With the 1.3.298 upgrade we now incorporated breaking changes from KhronosGroup/Vulkan-Docs#2442 to a provisional extension.

I don't think we can address this in the current release, but I do think we can solve #343 by adding a new provisional or experimental feature flag and document that if people opt-in to that feature, we might push breaking changes for extensions behind it - driven by upstream vk.xml changes in the same fashion.

(This is not "entirely" valid in Rust terms as I don't think feature flags "allow" you to opt out of semver compatibility even if you name them as such, and I'm also not sure how often we have to rely on it, but the current "just generate/wrap it anyway" approach does lock us out of making non-breaking releases with Vulkan-Headers updates)

@MarijnS95 MarijnS95 changed the title Update Vulkan-Headers to 1.3.298 Update Vulkan-Headers to 1.3.299 Oct 22, 2024
@MarijnS95 MarijnS95 changed the title Update Vulkan-Headers to 1.3.299 Update Vulkan-Headers to 1.3.300 Oct 27, 2024
@MarijnS95 MarijnS95 changed the title Update Vulkan-Headers to 1.3.300 Update Vulkan-Headers to 1.3.301 Nov 2, 2024
Comment on lines -16201 to -16202
pub cmd_write_buffer_marker2_amd: PFN_vkCmdWriteBufferMarker2AMD,
pub get_queue_checkpoint_data2_nv: PFN_vkGetQueueCheckpointData2NV,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically a semver-breaking change too. These functions were provided by VK_AMD_buffer_marker or VK_NV_device_diagnostic_checkpoints respectively, but vk.xml previously exposed them under the VK_KHR_synchronization2 extension, and so did our generator.

@MarijnS95 MarijnS95 changed the title Update Vulkan-Headers to 1.3.301 Update Vulkan-Headers to 1.4.303 Dec 2, 2024
@MarijnS95 MarijnS95 requested a review from Ralith December 3, 2024 13:42
Comment on lines +94 to +114
/// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkMapMemory2.html>
#[inline]
#[doc(alias = "vkMapMemory2")]
pub unsafe fn map_memory2(
&self,
memory_map_info: &vk::MemoryMapInfo<'_>,
) -> VkResult<*mut ffi::c_void> {
let mut data = mem::MaybeUninit::uninit();
(self.device_fn_1_4.map_memory2)(self.handle, memory_map_info, data.as_mut_ptr())
.assume_init_on_success(data)
}

/// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUnmapMemory2.html>
#[inline]
#[doc(alias = "vkUnmapMemory2")]
pub unsafe fn unmap_memory2(
&self,
memory_unmap_info: &vk::MemoryUnmapInfo<'_>,
) -> VkResult<()> {
(self.device_fn_1_4.unmap_memory2)(self.handle, memory_unmap_info).result()
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of all the stabilized extensions, only VK_KHR_map_memory2 was missing a wrapper implementation in Ash. I'm considering to retroactively add it.

Comment on lines +53 to 58
// XXX: The below two belong in a different extension!

/// <https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDescriptorBufferOffsets2EXT.html>
#[inline]
#[doc(alias = "vkCmdSetDescriptorBufferOffsets2EXT")]
pub unsafe fn cmd_set_descriptor_buffer_offsets2(
Copy link
Collaborator Author

@MarijnS95 MarijnS95 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In vkCmdSetDescriptorBufferOffsets2EXT and vkCmdBindDescriptorBufferEmbeddedSamplers2EXT the <require> block sits inside VK_KHR_maintenance6 with an extra depends="VK_EXT_descriptor_buffer". It's a bit ugly to have the functions like this I think, given that they're EXT and not KHR. There are more such cases though.

But the Vulkan documentation also says it's clearly provided by VK_KHR_maintenance6 if VK_EXT_descriptor_buffer is also available: https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_maintenance6.html#_new_commands

And nothing is listed for VK_EXT_descriptor_buffer: https://registry.khronos.org/vulkan/specs/latest/man/html/VK_EXT_descriptor_buffer.html#_new_commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant