chore(deps): Update Rust crate ash to 0.38.0 #99
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.37.3
->0.38.0
Release Notes
ash-rs/ash (ash)
v0.38.0
Compare Source
With over two years of collecting breaking changes (since the
0.37.0
release in March 2022), April 2024 marks the next breaking release ofash
. This release introduces an overhaul of all Vulkan structures, restructures modules around extensions, and separates extension wrappers betweenInstance
andDevice
functions. The crate contains all bindings defined by the latest1.3.281
Vulkan specification, and many old and new extensions have received a hand-written extension wrapper. For a full overview of all individual changes, see the list at the end of this post.Replaced builders with lifetimes/setters directly on Vulkan structs
All
Builder
structs have been removed, and their builder functions and lifetime generic have moved to the underlying Vulkan struct. This means all types will carry the lifetime information of contained references at all times, when created using the builder pattern.Where one used to call:
Which drops lifetime information about the
&priorities
slice borrow, one now writes:And
queue_info
relies on the borrow checker to ensure it cannot outlive&priorities
.Separating extension loaders and wrappers between
instance
anddevice
functionsJust like the separation between
InstanceFnV1_x
andDevice_FnV1_x
for Vulkan core functions, all extensions now have a separate generatedInstanceFn
andDeviceFn
function pointer table (when containing one or more functions), separating out the two.High-level extension wrappers are updated to match via a separate
Instance
andDevice
struct inside a module carrying the extension name (see also below), instead of residing in a single struct. These modules are generated for all extensions including those without functions (for which noInstance
orDevice
struct is generated), complete with a reexport of the extension name and version.Restructuring of modules around extensions, function-pointer tables and high-level wrappers
Function pointer tables for both core and extensions have moved out of the "pure"
sys
-likeash::vk::
module, into theash::
root for core*FnV1_x
tables and into the extension moduleash::<prefix>::<extension name>::{InstanceFn, DeviceFn}
for extensions. High-level wrappers for these structs (originally from theash::extensions
module), together with theInstance
andDevice
structure split detailed above, have also moved into this module.For example,
ash::vk::KhrSwapchainFn
is now available asash::khr::swapchain::{InstanceFn, DeviceFn}
, and the high-levelash::extensions::KhrSwapchain
wrapper is available atash::khr::swapchain::{Instance, Device}
. The extension name and version are found underash::khr::swapchain::{NAME, SPEC_VERSION}
.Misc helpers
Various miscellaneous helpers have been introduced on low-level Vulkan structs.
For statically-sized arrays with a field bounding their length (e.g.
ash::vk::PhysicalDeviceMemoryProperties::memory_types
with thememory_types_count
field) a new_as_slice()
getter is available to retrieve the initialized portion of the slice.For null-terminated strings stored in statically-sized arrays, both
_as_c_str()
getters and more convenient setter is introduced based on theCStr
type, providingResult
-based access to these fields.no_std
supportBy disabling the default
std
feature, this crate compiles in ano_std
environment.Added
std
feature. Disabling this feature makes ashno_std
(#664)Handle::is_null()
to allow checking if a handle is aNULL
value (#694)Entry
/Instance
/Device
from handle+fns (see theirfrom_parts_1_x()
associated functions) (#748)VK_NV_memory_decompression
device extension (#761)VK_GOOGLE_display_timing
device extension (#765)VK_ANDROID_external_memory_android_hardware_buffer
device extension (#769)VK_AMD_buffer_marker
device extension (#772)VK_AMD_shader_info
device extension (#773)VK_AMDX_shader_enqueue
device extension (#776)VK_EXT_host_image_copy
device extension (#779)VK_KHR_maintenance5
device extension (#780)VK_NV_device_generated_commands_compute
device extension (#781)VK_KHR_cooperative_matrix
instance extension (#782)VK_EXT_vertex_input_dynamic_state
device extension (#784)VK_KHR_sampler_ycbcr_conversion
device extension (#785)VK_EXT_swapchain_maintenance1
device extension (#786)VK_NV_low_latency2
device extension (#802)VK_EXT_hdr_metadata
device extension (#804)VK_NV_cuda_kernel_launch
device extension (#805)descriptor_count()
setter onash::vk::WriteDescriptorSet
(#809)*_as_c_str()
getters forc_char
pointers andc_char
arrays (#831)#[must_use]
to Vulkan structs to make it more clear that they are moved by the builder pattern (#845)load_with()
function onDevice
andInstance
for providing customget_xxx_proc_addr()
implementations (#846)Send
/Sync
to all Vulkan structs (#869)VK_KHR_dynamic_rendering_local_read
device extension (#888)VK_KHR_line_rasterization
device extension (#889)VK_KHR_calibrated_timestamps
device extension (#890)VK_KHR_maintenance6
device extension (#891)VK_NV_copy_memory_indirect
device extension (#892)Changed
libvulkan.so
is now loaded without inexistent.1
major-version suffix (#626)const fn name()
with associatedNAME
constants (#715)objecttype
to<T as Handle>::ObjectType
(#724)*Fn
structs and high-level extension wrappers between instance and device functions, and moved high-level extension wrappers fromash::extensions::*
toash::<prefix>::<extension name>::{Instance, Device}
(#734)This not only allows loading
device
-optimized function pointers, it also prevents accidentally loadinginstance
functions viaget_device_proc_addr()
which would always returnNULL
, making theseinstance
functions always panic on the following high-level extension wrappers:VK_KHR_swapchain
VK_KHR_device_group
VK_EXT_full_screen_exclusive
The following extensions containing
instance
-level functions prevented this panic by loading all functions in the*Fn
loader struct viaget_instance_proc_addr()
, resulting in extra dispatch code inserted by the loader for alldevice
-level functions:VK_KHR_swapchain
VK_KHR_video_queue
VK_KHR_device_group
VK_KHR_performance_query
VK_EXT_debug_utils
VK_EXT_sample_locations
VK_EXT_calibrated_timestamps
VK_KHR_fragment_shading_rate
VK_EXT_full_screen_exclusive
VK_NV_optical_flow
get_calibrated_timestamps()
now returns a single value formax_deviation
(#738)libloading
from0.7
to0.8
(#739)p_next
-containing structs as&mut
to allow chains (#744)AccelerationStructure::get_acceleration_structure_build_sizes()
ExternalMemoryFd::get_memory_fd_properties()
ExternalMemoryWin32::get_memory_win32_handle_properties()
GetSurfaceCapabilities2::get_physical_device_surface_capabilities2()
Display
asc_void
instead of*mut c_void
to match Xlib (#751)VK_KHR_device_group_creation
: Take borrow ofEntry
infn new()
(#753)VK_KHR_device_group_creation
: Renamevk::Instance
-returning function fromdevice()
toinstance()
(#759)HANDLE
types (HWND
,HINSTANCE
,HMONITOR
) are now defined asisize
instead of*const c_void
(#797)vk::Pipeline
andvk::ShaderEXT
creation functions return their impartial result on error (#828)VK_AMDX_shader_enqueue
VK_EXT_shader_object
VK_KHR_ray_tracing_pipeline
VK_NV_ray_tracing
c_char
array setters withCStr
setters (#831)push_next()
functions now allow unsizedp_next
argument (#855)ash::extensions
intoash
, and moved*Fn
function pointer table structs fromash::vk
intoash
or the associated extension module (#894)Removed
"disabled"
extensions, typically with a number rather than a descriptive name (#448)query_count
parameter fromget_query_pool_results()
in favour ofdata.len()
(#644)debug_utils_set_object_name()
anddebug_utils_set_object_tag()
entirely, useset_debug_utils_object_name()
andset_debug_utils_object_tag()
instead (#661)get_properties
helper from extension wrappers (andext::PhysicalDeviceDrm
). Directly callget_physical_device_properties2()
with a possible chain of multiple structs instead (#728)fn load()
from empty features and extensions (#752)entry_fn_1_2
/entry_fn_1_3
and getters fromEntry
instance_fn_1_2:
and getters fromInstance
Configuration
📅 Schedule: Branch creation - "on the first day of the week" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.