- Rust version: 1.84.0
- shaderc 0.10.0
DriverId::VeriSiliconPropertaryis now correctly spelledDriverId::VeriSiliconProprietary.
Global changes:
- Where owned
Arcs and owned structs, as well as owned collections such asVecs,SmallVecs,HashMaps andBTreeMaps were previously taken as arguments, references and slices are used instead, respectively. - Where
RangeandRangeInclusivewere previously used in parameters, two separate parameters for the offset/base and size/count are now used instead to match Vulkan. - All structs containing
ImageSubresourceLayersandImageSubresourceRangenow useDefault::default()as the default value for that field, instead of an empty value (all zeroes). DeviceFeatures,DeviceExtensionsandInstanceExtensionsnow implementIntoIteratorby reference instead of by value and theIntoIterassociated type is now an opaque type.- Where the Vulkan API accepts
VK_WHOLE_SIZE,VK_REMAINING_*andLOD_CLAMP_NONE, vulkano now accepts anOptionfor the end of the range withNonemeaning that it is unbounded.
Changes to Vulkan initialization:
VulkanLibrary::newis now marked unsafe. It has always been unsafe, but marked incorrectly.Loaderwas removed. Theget_instance_proc_addrfunction pointer is now used directly instead.VulkanLibrary::with_loaderwas renamed toVulkanLibrary::from_loader.statically_linked_vulkan_loaderwas replaced withstatically_linked_vulkan_library.
Changes to devices and queues:
Device::from_handle[_borrowed]no longer retrieves queues, as this was impossible to use soundly. You should instead useQueue::from_handleto create queues when working with an external API.Device::set_debug_utils_object_nameandDeviceOwnedVulkanObject::set_debug_utils_object_nameare now marked unsafe. They have always been unsafe, but marked incorrectly.
Changes to images:
FormatPropertiesno longer has a_nefield and is now marked#[non_exhaustive]instead.ImageSubresourceLayers::layer_count,ImageSubresourceRange::level_countandImageSubresourceRange::layer_countnow default toNone.
Changes to samplers:
SamplerCreateInfo::max_lodnow defaults toNone.LOD_CLAMP_NONEwas removed.
Changes to memory allocation:
StandardMemoryAllocator::new_defaultwas removed in favor ofStandardMemoryAllocator::new(&device, &Default::default())fulfilling the same function instead.MemoryRequirementsis now marked#[non_exhaustive].
Changes to pipelines:
ColorBlendState::newandViewportState::new(previously deprecated, now undeprecated) now return the same asDefault::default().PipelineCacheCreateInfo::initial_datanow takesOption<PipelineCacheData>instead ofVec<u8>in order to makePipelineCache::newsafe.RasterizationConservativeStateno longer has a_nefield.PipelineDescriptorSetLayoutCreateInfowas replaced byPipelineLayout::from_stagesandpipeline::layout::push_constant_ranges_from_stages.
Changes to render passes:
Subpass::fromwas renamed toSubpass::new.
Changes to external memory and external sync:
- Where
Files were previously taken as arguments for importing and returned for exporting, the raw descriptor is now used instead.
Changes to descriptor sets:
WriteDescriptorSetconstructors that previously took buffers, image views and samplers were replaced with constructors that takeDescriptorBufferInfoandDescriptorImageInfo:WriteDescriptorSet::{none,image_view,image_view_with_layout,image_view_sampler,image_view_with_layout_sampler,sampler}were replaced withWriteDescriptorSet::image.WriteDescriptorSet::{none_array,image_view_array,image_view_with_layout_array,image_view_sampler_array,image_view_with_layout_sampler_array,sampler_array}were replaced withWriteDescriptorSet::image_array.WriteDescriptorSet::{buffer,buffer_with_range}were replaced withWriteDescriptorSet::buffer.WriteDescriptorSet::{buffer_array,buffer_with_range_array}were replaced withWriteDescriptorSet::buffer_array.DescriptorImageViewInfowas replaced withDescriptorImageInfo.
WriteDescriptorSetElementsis now marked#[non_exhaustive].DescriptorSetResourcesandDescriptorBindingResourceswere removed.
ashis now re-exported.- Added
newconstructors to all*Info-like structs. - Added
Instance::from_handle_borrowedandDevice::from_handle_borrowed. - Added a safe
PipelineCacheDatabinary data wrapper. - Added support for importing
D3D11TextureandD3D11TextureKmtmemory handles. ImageSubresourceLayersandImageSubresourceRangenow implementDefault.- Added proc macro
include_vulkano_glslto vulkano-shaders. Device::wait_idleis now safe.- Added
BufferAllocatorfor creating buffer allocations with any suballocation algorithm;SubbufferAllocatorhas been deprecated. - Added
Queue::from_handleandDeviceQueueInfo. - Added the
QueueMutextrait, which allows you to provide an external queue locking mechanism. - Added
VulkanLibrary::loader, which allows you to get theget_instance_proc_addrfunction pointer and give it to an external library. - Added
VulkanLibrary::from_path, which allows you to load a Vulkan library from a specific path. - Vulkano-shaders: Allow defining per-shader macros in a
shader! { shaders: { ... } }block in addition to global defines.
- When using bindless, the validation checks for
DescriptorBindingRequirementswould panic. - #2477 Incorrect validation for
win32_monitorin surfaces. - The
copy_src_layoutsandcopy_dst_layoutsdevice properties are now correctly retrieved. - #1632 Unneeded validation of
DescriptorPoolCreateInfo::pool_sizesbeing non-empty. This would manifest itself as a panic when attempting to allocate a descriptor set with no descriptors. Device::set_debug_utils_object_nameandDeviceOwnedVulkanObject::set_debug_utils_object_namenot validating that theext_debug_utilsextension is enabled on the instance.- Image creation when
drm_format_modifiersis provided, butdrm_format_modifier_plane_layoutsisn't. RawImage::subresource_layoutvalidation incorrectly rejected validMemoryPlaneaspects for DRM format modifier images.
- The
bytemuckdependency didn't specify thederivefeature which was used in the vulkano crate. This only works because thehalfdependency specified the feature itself; however, whenhalfinevitably removes this feature from itsbytemuckdependency, these versions of vulkano would no longer compile.
- Fixed a bug in
StandardMemoryAllocatorwhere if the suballocation count of aDeviceMemoryblock would drop to zero, no more suballocations could be made, leading to needless allocations of newDeviceMemoryblocks. - Fixed a panic for non-contiguous push constants ranges.
- Fixed
StandardDescriptorSetAllocator::deallocateexecuting UB when the allocation was made for a variable count descriptor set with a variable descriptor count of 0. - Vulkano-taskgraph: Fixed a panic that would happen when looking up the previous barrier and it's an initial barrier.
- ash 0.38.0 (Vulkan 1.3.281)
- raw-window-handle 0.6
- winit 0.30
- Rust version: 1.75.0
Changes to (physical) device:
Propertiesis renamed toDeviceProperties.Featuresis renamed toDeviceFeatures.PhysicalDevice::surface_present_modes(_unchecked)now returnsVec<PresentMode>instead of an iterator.
Changes to memory allocation:
Suballocator::{allocate,deallocate}now take&mut self.Suballocatorhas new required itemsSuballocationsandsuballocationsfor iterating over suballocations.Suballocator::cleanupwas replaced withSuballocator::reset, allowing any suballocator to deallocate all suballocations at once, not just the bump allocator.BumpAllocator::resetwas removed.DeviceLayout::repeatandBufferContentsLayout::layout_for_lennow takeDeviceSizeas argument.DeviceLayout::{from_layout,into_layout}return anOptionnow.
Changes to command buffers:
- Renamed
UnsafeCommandBufferBuildertoRecordingCommandBufferandUnsafeCommandBufferBuilder::buildtoend. - Renamed
UnsafeCommandBuffertoCommandBuffer. RecordingCommandBufferandCommandBufferwere moved to thecommand_buffermodule; thecommand_buffer::sysmodule was removed.AutoCommandBufferBuilder,PrimaryAutoCommandBuffer,SecondaryAutoCommandBuffer,RecordingCommandBufferandCommandBufferno longer have a type parameter for the type of allocator.RecordingCommandBuffer::execute_commandsnow takes&CommandBuffers as argument.RecordingCommandBuffer::bind_descriptor_setsnow takes&RawDescriptorSets as argument.
Changes to command buffer allocation:
CommandBufferAllocatorno longer has any associated types in order to make the trait object-safe.- There is now only the single
CommandBufferAlloctype to represent allocated command buffers. TheCommandBufferAllocandCommandBufferBuilderAlloctraits andStandardCommandBufferAllocandStandardCommandBufferBuilderAlloctypes were removed. CommandBufferAllocator::allocatenow returns a singleCommandBufferAllocon success andValidated<VulkanError>on failure.CommandBufferAllocatornow has a required methoddeallocate.
Changes to descriptor sets:
- There is now only the single type
DescriptorSetto represent descriptor sets. TheDescriptorSettrait andPersistentDescriptorSettype were removed. - Renamed
UnsafeDescriptorSettoRawDescriptorSet. DescriptorSetnow takes anArc<dyn DescriptorSetAllocator>on construction, the type parameter for the descriptor set allocator was removed.
Changes to descriptor set allocation:
DescriptorSetAllocatorno longer has anAllocassociated type in order to make the trait object-safe.- There is now only the single type
DescriptorSetAllocto represent allocated descriptor sets. TheDescriptorSetAlloctrait andStandardDescriptorSetAlloctype were removed. DescriptorSetAllocatorhas a new required methoddeallocate.
Changes to Surface:
Surface::required_extensionsnow returns a result.Surface::from_window[_ref]now takeHasWindowHandle + HasDisplayHandleas the window and return a new error type.Surface::update_ios_sublayer_on_resizewas removed as it is no longer necessary.Surface::from_window[_ref]was changed to useVK_EXT_metal_surfaceinternally on macOS and iOS.
Changes to surface creation and support functions:
- Where handles to foreign window system objects are passed, Vulkano no longer takes a generic pointer, but takes the same pointer type that Ash does.
Changes to vertex input:
VertexInputBindingDescriptionandVertexInputAttributeDescriptionare now non-exhaustive, and must be created with theDefaulttrait.- The
VertexDefinition::definitiontrait method now takes anEntryPointinstead of aShaderInterface. VertexMemberInfonow has astridemember and itsoffsetmember now has the typeu32.
Changes to render passes:
- The
is_compatible_with_shadermethods ofRenderPassandSubpassare removed.
Changes to buffers:
BufferMemoryis now marked non-exhaustive.
Changes to images:
ImageMemoryis now marked non-exhaustive.ImageMemory::Sparseno longer has a field for memory requirements, this is now queried directly from the image.
Changes to draw/dispatch commands:
- These are now
unsafe, as the shader can perform invalid operations outside of Vulkano's control.
Changes to pipelines:
GraphicsPipeline::input_assembly_statereturns an option now.
Changes to queries:
QueryTypeis now a regular Vulkan enum like others in Vulkano.- The
QueryType::result_lenmethod is moved toQueryPool, and now takes result flags into account. QueryPoolCreateInfonow has apipeline_statisticsfield to specify the pipeline statistics flags.- The
CommandBufferInheritanceInfo::query_statistic_flagsfield is renamed topipeline_statisticsto match Vulkan.
Changes to queues:
- The
Queue::id_within_familymethod is renamed toqueue_indexto match Vulkan.
Changes to shaders:
ShaderInterfaceand subtypes are removed.EntryPointInfono longer hasinput_interfaceandoutput_interfacemembers.
Changes to synchronization:
- Renamed
PipelineStages::SUBPASS_SHADINGtoPipelineStages::SUBPASS_SHADER, following upstream Vulkan changes.
Changes to Win32 APIs:
- Windows
HANDLEs are now passed usingash::vk::HANDLE, which is a type alias forisize.
Changes to vulkano-shaders:
- Shaders included via
bytes: <path-to-spv>must no longer specify a shader type, e.g.ty: <vertex>.
Changes to vulkano-util:
VulkanoWindowRenderer::acquirenow takes in anFnOnce(&[Arc<ImageView>]). This means that a closure can be called when the swapchain gets recreated.VulkanoWindowRenderer::acquirenow also takes inOption<Duration>for the swapchain acquire timeout.VulkanoWindows::create_windownow takes&ActiveEventLoopas argument.
Extensions:
khr_draw_indirect_countkhr_fragment_shading_rate(partially)khr_ray_tracing_pipelinekhr_timeline_semaphoreext_conservative_rasterizationext_host_query_resetext_map_memory_placedext_mesh_shaderext_vertex_input_dynamic_state
Device features:
extended_dynamic_state3_conservative_rasterization_modeextended_dynamic_state3_extra_primitive_overestimation_size
Vulkan APIs:
- Ability to update existing descriptor sets.
- Support for querying memory requirements directly from the device.
- Support for sparse binding.
Other:
- Partially validated versions of
submitandpresentcommands (called viaQueueGuard). - Support for 64-bit values in vertex input.
- Support for creating buffers and images that are not backed by vulkano-managed memory.
- Documented the safety requirements of shaders in the
shadermodule. - Support for the
glamcrate in thetype_for_formatmacro. - Added
DepthState::reversehelper method. VertexDefinitionnow fully supports 64-bit types and struct types in input/output interfaces.VertexDefinitionnow uses a placeholder name if a name is not present in the shader, instead of panicking.- Validation between shader code and device extensions, features and properties.
- Added
GenericMemoryAllocator::poolsfor introspection of memory allocations, along withDeviceMemoryPool,DeviceMemoryBlocks,DeviceMemoryBlockandSuballocator::suballocations. - Added
ResourceMemory::from_device_memory_unchecked. - Added
DescriptorSet::invalidate()to make vulkano forget about resources that bound to a descriptor_set, so they can be freed. - Added
memory::allocator::{align_down, align_up}. - Added
Sharing::{is_exclusive,is_concurrent}. - Added
AccessFlags::{contains_reads,contains_writes}. - Added
PhysicalDevice::presentation_supportfor determining presentation support to the surface of any window of a given event loop. - Added support for tvOS.
- Added
Suballocation[Node]::as[_usize]_rangefor cleaner slicing. - Added
DeviceLayout::{new_sized,new_unsized,for_value}for improved ergonomics when (sub)allocating buffers. - Added
DeviceAlignment::of_val. - Vulkano-shaders: Support for Vulkan 1.3 target environment.
- Vulkano-shaders: Added
generate_structs: trueoption that may be used to disable rust structs from generating. Useful in e.g. rust-gpu contexts where such functionality is not needed. - Vulkano-util:
VulkanoWindowsRenderer::swapchain_image_viewsallows access to the swapchain images. - Vulkano-util: Added a
transfer_queuemethod toVulkanoContext.
- Incorrect assert condition in
PipelineLayout::is_compatible_with. evaluate_spec_constant_oppanics with UConvert, SConvert, and FConvert.- #2398 Push constant reflection sometimes uses the wrong types, and doesn't correctly reflect push constants with multiple entry points.
surface_capabilitiesdemands thatwin32_monitorbeSomeorNonein the wrong cases.- Improved and more accurate validation of vertex input.
- #1738: Validation of shader interface matching is insufficient.
- Improved and more accurate validation of fragment output.
RecordingCommandBuffer::endbeing safe to call.- Fix wrong comparison in push constant size validation check.
- Unnecessarily strict validation that disallowed providing a single DRM format modifier without an explicit layout.
- Fixed the alignment check when (sub)allocating buffers that would limit the alignment to 64 at maximum, even though some applications might need buffers with higher alignments that aren't read/written by the host. The check is now only present when reading/writing a buffer.
- Fix UB in debug messenger when driver reports null pointers for empty arrays.
FreeListAllocatornot giving out suballocations that are free and of suitable size/alignment in a certain edge case.- Fixed descriptor sets with
UPDATE_AFTER_BINDorPARTIALLY_BOUNDbeing wrongly validated on bind. - Fixed non-default image view usage being ignored.
- Fixed an off-by-one error in
SubpassDescription::validate. - Made resizing smooth on macOS and iOS, and let it interoperate better with windowing libraries.
- Fixed compiling on iOS.
- Fixed UB in
GenericMemoryAllocator::deallocatearising due to invalid pointer provenance given out on allocation. - Fixed UB in
impl VertexBufferCollection for Vec<Subbuffer<T>>where aVecwas being transmuted. - Fixed
AllocationHandle::as_indexbeing a const fn, as it is UB to observe the address of a pointer in const eval. - #2607: Incorrect buffer used in acceleration structure build validation
- #2619:
DescriptorBindingRequirementsnot including bindings referenced viaOpInBoundsAccessChain. - Validation error when using
OpReadClockKHRin shaders with device featureshader_subgroup_clockorshader_device_clockenabled. - Vulkano-shaders: Fixed shader struct names that are invalid rust idents from panicking the shader! macro. Rust-gpu emitted struct names such as
foo::bar::MyStructnow work. - Vulkano-shaders: Fixed
shader!invocations using thebytesoption not getting recompiled automatically when the source file changes.
StandardDescriptorSetAllocatorpanicking due to an arithmetic overflow when arithmetic overflow checks are enabled.- Vulkano-util still depending on the now-deprecated vulkano-win.
- ash 0.37.3 (Vulkan 1.3.251)
- libloading 0.8
Changes to pipeline construction:
- Pipelines are now constructed with the standard complement of
new,new_uncheckedandfrom_handleconstructors, that each take aComputePipelineCreateInfoorGraphicsPipelineCreateInfostruct. - Pipeline layouts are no longer automatically constructed when creating a pipeline. You can auto-create a pipeline layout (and modify the auto-generated parameters if needed) using the new
PipelineDescriptorSetLayoutCreateInfotype. GraphicsPipelineCreateInfo::vertex_input_staterequires aVertexInputStatestruct directly, instead of aVertexDefinition. TheVertexDefinitiontrait can be used to create the struct.GraphicsPipelineCreateInfonow requires you to provideinput_assembly_state,rasterization_state,multisample_stateandcolor_blend_stateinstead of them having default values. You can still calldefault()to generate default values for each of them.- Instead of an entry point and specialization constants, pipeline construction now takes a
PipelineShaderStageCreateInfostructure.GraphicsPipelineCreateInfohas astagesmember that takes all shader stages at once, instead of separate members for each shader type.EntryPointnow owns instead of borrows a reference to theShaderModule, so this is easier. - Specialization constants are now provided by calling
ShaderModule::specializewith aHashMapcontainingSpecializationConstantenum values. This produces aSpecializedShaderModulevalue, which you can then create anEntryPointfrom. - The
SpecializationConstantstrait is removed, andvulkano_shadersno longer generates structs for specialization constants. ViewportStateis now a standard struct with two fields,viewportsandscissors.- The
originanddimensionsfields ofViewportandScissorsare renamed tooffsetandextentto match Vulkan. Viewport::depth_rangeis now an inclusive range.- All fields of
AttachmentBlendare renamed to match Vulkan. - Added a
_nefield to all pipeline state create info structs, as they should have had all along. - Dynamic state is now specified with the
GraphicsPipelineCreateInfo::dynamic_statefield.
Changes to images:
- There is now only the single type
Imageto represent images.ImageAccess,ImageInner,AttachmentImage,ImmutableImage,StorageImageandSwapchainImagewere removed. ImageViewno longer has a type parameter,ImageViewAbstractwas removed.- Removed
ImageAccessFromUndefinedLayout,ImmutableImageCreationError,ImmutableImageInitializationandMipmapsCount. Imagewas moved to theimagemodule.ImageDimensionsis removed.ImageCreateInfonow instead hasimage_type,extentandarray_layersto match Vulkan. Some of the methods ofImageDimensionshave been turned into bare functions in theimagemodule.ImageCreateFlags::ARRAY_2D_COMPATIBLEis renamed toDIM2D_ARRAY_COMPATIBLEto better match the Vulkan name (but within the limitation that identifiers can't start with a digit).ImageCreateInfo::stencil_usageis now anOption<ImageUsage>.
Changes to buffers:
- The
Subbuffer::{try_cast, try_cast_slice, try_from_bytes}functions were replaced bySubbuffer::reinterpret[_ref]. - The
buffer_with_range(_array)constructor ofWriteDescriptorSetnow takesDescriptorBufferInfostructs. - Index buffers are now specified using the
IndexBufferenum instead of theIndextrait. ExternalBufferInfo::sparsewas replaced by aflagsfield.Subbuffer::mapped_ptrwas replaced bySubbuffer::mapped_slice.
Changes to errors:
- Added new types
ValidationErrorandValidated(enum ofValidationError+ something else) to return errors from any function. Some existing functions have been converted to use these types, others will follow later. AllocationCreationErroris renamed toMemoryAllocatorError.SuballocationCreationErroris renamed toSuballocatorError.
Changes to command buffers:
SyncCommandBuffer(Builder)is merged into*AutoCommandBuffer(Builder). The commands that formerly belonged toSyncCommandBufferBuilderare now available as_uncheckedversions onAutoCommandBufferBuilder.- Command buffers are now created with a wrapping
Arclike other object types. - The type parameter of
PrimaryCommandBufferandSecondaryCommandBufferis now the allocator itself (like for the builder) rather than its allocation type. UnsafeCommandBuffer(Builder)now takes ownership of the command buffer allocation, and has a type parameter for the allocator.CommandPoolResetErroris renamed toResetCommandPoolError.- Command pool creation and resetting now take
CommandPoolCreateFlagsandCommandPoolResetFlagsrespectively. - All validated binding and dynamic state commands now return
Resultinstead of panicking, just like the other commands. - The
begin_render_pass,next_subpassandend_render_passcommands now takeSubpassBeginInfoand/orSubpassEndInfoparameters. Nothing has changed functionally, but this allows for future-compatibility. UnsafeCommandBufferBuildernow performs some validation, when it does not rely on tracking any state. The old, completely unvalidated commands have been renamed with_uncheckedadded to the end.
Changes to descriptor sets and descriptor set layouts:
PersistentDescriptorSet::newnow takes an additional parameter, specifying descriptor set copy operations.DescriptorSetLayoutCreateInfo::push_descriptorhas been replaced with a more genericflagsfield.DescriptorSetLayoutBinding::variable_descriptor_counthas been replaced with a more genericbinding_flagsfield.DescriptorPool::allocate_descriptor_setsis now validated, and returnsDescriptorPoolAllocobjects.DescriptorSetAllocator::allocatereturnsValidated<VulkanError>as its error type.UnsafeDescriptorSet::updateis now partially validated, and takes slices instead of iterators.UnsafeDescriptorSetnow owns its allocation.
Changes to render pass objects:
AttachmentDescription::stencil_load_opandstencil_store_opare now wrapped in anOption. If it isNone, the value is taken fromload_opandstore_opinstead.SubpassDescription::resolve_attachmentsis renamed tocolor_resolve_attachments.- Renamed
LoadOpandStoreOptoAttachmentLoadOpandAttachmentStoreOpto match the Vulkan names. - In the
single_pass_renderpassandordered_passes_renderpassmacros, theloadandstorefields for attachments are renamed toload_opandstore_op, and ordered below theformatandsamplesfields, to match the fields of theAttachmentDescriptionstructure.
Changes to instances:
InstanceCreateInfo::enumerate_portabilityhas been replaced with a more genericflagsfield.DebugUtilsMessengerCreateInfo::user_callbackis now a custom typeDebugUtilsMessengerCallback, and is unsafe to create.- The debug messenger callback now takes three parameters instead of one, corresponding to the first three parameters of the Vulkan callback (the fourth, user data, is represented by the closure itself).
InstanceCreateInfonow has adebug_utils_messengersfield. TheInstance::with_debug_utils_messengersconstructor is removed, as the unsafety has been moved to the user callback construction itself.
Changes to DescriptorPool:
DescriptorPool::newnow returns validation errors instead of panicking.DescriptorPoolCreateInfo::can_free_descriptor_setshas been replaced with a more genericflagsfield.
Changes to pipeline caches:
- They are now constructed with the standard combination of a
newconstructor and aPipelineCacheCreateInfo.
Changes to Swapchain:
- Swapchain creation no longer returns an error when the swapchain extent doesn't match the current surface extent. This requirement is ill-defined in the spec, as detailed here: TOCTOU race condition on minImageExtent/maxImageExtent?.
- Renamed
acquire_full_screen_exclusiveandrelease_full_screen_exclusivetoacquire_full_screen_exclusive_modeandrelease_full_screen_exclusive_modeto match the Vulkan names. acquire_next_imageandwait_for_presentnow returnValidated<VulkanError>as their error type.
Changes to samplers:
- The
samplermodule is now a submodule ofimage.
Changes to Format:
- The following objects now use
Formatinstead ofOption<Format>:BufferView,Image,ImageView,SamplerYcbcrConversion. - The
block_sizemethod no longer returns anOption. - The
type_color,type_depthandtype_stencilmethods are renamed tonumeric_format_color,numeric_format_depthandnumeric_format_stencil, and the returned type is renamed toNumericFormat. ShaderScalarTypeis renamed toNumericType.
Changes to memory allocation:
- The memory (sub)allocation API has been completely reworked.
BufferandSubbufferAllocatornow take anArc<dyn MemoryAllocator>on construction.SuballocatorandMemoryAllocatornow have explicitdeallocatemethods in order to fix all the flexibility issues.Suballocatoris completely generic now in regards to the type of suballocation.SuballocationCreateInfowas removed.MemoryAllocatePreferenceandAllocationTypeare no longer marked#[non_exhaustive].MemoryAllocwas replaced byResourceMemory,MemoryAllocnow only represents specifically allocations made byMemoryAllocator.PoolAllocatorwas removed.GenericMemoryAllocatorCreateInfo::allocation_typewas removed.
AllocationCreateInfo::usageandSubbufferAllocatorCreateInfo::memory_usagewere replaced by amemory_type_filterfield, to allow for a more flexible selection of the memory type. Additionally,SubbufferAllocatorCreateInfo::memory_type_filterdefaults toMemoryTypeFilter::PREFER_DEVICEfor consistency withAllocationCreateInfo, unlike the previous default ofMemoryUsage::Upload.SubbufferAllocatorCreateInfo::buffer_usageis now empty by default for consistency withBufferCreateInfo.MemoryAlloc::newno longer returns aResult, and doesn't map theDeviceMemoryautomatically anymore.MemoryAlloc::mapped_ptrandMemoryAlloc::mapped_slice[_mut]were replaced byMemoryAlloc::mapped_slice, which returns a pointer.MemoryAlloc::{invalidate, flush}_rangenow take aMappedMemoryRangeas argument.- Merged
MemoryAllocator::allocate_from_type_uncheckedintoMemoryAllocator::allocate_from_typeandMemoryAllocator::allocate_uncheckedintoMemoryAllocator::allocate. - Replaced
MemoryAllocator::allocate_dedicated_uncheckedwithMemoryAllocator::allocate_dedicated. FreeListAllocator,BuddyAllocatorandBumpAllocatorare no longerSync.GenericMemoryAllocatorCreateInfo::block_sizesnow represents a block size per memory type, instead of per memory heap, to allow for a more fine-grained configuration.- Merged
GenericMemoryAllocator::new_uncheckedintoGenericMemoryAllocator::new.
Changes to descriptor set allocation:
StandardDescriptorSetAllocatornow takes aStandardDescriptorSetAllocatorCreateInfoparameter.
Changes to command buffer allocation:
StandardCommandBufferAllocatorCreateInfo::secondary_buffer_countnow defaults to 0.
Changes to synchronization primitives:
Event::signaledis renamed tois_signaled, to match the method onFence.- The
set_rawandreset_rawmethods ofEventare removed. Event::resetis nowunsafe, as it has preconditions that cannot be validated.FenceCreateInfo::signaledis replaced with aflagsfield.
Changes to queries:
QueryandQueriesRangeare removed. Theget_resultsmethod is moved toQueryPooldirectly.
Changes to futures:
FlushErroris replaced withValidated<VulkanError>.
Changes to the khr_display extension:
- The API is completely refactored.
- Getting displays and display planes is now done from the physical device.
- All features are now available.
Changes to the physical device:
- The
PhysicalDevice::surface_present_modesmethod now takes an additionalSurfaceInfoparameter.
- Vulkano-shaders: Added a
root_path_envproperty to allow loading shaders generated by a build script. - Support for the
khr_deferred_host_operationsextension. - Added
image_view_with_layout(_array)andimage_view_with_layout_sampler(_array)constructors toWriteDescriptorSet, which let you control the image layouts used for image views bound to a descriptor. - Added
Surface::from_window[_ref]andSurface::required_extensions. This is now the preferred way of creating a surface, vulkano-win has been deprecated. - Added support for the
khr_acceleration_structureandkhr_ray_queryextensions. PipelineLayoutCreateInfonow has aflagsfield.- Added
Device::descriptor_set_layout_supportfrom thekhr_maintenance3extension. - Support for the
khr_depth_stencil_resolveextension.SubpassDescriptionnow has additionaldepth_stencil_resolve_attachment,depth_resolve_modeandstencil_resolve_modefields. - Support for the
khr_separate_depth_stencil_layoutsextension.AttachmentReferencenow has an additionalstencil_layoutfield, andAttachmentDescriptionnow has additionalstencil_initial_layoutandstencil_final_layoutfields. - Added
flagstoRenderPassCreateInfo,AttachmentDescriptionandSubpassDescription. - Support for the
khr_device_group_creationextension. - Added support for
InlineUniformBlockdescriptors. - When creating an instance or device, you only need to specify the extensions and features you actually care about. Any extensions and features that are required by the extensions that you specified are now automatically enabled too.
- Support for the
ext_surface_maintenance1and most of theext_swapchain_maintenance1extension. - Added a
domain_originfield toTessellationState. - Added the trait
InstanceOwned. - Debug formatting of Vulkan objects no longer follows references to other objects, instead only printing their handles, in order to alleviate the spam.
- Added
ImageCreateFlags::EXTENDED_USAGEfrom thekhr_maintenance2extension. - Support for the
ext_image_drm_format_modifierextension. - Support for the
ext_image_2d_view_of_3dextension. - Added
Format::UNDEFINED, and implementedDefaultwhich returns this value. ShaderModuleis now constructed with anewmethod, which takes aShaderModuleCreateInfostruct. The old constructorsfrom_wordsandfrom_bytesare deprecated.- Added a
set_debug_utils_object_namemethod to theDeviceOwnedtrait. - Support for the
ext_subgroup_size_controlextension. - Support for the
khr_image_format_listextension. - Support for the
khr_swapchain_mutable_formatextension. - Support for pipeline derivatives.
- Support for the
khr_get_display_properties2extension. - Added
DeviceMemory::{map, unmap, mapping_state, invalidate_range, flush_range},MappedDeviceMemoryhas been deprecated. - Added
MemoryMapInfo,MemoryUnmapInfo,MappingStateandMappedMemoryRange. - Added
ShaderModule::single_entry_point()which may replaceentry_point("main")calls in common setups. - Added
ShaderModule::single_entry_point_with_execution. - Added
GenericMemoryAllocatorCreateInfo::memory_type_bitsandAllocationCreateInfo::memory_type_bits. - Vulkano-shaders: support for specialization-constant-sized arrays in structs (they are generated with the size specified as fallback in the specialization constant initializer).
- Added the
DeviceAddressandNonNullDeviceAddresstypes to the crate root. - Support for the
ext_private_dataextension. - Added the
UPDATE_AFTER_BIND,UPDATE_UNUSED_WHILE_PENDINGandPARTIALLY_BOUNDflags toDescriptorBindingFlags, as well asDescriptorSetLayoutCreateFlags::UPDATE_AFTER_BIND_POOLandDescriptorPoolCreateFlags::UPDATE_AFTER_BIND.
- #2184:
VK_KHR_get_physical_device_properties2not used inDevicecreation for Vulkan 1.1 and later. - Fixed UB in
ShaderModule::from_bytes[_with_data], where an unaligned reference could have been created. - Fixed a bug when using
GenericMemoryAllocatorconfigured not to use dedicated allocation, where a dedicated allocation wasn't created even when required. - Fixed UB in
{AutoCommandBufferBuilder, UnsafeCommandBufferBuilder}::push_constantswhere a reference to uninitialized bytes could have been created. Device::set_debug_utils_object_nameno longer exhibits use-after-free UB.- #2248: Meanings of | and & operators for extensions were swapped.
- Fixed validation for the
AllocationTypeof allocations inRawImage::bind_memory, where the image tiling wasn't taken into consideration. - vulkano-shaders: Use a placeholder name instead of erroring out, when the shader doesn't contain a name for a struct.
- #2203: Shader reflection fails to find descriptor set variables if multiple
OpAccessChaininstructions are themselves chained. - vulkano-shaders: Invalid emitted code for shader input/output interfaces if the shader is missing a name decoration.
- Fixed potential UB when using
MemoryAlloc::try_unwrap, where the allocation was mapped on construction of theMemoryAllocbut not unmapped on unwrapping, allowing double-mapping. - Fixed a bug in
GenericMemoryAllocator::allocate, where the root allocations weren't created with the configuredAllocationType. - Specialization constants are now applied to the reflected SPIR-V code before any other reflection is performed.
- Fragment shaders cannot use
dual_src_blenddevice feature due to interface errors. - Vulkano-shaders: handle pointers correctly when they appear in composite types.
Changes to all Vulkan bitflag types:
- They are now implemented as wrappers around an integer, instead of as a struct of
bools. - The fields of the struct have been replaced with associated constants, using uppercase names as is the convention.
- All functions that take or return one of these types now take them by value (copy).
- Bitflag types that have a corresponding enum type now have the following additional items:
- A
contains_enummethod that takes a value of the enum, and returns whether the bitflags contain the flag corresponding to that enum. - A
Fromimplementation to convert the enum to the bitflags type, with a single flag set. - A
FromIteratorimplementation that collects an iterator of enums into a single bitflag value. - An
IntoIteratorimplementation that does the reverse.
- A
Changes to two swapchain bitflag types:
SupportedSurfaceTransformsis renamed toSurfaceTransforms.SupportedCompositeAlphais renamed toCompositeAlphas.
Changes to buffers:
- Merged
CpuAccessibleBuffer,DeviceLocalBuffer,BufferSlice,CpuBufferPoolChunk,CpuBufferPoolSubbufferintoSubbuffer. - Removed
BufferAccess,TypedBufferAccess,BufferAccessObject,BufferInnerandBufferViewAbstract. - Replaced
CpuBufferPoolwithSubbufferAllocator, which is now marked!Syncand no longer has aTtype parameter. The type parameter was moved to the methods, to allow one allocator to allocate as many types of buffers as needed. - All methonds on
BufferContentshave been replaced.
Changes to DescriptorRequirements:
- The struct has been split into two levels: the per-binding
DescriptorBindingRequirements, and the per-descriptor-indexDescriptorRequirements. - The
descriptor_requirementsmethod of various types has been renamed todescriptor_binding_requirementsto match. DescriptorBindingRequirementshas a singledescriptorsmember instead of multipleHashSetmembers. This member is aHashMapwithOption<u32>as the key type. The keyNoneholds requirements for non-constant indices, while requirements for constant indices are stored asSome.- Validation checks against the requirements, and pipeline barriers, now always include the requirements of the
Nonekey as well. This may result in false positives, but prevents false negatives. DescriptorRequirementsnow hasmemory_readandmemory_writemembers, which hold aShaderStagesvalue for the stages which read or write the resource. This is used for more fine-grained pipeline barriers.
Changes to the sync module and types:
- Split the module into several submodules:
event,fence,future,semaphore. - Added the
DependencyFlagstype, which is now used byDependencyInfoandSubpassDependency. - Renamed
QueueFamilyTransfertoQueueFamilyOwnershipTransferand made it into an enum to prevent invalid usage.
Changes to GpuFuture:
- The
check_buffer_accessandcheck_image_accessmethods now return nothing on success.
Changes to pipelines:
- The
descriptor_binding_requirementsmethod is moved to thePipelinetrait, and returns a reference to the hashmap directly.
Changes to impl_vertex, VertexMember and VertexMemberInfo:
VertexMember::formatnow directly returns aFormatVertexMemberInfonow holds format andVertexMemberTywas removed.impl_vertexwas updated to correctly use the newVertexMember::formatsignature.
Changes to memory and allocation:
MemoryRequirements::{size, alignment}fields have been replaced with a singlelayoutfield.Suballocator::allocate_uncheckedhas been removed.- Device properties that represent alignments are now generated with the type
DeviceAlignmentinstead ofDeviceSize. - Removed
FastMemoryAllocator, because it was giving people the wrong impression that this is a type of allocator that is employed often and for general tasks, which couldn't be further from the truth. - Renamed
MemoryUsage::GpuOnlytoMemoryUsage::DeviceOnly. - Marked
MemoryUsage,MemoryAllocatePreferenceandAllocationTypeas non-exhaustive. AllocationCreateInfo::{requirements, allocation_type, dedicated_allocation}fields were removed.- Added the parameters
requirements,allocation_type,dedicated_allocationtoMemoryAllocator::allocate[_unchecked].
Changes to vulkano-shaders:
- Struct fields are now padded using
Padded, instead of generating additional fields. - The
types_metaoption has been removed in favor ofcustom_derives. Additionally, a derive forBufferContentsis automatically added to the generated structs, so there is no need to specify anything in order to use the structs in buffers. - The
tymodule is no longer generated. All types are generated in the same module where the macro call resides.
- Added
SubbufferAllocatorCreateInfo. - Allow waiting on
SwapchainAcquireFuture. - Implement
IntoIteratorforFeatures,DeviceExtensionsandInstanceExtensions. - A
buffer_with_rangeconstructor forWriteDescriptorSet, which can be used to select the range within the buffer that should be bound. This must be used when using dynamic buffers. - Added a derive macro for the
Vertextrait. Theimpl_vertexmacro andVertexMembertrait are deprecated. BufferDefinitionmatching logic was updated to work with the newVertexMemberInfoand now matches based on scalar type, number of components and number of elements allowing the use of formats such as*_UNORM.GraphicsPipelineBuildervalidation was extended to make sure locations are not bound multiple times when a single attribute spans multiple locations (e.g. using double precision float formats).- Added documentation of the cargo features to the main documentation page of each crate.
- Added documentation of
_uncheckedfunctions to the main documentation page. - Added
DeviceLayoutandDeviceAlignment. - Added the type alias
NonZeroDeviceSize. - Added
VertexBufferDescriptionand three new methods to theVertextrait that return it:per_vertex,per_instanceandper_instance_with_divisor. This deprecates and replacesBuffersDefinition. - Implemented
From<SampleCount>foru32. - Added documentation to the
shadermodule to explain the layout of buffers, push constants and other data accessed by shaders. - The macros
single_pass_renderpass!andordered_passes_renderpass!now allow trailing commas in various places. - Added a
BufferContentsderive macro. You no longer need to usebytemuckto read/write your structs form/to buffers. - Added
BufferContentsLayout. - Added support for allocating buffers with any kind of unsized contents, not just slices. These can also be read/written from the host.
- Added
Padded, which can be used to pad struct fields as well as array elements/matrix columns. - Added support for the
VK_EXT_external_memory_dma_bufextension, which allows importing an image from a Linux dma_buf. - Vulkano-shaders: All error messages are now appropriately spanned compile-errors, instead of being panics.
- Vulkano-shaders: Added support for arrays (and by extension matrices) whose stride exceeds the size of the element type in Rust (e.g.
vec3[]). - Vulkano-shaders: Added a
linalg_typeoption to the macro, for generating types from external linear algebra crates. - Vulkano-win: Added
create_surface_from_handle_ref. - Vulkano-win: The features
winitandraw-window-handlecan now be used directly,winit_andraw-window-handle_have been deprecated.
- #2094: Fixed debug assertion when the first command in a command buffer that uses an image expects it to be in the
Undefinedlayout. - Fixed wrong aspects being used in pipeline barriers when an image view selects one aspect of a combined depth+stencil image.
- Fixed panic when building a finished command buffer, if the command buffer contains commands that use only some subresources of an image.
- Fixed possible arithmetic overflows when allocating memory with a size that's too large.
- Added missing check for the allocation type when binding memory.
- #2130: Fixed getting memory requirements on swapchain images, which don
- Vulkano-shaders: Fixed an "expected expression, found
," compile error for precompiled shaders with more than one entrypoint. - #2149: Image data being discarded when transitioning from UNDEFINED in StorageImage
- Vulkano-shaders:
mat3xNis now generated correctly, taking its matrix stride into account. - Vulkano-shaders: Row-major matrices are now generated correctly.
- Fixed potential panics during panics.
- Fixed issue with
MemoryAlloc::mapped_ptrnot being adjusted for offset.
- Fixed another issue with
CpuBufferPool<T>, where the alignment ofTwas not being considered when allocating.
- #2074: Fixed error on multiple draw calls using a texture that had a layout transition.
- Fixed an issue with
CpuBufferPool<T>, where the alignment ofTwas not being considered when allocating. - Fixed an issue with
CpuBufferPool, where the allocated subbuffers did not respect the non-coherent atom size for non-host-coherent memory types.
Changes to queue operations:
- To do operations on a queue, you must now call
withto gain access. This takes a closure that is passed a - The
waitmethod of devices and queues is renamed towait_idleto match Vulkan. Queuenow implementsVulkanObjectinstead ofSynchronizedVulkanObject, which is removed.Queuenow takes ownership of resources belonging to operations that you execute on it, to keep them from being destroyed while in use.- If
Queueis dropped, it will callwait_idleto block the current thread until all operations on it have completed. - The
command_buffer::submitmodule has been removed. TheSubmitAnyBuilderenum is moved to thesyncmodule, and no longer has a lifetime parameter.
Changes to Surface, Swapchain and swapchain operations:
Surface,Swapchain,SwapchainImageandSwapchainAcquireFutureand related functions no longer have aWtype parameter.- All constructors of
Surfacenow takeOption<Arc<dyn Any + Send + Sync>>instead of a genericW. Thewindowfunction has been renamed toobjectand likewise returnsOption<&Arc<dyn Any + Send + Sync>>. - Vulkano-win:
create_surface_from_handletakes anArc<impl Any + Send + Sync + HasRawWindowHandle + HasRawDisplayHandle>,create_surface_from_winittakes anArc<Window>. PresentInfohas been renamed toSwapchainPresentInfoand has differently named members and constructor.acquire_next_imagereturns anu32index to match Vulkan.
Changes to GpuFuture:
- Added required method
check_swapchain_image_acquired. AccessError::SwapchainImageAcquireOnlyhas been renamed toSwapchainImageNotAcquired.
Changes to command buffers and command pools:
- Renamed
CommandPooltoCommandBufferAllocator,StandardCommandPooltoStandardCommandBufferAllocator, andUnsafeCommandPooltoCommandPoolto better reflect their action. - Removed
Device::with_standard_command_pool. AutoCommandBufferBuilder::{primary, secondary}now take an implementation ofCommandBufferAllocatorinstead of theDevice.- The
PrimaryCommandBufferandSecondaryCommandBuffertraits are renamed toPrimaryCommandBufferAbstractandSecondaryCommandBufferAbstract.
Changes to descriptor sets and descriptor pools:
- Renamed
DescriptorPooltoDescriptorSetAllocator,StandardDescriptorPooltoStandardDescriptorSetAllocator, andUnsafeDescriptorPooltoDescriptorPoolto better reflect their action. DescriptorPoolmethods now take&selfand the type itself is!Sync.- Removed
SingleLayoutDescPoolandSingleLayoutVariableDescPool. - Removed
Device::with_standard_descriptor_pool. - Descriptor set allocators must now be managed manually.
PersistentDescriptorSet::{new, new_variable}now take an implementation ofDescriptorSetAllocator,PersistentDescriptorSet::new_with_poolhas been removed.
Changes to buffers and images:
DeviceLocalBuffer::{from_buffer, from_data, from_iter}andImmutableImage::{from_iter, from_buffer}now take a mutable reference to anAutoCommandBufferBuilderinstead of a queue, and no longer return a future. The upload command will be recorded into the provided command buffer, which should be executed later.- When binding memory to a buffer with the
shader_device_addressusage, and theext_buffer_device_addressextension isn't enabled, the memory must now have been allocated with theMemoryAllocateFlags::device_addressflag set. UnsafeBufferandUnsafeImageare renamed toRawBufferandRawImage.UnsafeBufferCreateInfoandUnsafeImageCreateInfoare renamed toBufferCreateInfoandImageCreateInfo.ImageCreateInfonow takes aflagsinstead of separate booleans.- Replaced the various unsafe
*_linear_layoutmethods ofUnsafeImagewith a safesubresource_layoutmethod. TheLinearLayoutstruct is renamed toSubresourceLayoutto match. - Added
bind_memorymethods to these two types. These takeselfby value, and returnBufferandImageon success. - Added
BufferandImagetypes, which represent buffers and images that have had memory bound to them. This memory can be retrieved using thememory()method. - Most previous uses of
UnsafeBufferandUnsafeImagenow useBufferandImageinstead.
Changes to the VulkanObject trait:
- The method
internal_objectis renamed tohandle, and the associated typeObjectis renamed toHandle.
Changes to PipelineStages:
- The
transferflag has been renamed toall_transfer.
Changes to SubpassDependency, MemoryBarrier, BufferMemoryBarrier, ImageMemoryBarrier:
- Fields that start with
source_have been renamed tosrc_. - Fields that start with
destination_have been renamed todst_.
Changes to the set_event command:
- This command now takes a
DependencyInfoinstead ofPipelineStages, to enable use of thevkCmdSetEvent2version.
Changes to memory allocation:
MemoryPoolhas been replaced withMemoryAllocatorandStandardMemoryPoolhas been replaced withStandardMemoryAllocator.- Removed
AllocFromRequirementsFilter,MemoryPoolAlloc,MappingRequirement,AllocLayout,PotentialDedicatedAllocation,StandardNonHostVisibleMemoryTypePool,StandardNonHostVisibleMemoryTypePoolAlloc,StandardHostVisibleMemoryTypePool,StandardHostVisibleMemoryTypePoolAllocandStandardMemoryPoolAlloc. - Memory allocators must now be managed manually.
- Buffer and image constructors now take an implementation of the
MemoryAllocatortrait.
- Buffer and image constructors now take an implementation of the
- Added
bind_sparse_unchecked,present_uncheckedandsubmit_uncheckedmethods toQueueGuard. - Added the
device_coherent,device_uncachedandrdma_capableflags toMemoryPropertyFlags, and improved the documentation of all flags with additional usage advice. - Some methods of
PhysicalDevicenow cache their results, so that another call with the same arguments will retrieve them faster. - Fence methods are now validated and synchronized, so they take
&self. - When calling
Fence::is_signaledorFence::wait, if the fence is associated with a queue, any resources of the associated queue operation will be released. VulkanLibrary::extension_properties, to mirror the equivalent function onPhysicalDevice.VulkanLibrarymethodslayer_extension_properties,supported_layer_extensionsandsupported_extensions_with_layers, to query the extensions supported by layers.- Added the remaining missing variants of the
ColorSpaceenum. - Added a
supports_protectedmember toSurfaceCapabilitiesfor thekhr_surface_protected_capabilitiesextension. - Support for the
ext_validation_featuresextension. - Support for the
khr_external_fence_fdandkhr_external_fence_win32extensions. - Added
MemoryAllocateFlags. - Added
Device::allocation_count. - Support for the
khr_external_semaphore_fd,khr_external_semaphore_win32andfuchsia_external_semaphoreextensions. Semaphore::export_fdis no longer unsafe.- Added support for all remaining
PipelineStagesandAccessFlags, including those from thesynchronization2feature. - Added support for
synchronization2to theset_event,reset_eventandwrite_timestampcommands, and toSubpassDependencywhen creating a render pass. - Added the
wait_eventscommand toSyncCommandBufferBuilderandUnsafeCommandBufferBuilder. - Added the
Suballocatortrait and 4 of its implementors:FreeListAllocator,BuddyAllocator,PoolAllocatorandBumpAllocator. - Added
GenericMemoryAllocatorand its configurationGenericMemoryAllocatorCreateInfo. - Added
MemoryAlloc,AllocationCreateInfo,AllocationCreationError,MemoryUsage,MemoryAllocatePreference,MemoryTypeFilter,SuballocationCreateInfoandSuballocationCreationError. - Added a
flagsfield toBufferCreateInfo. This contains no flags yet, but will in the future. - Added the
disjointflag toImageCreateFlags. This flag is used in combination with multi-planar images, to bind separate memory to each plane of the image. It is not yet supported for the higher-level image types. - Added
StandardCommandBufferAllocatorCreateInfo. - Added
StandardCommandBufferAllocator::{try_reset_pool, clear}. - Added a spinning
Futureimplementation toFenceandFenceSignalFuture.
- #2004: A swapchain image could be presented without being acquired.
- #1871: Layer extensions are not included when validating extensions to enable on an instance.
- Fixed missing validation when binding memory to a buffer with the
shader_device_addressusage. - Queue family count isn't being set in either
ash::vk::BufferCreateInfoorash::vk::ImageCreateInfo. - Validation checks for
khr_portability_subsetdevices. - Depth and stencil attachments are now properly checked when using dynamic rendering.
- Proper error (
NoStencilAttachment) is now being returned if stencil attachment format is missing. - Fixed an issue with missing synchronization between a command buffer and any that were previously submitted on the same queue.
SwapchainCreateInfodocumentation correction.- Fixed an issue with
CpuAccessibleBuffer<T>, where the alignment ofTwas not being considered when allocating.
- Incorrect check for descriptor set validity when the shader declares a runtime-sized array.
- #2018: Incorrect handling of
VK_SUBOPTIMAL_KHRcaused a panic when presenting.
- winit 0.27
- raw-window-handle 0.5
- half 2
Changes to Instance and Vulkan initialization:
FunctionPointersis renamed toVulkanLibrary, and now resides in a separatelibrarymodule. It is re-exported from the crate root.- The
Loadertrait is now in thelibrarymodule. Instancenow requires aVulkanLibraryobject, which you must create beforehand.- The
auto_loaderfunction is removed. - Supported extensions and layers are now retrieved from the
VulkanLibraryobject. The oldlayers_listandInstanceExtensionsmethods are removed. - The deprecated methods of
DeviceExtensionsare removed. - Vulkano-win:
required_extensionsnow requires a reference toVulkanLibrary. VulkanLibrary::get_instance_proc_addris nowunsafe, and returnsash::vk::PFN_vkVoidFunction.
Changes to Vulkano-util:
- Required instance extensions for surface creation aren't added until
VulkanoContextis created. - The
instance,device,graphics_queueandcompute_queuemethods ofVulkanoContextnow return a reference instead of an ownedArc.
Changes to command pools:
StandardCommandPoolis now implemented lock-free, using thread-local storage.Device::standard_command_poolhas been removed in favor ofDevice::with_standard_command_pool.StandardCommandPool::newnows return aResult.- Added
khr_portability_enumerationas a default configuration for MacOS invulkano-utils
Changes to descriptor (set) pools:
- Renamed
StdDescriptorPool[Alloc]toStandard{...}. StandardDescriptorPoolis now implemented lock-less, using thread-local storage.- Removed
Device::standard_descriptor_poolin favor ofDevice::with_standard_descriptor_pool. DescriptorPool::allocatenow takes&Arc<DescriptorSetLayout>instead of&DescriptorSetLayout.SingleLayoutDescSetPool::newnow returnsResult.- Added
SingleLayoutVariableDescSetPool.
Changes to memory pools:
- Renamed
StdMemoryPool[Alloc],StdHostVisibleMemoryTypePool[Alloc],StdNonHostVisibleMemoryTypePool[Alloc]toStandard{...}. - Renamed
Device::standard_pooltoDevice::standard_memory_pool.
Changes to PhysicalDevice:
PhysicalDevice::enumeratehas been replaced withInstance::enumerate_physical_devices. This function returnsArc<PhysicalDevice>.- Enumerating physical devices multiple times now retrieves the list of devices each time, instead of only at instance creation. This makes it possible to handle devices that are added/removed during runtime.
PhysicalDevicenow owns instead of borrows from its parentInstance, so it has no more type parameter.- Added
extension_properties,memory_propertiesandqueue_family_propertiesmethod to get the full properties directly. MemoryType,MemoryHeapandQueueFamilyhave been removed. Where they were used, you now provide au32index into thememory_properties().memory_types,memory_properties().memory_heapsandqueue_family_properties()arrays.QueueFamily::supports_surfacehas been replaced withPhysicalDevice::surface_support, to match the Vulkan structure.QueueCreateInfonow implementsDefault(with a defaultqueue_family_indexof 0).Queue::familyhas been renamed toqueue_family_index.
Changes to swapchain presentation:
swapchain::presentnow takesPresentInfoparameter.swapchain::present_incrementalhas been removed.GpuFuture::then_swapchain_presentnow takesPresentInfoparameter.GpuFuture::then_swapchain_present_incrementalhas been removed.SubmitPresentBuilder::swapchainnow takesPresentInfo.- Added support for
present_idfeature withpresent_idfield onPresentInfo. - Added support for
present_waitfeature by adding methodswapchain::wait_for_present.
Changes to CpuBufferPool:
- The methods
nextandchunkhave been renamed tofrom_dataandfrom_iterrespectively, to be clearer and to match the constructor methods of other buffer and image types.
Changes to bitflag structs and enums corresponding to Vulkan equivalents, as well as to InstanceExtensions, DeviceExtensions and Features:
- The
all()constructor has been removed from types that have it, as it has the potential to break forward compatibility: it can enable new flags that were not anticipated by old code. For the same reason, the!operator is not implemented. - All values are validated against the device API version and enabled extensions.
- The constructor
::none()is deprecated in favour of::empty(). - The method
is_superset_ofis deprecated in favour ofcontains. BufferUsageandImageUsageno longer have constructors for some specific combinations.
Miscellaneous:
- Merged
ImmutableBufferintoDeviceLocalBuffer. Semaphore::export_opaque_fdhas been renamed toexport_fdand now takes anExternalSemaphoreHandleTypeto specify the handle type to export.Surface::from_raw_surfacehas been renamed tofrom_handleto match thefrom_handlemethods that were added for other types.
- All bitflag types,
InstanceExtensions,DeviceExtensionsandFeaturesnow:- Have a
const fn empty()constructor. - Have
constmethodsis_empty,intersects,contains,union,intersection,difference,symmetric_difference. - Implement the operators
&,&=,|,|=,^,^=,-and-=. - Implement
Clone,Copy,Debug,Default,PartialEq,EqandHash. - Implement
Fromto and from the corresponding Vulkan type (exceptInstanceExtensions,DeviceExtensionsandFeatures).
- Have a
- All enum types now:
- Implement
Clone,Copy,Debug,PartialEq,EqandHash. - Implement
Fromto the corresponding Vulkan type, andTryFromfrom the corresponding Vulkan type.
- Implement
- Support for importing
OpaqueWin32/OpaqueWin32Kmtmemory handles. - Two missing functions for querying about sparse images:
PhysicalDevice::sparse_image_format_propertiesandUnsafeImage::sparse_memory_requirements. - A
DeviceMemory::commitmentmethod to retrieve the current commitment for lazily-allocated memory. - Support for the
khr_external_fenceandkhr_external_fence_capabilitiesextensions. No import or export functions are defined yet, but those can be added more easily now. - The missing
wayland_presentation_support,win32_presentation_supportxcb_presentation_supportandxlib_presentation_supportmethods toPhysicalDevice. - Support for the
ext_headless_surface,ext_directfb_surface,fuchsia_imagepipe_surface,ggp_stream_descriptor_surfaceandqnx_screen_surfacesurface for creating surfaces from these APIs. - Support for the
ext_tooling_infoextension. - Support for external memory to
UnsafeBuffer. - Support for the
ext_separate_stencil_usageextension.UnsafeImageand theImageAccesstrait now have astencil_usagemethod. - The
DepthReadOnlyStencilAttachmentOptimalandDepthAttachmentStencilReadOnlyOptimalimage layouts. - The ability to choose a usage for image views, that is a subset of the usage of the parent image.
- Fixed iOS compilation. Potentially breaking.
- Removed dependency to
cocoaandmetal - Fixed iOS compilation errors
- Added
winit_to_surfacemethod for iOS, ensuring we can draw to a subCAMetalLayerlayer - Added
Surface::update_ios_sublayer_on_resizeto ensure iOS sublayer is fullscreen if initial window size was not the same as device's - Ensure both iOS and MacOS have
CAMetalLayerwhen usingcreate_surface_from_handle
- Removed dependency to
- #1896: Vulkano-shaders generates invalid struct definitions when struct field names are stripped out by the compiler.
- Atomic writes in shaders are not treated as write access for the purposes of synchronization.
- Improvements to compiler linting:
- Most clippy warnings and errors have been fixed, and the remainder is explicitly allowed in each crate root. Some of these may be re-enabled in the future if desired.
- Warnings for dead code and unused variables have been re-enabled and fixed.
- Breaking Removed the
try_gpu_lock,increase_gpu_lockandunlockmethods from theBufferAccessandImageAccesstraits. Locking is now implemented internally inUnsafeBufferandUnsafeImage. - Breaking All
check_buffer_accessandcheck_image_accessfunctions now take anUnsafeBuffer/UnsafeImageand aRange<DeviceSize>. - Breaking
UnsafeCommandBufferBuilder::pipeline_barriernow takes aDependencyInfo. It will usevkCmdPipelineBarrier2if supported. - Breaking The debug command buffer commands have been renamed to match Vulkan. They now take a
DebugUtilsLabelvalue. - Breaking
end_debug_utils_labelis nowunsafe, as it requires validation checks that are not implemented yet. - Breaking
DebugCallbackis renamed toDebugUtilsMessengerto match Vulkan, and now takes aDebugUtilsMessengerCreateInfoto construct. It is nowunsafeto create, because the the callback cannot call any Vulkan API functions, which Vulkano is unable to check. - Breaking The copy, blit, clear, fill and update commands are completely rewritten, and now use
Infostructs to specify the parameters. They now allow you to specify multiple regions at once to copy, give you fill control over the image subresources, and also let you select image layouts. - Breaking The
transfer_sourceandtransfer_destinationfields ofBufferUsageandImageUsageare renamed totransfer_srcandtransfer_dstto match Vulkan. - Breaking
SubImagehas been removed. - Breaking The
conflict_keymethod on theBufferAccessandImageAccesstraits is removed. - Breaking
ImageViewCreateInfonow has a singlesubresource_rangefield instead of separate fields for aspect, mip levels and array layers. - Breaking The
aspects,mip_levelsandarray_layersmethods ofImageViewAbstractare removed, and replaced with a singlesubresource_rangemethod. - Breaking The
current_mip_levels_accessandcurrent_array_layers_accessmethods ofImageAccessare removed. - Breaking
begin_render_passnow takes aRenderPassBeginInfostruct. - Breaking
ClearRectnow has a singleRange<u32>for array layers. - Breaking The fields of
ClearAttachment::Colorare now named. - Breaking The
ImageClearValuetrait is removed. - Breaking The various
AutoCommandBufferBuilderconstructors for secondary command buffers have been merged into onesecondaryfunction, which directly takes aCommandBufferInheritanceInfovalue. - Breaking The
render_passvalues ofGraphicsPipelineBuilderandCommandBufferInheritanceInfohave both been changed into an enum that selects between rendering withbegin_render_passand rendering withbegin_rendering. They implementIntofor easy conversion. - Breaking Added the missing
rasterization_samplesfield toMultisampleState, which must be provided when doing multisampled rendering. - Breaking Renamed the
readymethod ofFencetois_signaled. - Breaking The
set_depth_boundsparameter is now a singleRangeInclusiveinstead of two separatef32, to match the type used on theDepthBoundsStatestruct. - Breaking Removed
DeviceExtensions::required_extensions(). Required extensions such askhr_portability_subsetare now enabled automatically when available. - Breaking Removed
PhysicalDevice::required_extensions() UnsafeCommandPoolCreateInfoandUnsafeCommandPoolCreationErrorinterfaces exposed.- Fixed compile error in Vulkano-win on Android.
- Added
COVERAGE.md, a document detailing how much of Vulkan is currently covered by Vulkano. - Added debug utils commands to
Queue. - Added
Instance::with_debug_utils_messengers, to provide creation info for messengers that should be used at instance creation and destruction time. This function is alsounsafe. - Added
subresource_layersandsubresource_rangemethods toUnsafeImageandImageAccessto easily generate these types from an image. - Added support for the
khr_copy_commands2device extension. - Added the
resolve_imagecommand buffer command. BufferViewAbstractnow has arangemethod that returns the byte range of the underlying buffer that the view covers.- Added new enum value
CheckDispatchError::ZeroLengthDimensionsto be returned whendispatch()is called with dimension(s) of length zero. - Vulkano-shaders now supports
raygen,anyhit,closesthit,miss,intersectionandcallableshaders. - Fix PresentFuture flushing twice if
then_swapchain_presentfails. - Added new enum value
SwapchainCreationError::ImageExtentZeroLengthDimensionsto be returned when at least one of the image extent's dimensions are zero. - Added support for dynamic rendering, and a
triangle-v1_3example demonstrating how it's used. - Fixed a bug where
NonExhaustiveimplemented theDefaulttrait and was therefore still constructable by the user. - Updated ash to 0.37.0+1.3.209.
- Fixed bug in various Vulkan calls where the returned data might be incomplete.
- Fixed bug that triggered an assert if a render pass had an attachment with
Undefinedinitial layout. - Added an
is_signaledmethod toFenceSignalFuture. - Add a simple
general_purpose_image_viewmethod toStorageImagefor less verbose image view creation for e.g. intermediary render targets. - Add a
vulkano_utilcrate to help reduce boilerplate in many use cases.VulkanoContextto hold access to device & instances,VulkanoWindowsto organize windows and their renderers.VulkanoRendererto hold the window and methods toacquire(swapchain) andpresentbetween which you are intended to execute your pipelines. - Add option to change
PresentModeat runtime invulkano_utilwithset_present_mode - Made
ImageUsageconstructor functionsconst. - Added
intersectionandmax_countmethods toSampleCounts, as well as aBitAndimplementation. InstanceCreateInfonow hasenumerate_portabilityfield.
- Breaking
Instancecreation parameters are given usingInstanceCreateInfo. - Breaking
ApplicationInfoand theapp_info_from_cargo_toml!macro are removed, their functionality is now integrated intoInstanceCreateInfo. - Breaking
Devicecreation parameters are given usingDeviceCreateInfo. - Breaking Changes to
UnsafeBuffer:- Creation parameters are given using
UnsafeBufferCreateInfo. It is no longer unsafe to construct, only to use. - Memory requirements are no longer returned on construction, but retrieved by calling
memory_requirementson theUnsafeBuffer.
- Creation parameters are given using
- Breaking Constructing a buffer of zero size now results in a panic (except for
CpuBufferPoolchunks). - Breaking
BufferViewcreation parameters are given usingBufferViewCreateInfo. - Breaking The following types are now considered non-exhaustive and must be constructed using a method call and struct update syntax:
BufferUsage,SparseLevel. - Breaking
RenderPasscreation parameters are given usingRenderPassCreateInfo.RenderPassDescis removed. - Breaking
Framebuffercreation parameters are given usingFramebufferCreateInfo. - Breaking The
dimensions,widthandheightmethods ofFramebufferare replaced withextentandlayers. - Breaking Changes to
Surface:- The constructors are renamed to match their Vulkan equivalents:
from_display_mode>from_display_planefrom_anativewindow>from_androidfrom_ios_moltenvk>from_iosfrom_macos_moltenvk>from_mac_osfrom_vi_surface>from_vifrom_hwnd>from_win32
from_rawnow requires aSurfaceApivalue.Surface::capabilitieshas been moved toPhysicalDeviceand split into three functions:surface_capabilities,surface_formatsandsurface_present_modes.Capabilitieshas been renamed toSurfaceCapabilities.- The
is_supportedmethod has been moved toQueueFamilyand renamed tosupports_surface.
- The constructors are renamed to match their Vulkan equivalents:
- Breaking Changes to
Swapchain:- Creation parameters are given using
SwapchainCreateInfo. Methods ofSwapchainare renamed to match. - All names with
Fullscreenandfullscreenhave been renamed toFullScreenandfull_screen, to match Vulkan word breaking. FullScreenExclusive::AppControlledhas been renamed toFullScreenExclusive::ApplicationControlledto match Vulkan.- Using
FullScreenExclusive::ApplicationControlledon Windows now requires aWin32Monitor.
- Creation parameters are given using
- Breaking Vulkano-win:
create_vk_surfaceandcreate_vk_surface_from_handlehave been renamed tocreate_surface_from_winitandcreate_surface_from_handlerespectively. - Breaking
DescriptorSetLayoutcreation parameters are given usingDescriptorSetLayoutCreateInfo. The getter methods onDescriptorSetLayouthave been changed to match. - Breaking
DescriptorDeschas been renamed toDescriptorSetLayoutBindingand must now be constructed with struct update syntax. Thetymember has been renamed todescriptor_type, andvariable_counthas been renamed tovariable_descriptor_count. - Breaking
PipelineLayoutcreation parameters are given usingPipelineLayoutCreateInfo. The getter methods onPipelineLayouthave been changed to match. - Breaking
PipelineLayoutPcRangehas been renamed toPushConstantRange. - Breaking
DeviceMemorycreation parameters are given usingMemoryAllocateInfoandMemoryImportInfo. The number of constructors has been reduced. - Breaking Importing memory is now
unsafe, because the safety of the file descriptor can't be guaranteed. - Breaking
DedicatedAllocis renamed toDedicatedAllocation, and itsNonevariant is now represented by being wrapped in anOption. - Breaking
DeviceMemoryAllocErroris renamed toDeviceMemoryAllocationError. - Breaking
UnsafeCommandPoolcreation parameters are given usingUnsafeCommandPoolCreateInfo. - Breaking
UnsafeCommandPool::allocate_command_buffersnow takesCommandBufferAllocateInfo. - Breaking The
allocmethod on theCommandPooltrait has been renamed toallocate, and it takesCommandBufferLevelinstead of a boolean. - Breaking The
newconstructors ofUnsafeCommandBufferBuilderandSyncCommandBufferBuildernow takeCommandBufferBeginInfo. - Breaking The
begin_render_passmethods ofUnsafeCommandBufferBuilderandSyncCommandBufferBuildernow takeRenderPassBeginInfo. - Breaking
CommandBufferLevelis now a plain enum,CommandBufferLevel::Secondaryhas no associated value anymore. Its constructors have been removed. - Breaking
CommandBufferInheritanceandCommandBufferRenderPassInheritancehave been renamed toCommandBufferInheritanceInfoandCommandBufferRenderPassInheritanceInforespectively. - Breaking The
inheritancemethod on theSecondaryCommandBuffertrait has been renamed toinheritance_info. - Breaking
QueryPoolcreation parameters are given usingQueryPoolCreateInfo. - Breaking The
tyandnum_slotsmethods ofQueryPoolhave been renamed toquery_typeandquery_count. - Breaking
FenceandSemaphoreno longer have a type parameter. - Breaking
Eventcreation parameters are given usingEventCreateInfo. - Breaking
Fencecreation parameters are given usingFenceCreateInfo. - Breaking
Semaphorecreation parameters are given usingSemaphoreCreateInfo. - Breaking
Semaphore::export_opaque_fdis nowunsafe. - Breaking
Samplercreation parameters are given usingSamplerCreateInfo. - Breaking
SamplerYcbcrConversioncreation parameters are given usingSamplerYcbcrConversionCreateInfo. - Breaking
UnsafeDescriptorPoolcreation parameters are given usingUnsafeDescriptorPoolCreateInfo. - Breaking The
allocandfreemethods ofUnsafeDescriptorPoolare renamed toallocate_descriptor_setsandfree_descriptor_sets. - Breaking The
allocmethod of theDescriptorPooltrait is renamed toallocate. - Breaking
DescriptorSetLayout::descriptors_countis renamed todescriptor_counts, and returns a hashmap instead of a separate type. - Breaking
UnsafeImagecreation parameters are given usingUnsafeImageCreateInfo. - Breaking
ImageViewcreation parameters are given usingImageViewCreateInfo. - Breaking
ImageView::newhas been renamed tonew_default. - Breaking
ImageView::tyhas been renamed toview_type. - Breaking The
formatmethods ofUnsafeImageandImageViewAbstractnow returnOption<Format>. - Breaking
UnsafeImage::flagshas been replaced with methods to return individual flags. - Breaking
MappedDeviceMemoryis now constructed separately withnew, the_and_mapvariants ofDeviceMemoryare removed. - Breaking Changed how
MappedDeviceMemoryhandles CPU access; addedinvalidate_rangeandflush_rangemethods andreadandwritemethods to get (im)mutable byte slices to the memory. - Breaking Bytemuck dependencies:
- All buffer types now require their data type parameter to implement
BufferContents, which hasbytemuck::Podas a supertrait. Vertexalso hasPodas a supertrait.- Consequently, you must derive the
ZeroableandPodtraits from bytemuck on any custom structures that are used as buffer contents. - To do this for structures generated by Vulkano-shaders, use the
types_metaparameter as seen in the teapot example.
- All buffer types now require their data type parameter to implement
- Fixed sync bug in
copy_imageandblit_imagewhere thesrcanddestimages are the same but with different mip level and/or array layer. - Fixed bug in
begin_render_passcausing a panic when clearing a depth-only attachment. - Fixed bug in the
QueueFamily::supports_methods causing a panic when querying support for a stage that needs no queue flags. - Fixed buffer overflow bug in
AutoCommandBufferBuilder::push_constants. - Fixed
AutoCommandBufferBuilder::push_constantsto push multiple times in case of range overlap (to accommodate VUIDs 01795 and 01796) - Fixed
shader!macro failing to compile with geometry shaders. - Refactored
VertexBuffersCollectionto allowArc<dyn BufferAccess>. - Added a
Format::texels_per_blockmethod.\ - Fixed bug on certain drivers where samplers would behave oddly when minmax samplers are enabled.
- Added support for the
khr_create_renderpass2extension. - Added an
apimethod toSurfaceto return the windowing API that it was created from. - Added a
create_infomethod toSwapchainto return aSwapchainCreateInfothat contains all the parameters copied from the existing swapchain. This can be used for easy recreation of outdated swapchains. - Added support for the
khr_get_surface_capabilities2extension. - Vulkano-win: Added
create_win32_monitor_from_winitfunction. - Added support for Vulkan 1.3.
- Added
Version::HEADER_VERSION, a constant that contains the Vulkan spec version that Vulkano currently uses. - Added
PhysicalDevice::external_buffer_properties. PhysicalDevice::image_format_propertiesnow includes external memory properties in the returned structure.- Added
Device::memory_fd_properties. - Added
PhysicalDevice::external_semaphore_properties. - Replaced
fnvcrate'sFnvHashMap,FnvHashSet&FnvHasherwith theirstdcounterparts. - Validate SPIR-V code containing
OpUndefcorrectly. VertexBuffersCollectionnow supports arrays.- Fixed overflow in multiview vertex buffer validation.
- Fixed missing initialization in
PhysicalDevice::surface_formats.
- Breaking Updated to ash 0.35, half 1.8, smallvec 1.7, winit 0.26, raw-window-handle 0.4.
- Breaking
ColorSpace::DciP3Linearis renamed toDisplayP3Linearto match an equivalent change in the Vulkan naming. - Updated vk.xml to 1.2.203.
- Upgraded to Rust 2021.
- Breaking
DescriptorWriteis renamed toWriteDescriptorSetto match Vulkan, and moved into the maindescriptor_setmodule. - Breaking The constructors of
WriteDescriptorSetare no longer unsafe. Added convenience constructors for writing non-arrayed bindings. - Breaking Descriptor sets are no longer constructed using a builder, but with an iterator of
WriteDescriptorSetitems. See in the examples how this is used.PersistentDescriptorSet::starthas been replaced with three constructors,new,new_variableandnew_with_pool. Each of these takes an iterator ofWriteDescriptorSet.SingleLayoutDescSetPool::nexttakes an iterator ofWriteDescriptorSetas well.
- Breaking Shader reflection now always generates only the descriptor requirements needed for each given entry point, instead of for all of them. The
exact_entrypoint_interfaceargument to theshader!macro is removed. - Added ClearRect struct, which contains the region information to be cleared
- Added ClearAttachment enum, which will contain the ClearValue and type of attachment
- Implemented AutoCommandBufferBuilder::clear_attachments, which implements all possible checks from the vulkan standards to make it safe.
- Implemented SyncCommandBufferBuilder::clear_attachments and UnsafeCommandBufferBuilder::clear_attachments.
- Allowed
copy_image,blit_imageandcopy_bufferto work withsrcanddestimages/beffers being the same. But, regions from src to dest must not overlap. - Fix undefined behaviour on external semaphore creation.
- Fix undefined behaviour on external image creation.
- Add uuid checking to gl-interop example.
- Added additional fields to
DescriptorRequirements, and changedmutableto be on a per-descriptor basis. - Breaking
Sampleris now constructed using a builder, usingstartinstead ofnew. The shortcut functionssimple_repeat_linearandsimple_repeat_linear_no_mipmapare retained, but now returnResult. - Breaking
MipmapModeis renamed toSamplerMipmapModeto match Vulkan. - Breaking
SamplerAddressMode::ClampToBorderno longer includes aBorderColorvalue. This is now provided with the new builder. - Breaking The
ImageViewAbstract::can_be_sampledmethod is removed, and replaced withSampler::can_sample. - Added
Filter::Cubic. - Added support for filter reduction modes on samplers.
- Added
buffer_self_copy_overlappingandbuffer_self_copy_not_overlappingas unit tests for self_copy feature (#1782). - Removed test
basic_conflict(failed after #1782). - Added VertexMember implementations for nalgebra Vectors and Points as an optional crate feature.
- Breaking The spelling
mip_levelis used everywhere as a function and variable name for consistency with Vulkan naming. - Breaking Changes to
UnsafeImage:- It is now constructed with a builder.
- It is no longer unsafe to construct, only to use.
- Memory requirements are no longer returned on construction, but retrieved by calling
memory_requirementson theUnsafeImage. format_featuresnow returns a reference.preinitialized_layoutis replaced byinitial_layout, which returns anImageLayoutvalue.
- Breaking Changes to the
ImageAccesstrait:- Added a
format_featuresmethod, and removedsupports_blit_sourceandsupports_blit_destination. preinitialized_layoutis replaced byinitial_layout, which returns anImageLayoutvalue.current_layer_levels_accesswas misnamed, and is now namedcurrent_array_layers_access.current_miplevels_accessis now namedcurrent_mip_levels_access.
- Added a
- Breaking Changes to
ImageView:UnsafeImageViewhas been merged intoImageView.- Removed
with_from all the builder functions. - The
ImageViewAbstracttrait now hasVulkanObjectas a supertrait, and no longer has aninnermethod.
- Breaking Changes to
Format:propertieshas been moved toPhysicalDevice::format_properties. It now supports thekhr_format_feature_flags2extension.requires_sampler_ycbcr_conversionhas been renamed toycbcr_chroma_samplingand returnsOption<ChromaSampling>, whereSomereplacestrue.sizehas been renamed toblock_size.block_dimensionshas been renamed toblock_extent.- The members of the
CompressionTypeenum have changed.
- Breaking The
BufferViewAbstracttrait now hasVulkanObjectas a supertrait. - Breaking
ExternalMemoryHandleTypehas been renamed toExternalMemoryHandleTypes, and the singular nameExternalMemoryHandleTypehas been introduced as an enum. - Breaking
ComponentMappingandComponentSwizzlehave been moved to thesamplermodule. - Added
PhysicalDevice::image_format_properties. - Added
UnsafeImage::tiling. - The
ImageViewAbstracttrait now includes aformat_featuresmethod. - The
BufferViewAbstracttrait now includesformatandformat_featuresmethods. - Add
boxed_send(),boxed_sync(),boxed_send_sync()forGpuFuture. - Fixed mipmap generation for 2D array images.
- Added
aspectsto the builder ofImageView, to choose which aspect(s) of an image to use in the view. - Added
SamplerYcbcrConversion, and the ability to attach it to a sampler or image view. - Fixed of not being able to create multi-layer framebuffers.
- Reimplement generic impl's for
BufferAccess,TypedBufferAccess&ImageAccess.
- Breaking The modules
compute_pipelineandgraphics_pipelineare shortened tocomputeandgraphics, and are now public. - Breaking
ComputePipeline,GraphicsPipelineandPipelineLayoutare re-exported from the basepipelinemodule, but other items are not. - Breaking Major changes have been made to most parts of the graphics pipeline state.
- Each state category is now provided by a separate type ending in
Statethat lives in its own submodule ofgraphics. Some of these were existing types that were renamed. - Most of the state-setting methods on
GraphicsPipelineBuilderare deprecated. State is now set using a_statemethod, which is given one of the above state types.
- Each state category is now provided by a separate type ending in
- Breaking
ShaderInterfaceEntrynow contains the startlocationandcomponent, and specifies its type using a newtymember instead of as a format. - Breaking
DynamicStateModeis replaced with a simplebool. - Breaking The presence of dynamic state in the pipeline state is now expressed more explicitly with two new types,
StateModeandPartialStateMode. - Breaking The
PersistentDescriptorSet::startandSingleLayoutDescSetPool::newfunctions now returnResult. - Breaking
DescriptorWritenow takes an iterator instead of a single item, allowing arrayed descriptors to be written in one operation. - Breaking Removed the
EntryPointAbstracttrait, which was unused. - Breaking
ComputeEntryPointandGraphicsEntryPointnow hold a list ofDescriptorRequirementsinstead ofDescriptorSetDesc. - Breaking Removed
union,union_multipleandensure_compatible_with_shaderfromDescriptorSetDesc, andunionfromDescriptorDesc. This is now handled byDescriptorRequirements. - Breaking
DescriptorDesc::ensure_compatibility_with_shadernow takesDescriptorRequirementsinstead of anotherDescriptorDesc. - Breaking When the shader's layout specifies a descriptor with runtime array, its upper bound from now on interprets as zero by default(previously it was
1). - Breaking The
DescriptorSettrait now has aresourcesmethod, which returns a reference to aDescriptorSetResourcesobject. It no longer has thenum_buffers,buffer,num_imagesandimagemethods. - Breaking
BufferViewRefis replaced withBufferViewAbstract, similar to the existingImageViewAbstract. - Breaking
UnsafeDescriptorSet::writetakes aDescriptorSetLayoutinstead ofDevice. - Breaking
DescriptorWriteis now constructed based on the resources stored instead of the descriptor type. The descriptor type is inferred from the descriptor set layout. - Breaking Added an
Arcto many parameters and return types:- Objects implementing
BufferAccess,BufferViewAbstract,ImageAccess,ImageViewAbstractorDescriptorSetare now always constructed in anArc, and parameters that take one of these types require theArcwrapper. - The type parameters of
BufferView,ImageViewandBufferSlicedo not contain this implicitArc. - The types
DescriptorSetLayout,PipelineLayout,ComputePipeline,GraphicsPipeline,QueryPool,RenderPassandFramebufferare also always constructed in anArc.
- Objects implementing
- Breaking
Framebufferno longer has a type parameter.- This made the
FramebufferAbstracttrait redundant, and it has been removed. CommandBufferLeveland its nested types no longer have a type parameter either.AttachmentsListis no longer needed and has been removed.
- This made the
- Breaking The
dimensionsmethod has been removed as an inherent method from types that already implementImageAccess, to avoid confusion between the inherent method and the method of the trait when they have different semantics. - Breaking Replaced
DescriptorDescTywithDescriptorTypeand made further changes to the members ofDescriptorDesc. - Breaking Added a
Pipelinetrait to hold methods that are common to all pipeline types. - Breaking Changes to allow allocating variable descriptor counts:
- The
allocmethod of theDescriptorPooltrait now has a second parameter to specify the number of descriptors to allocate for the variable count binding. If there is no variable count binding in the layout, this should be 0. - The
allocmethod ofUnsafeDescriptorPoolnow takes an iterator ofDescriptorSetAllocateInfo.
- The
- For
PersistentDescriptorSetwhen using a layout with a variable count binding, allocate only the number of descriptors needed instead of always the maximum. - Descriptor resources are now checked against the shader requirements at the time of a draw/dispatch call, rather than at the time the descriptor set is created. Only the resources that are actually needed in the shader are checked, the other resources in a descriptor set are ignored and don't need to be valid.
- Added a new
DescriptorRequirementstype, which contains requirements imposed by a shader onto a descriptor and the resources bound to it.DescriptorDesccan be created fromDescriptorRequirementswith theFromtrait.DescriptorSetDescs can be created from the requirements with thefrom_requirementconstructor.- The descriptor requirements of a pipeline can be queried using a new
descriptor_requirementsmethod.
- Added basic support for the
khr_push_descriptorextension, with an example of how it's used. The implementation is somewhat limited and some of the details may change in a future update. - Added support for lots more dynamic state, most of which requires features or extensions to use.
- Added support for discard rectangles, in the
pipeline::discard_rectanglemodule. - Added support for line rasterization state, in the
pipeline::rasterizationmodule. - Added support for color write enable state, in the
pipeline::color_blendmodule. GraphicsPipelinenow has methods to return each state object it was created with.ashhas been updated to 0.33.3, which provides new features and extensions.- Added
CommandBufferState::push_constantsto retrieve the set of all push constant bytes that have been set. - Added check to
AutoCommandBufferBuilderto ensure that the push constants that are needed by the pipeline have been set. - Added android platform to external memory cfgs.
- Fixed two bugs related to the requirements for enabled extensions:
- For required extensions that have been promoted, the promoted version now also fulfills the requirement.
- For features that must be enabled in tandem with extensions (e.g.
descriptor_indexing), the requirement only applies to Vulkan 1.2 and above, since these features do not exist on earlier versions and thus cannot be enabled. - Fix device memory builder not including p_next structures.
- Fix exportable image not created with VkExternalMemoryImageCreateInfo.
- Fix mutable bit not set on exportable image.
ShaderModulecan how handle multiple entry points with the same name but differing execution models.ShaderModule::entry_pointwill now returnNoneif the entry point with the specified name does not exist or is ambiguous. To disambiguate, useShaderModule::entry_point_with_execution.- Added a
shaderc-debugcargo feature to Vulkano-shaders, to emit debug information in the generated SPIR-V code. - Added a
type_for_formatmacro, which returns a Rust type that is suitable for representing a givenFormat. - Fixed a bug when using vulkano-shaders macro with multiple shaders in release mode.
- Fixed bug where the wrong image layout was used for images used as a storage image.
- Fix typo in
clear_depth_stencil.
- Breaking The
drawanddraw_indexedcommands onAutoCommandBufferBuildernow take parameters to explicitly specify the range of vertices and instances to draw. - Breaking
BufferlessDefinitionis removed. - Breaking The
VertexSourcetrait is removed, and has been replaced with the newVertexBuffersCollectiontrait, which works analogously toDescriptorSetsCollection. Vertex buffers can now be passed in as a tuple, just like descriptor sets. - Breaking Removed the vertex definition type parameter from
GraphicsPipeline, which is no longer needed with the change above. - Breaking The
ComputePipelineAbstractandGraphicsPipelineAbstracttraits are no longer needed and have been removed, with their methods made available on the baseComputePipelineandGraphicsPipelinetypes. - Breaking Changes to
DescriptorDescand related changes:- The variants of
DescriptorDescTynow match those ofDescriptorTypeand Vulkan. - The
array_countandreadonlymembers are renamed todescriptor_count(to match Vulkan) andmutable(with the opposite sense, to match familiar Rust usage). DescriptorImageDescis renamed toDescriptorDescImage. Thedimensionsandarrayedmembers have been combined into a singleImageViewTypevalue.- Removed the
arrayedmember of theInputAttachmentvariant as well, as the standard now explicitly disallows arrayed input attachments. - The
ensure_superset_ofmethod has been split into two, one for shader compatibility and one for binding descriptor sets. The error return types of these methods have been revised.
- The variants of
- Breaking The
CubemapandCubemapArrayvariants ofImageViewTypeare renamed toCubeandCubeArrayto match Vulkan. - Breaking Setting state in
AutoCommandBufferBuilderis now done via separate commands (e.g.bind_descriptor_sets,bind_vertex_buffers) instead of being provided with dispatch/draw commands. This matches how these commands work in Vulkan.- Validity of the state is checked by the dispatch/draw commands.
DynamicStateis removed; each individual state now has its own command to set it. This includes some states that were not previously included inDynamicState.
- Breaking
StateCacheris removed; its task is now partially handled bySyncCommandBufferBuilder. - Breaking Many traits now require
Send + Sync:BufferAccess,ImageAccess,ImageViewAbstract,FramebufferAbstract,AttachmentsList,MemoryPoolAlloc,DescriptorSet,DescriptorPoolAlloc,PrimaryCommandBuffer,SecondaryCommandBuffer,CommandPoolAlloc. This further means that any type parameters of types implementing these traits also requireSend + Sync. - BREAKING
DescriptorSetLayout::new()now returnsResult<Self, DescriptorSetLayoutError>instead of Result<Self, OomError>` - BREAKING
DescriptorCompatibilityErroradditional variantVariableCount. - BREAKING
GraphicsPipelineCreationErroradditional variantPipelineLayoutCreationError. - BREAKING
PipelineLayoutCreationErroradditional variantSetLayoutError. - BREAKING
FixedSizeDescriptorSetsPoolhas been replaced bySingleLayoutDescSetPool. - BREAKING Set builders now return
&mut Selfinstead ofSelf& methods take values wrapped in anArc. - Breaking Changes to
Format:Formatvariants are now all uppercase with underscores. This avoids interpretation problems where the underscore is significant for the meaning.- The
tymethod and theFormatTyenum are removed. They are replaced with theNumericTypeenum, which concerns itself only with the numeric representation and not with other properties. There are now threetype_*methods to retrieve it, for colour, depth and stencil respectively. - The
planesmethod now returns a slice containing the equivalent single-plane formats of each plane.
- Breaking The
ImageAccesstrait no longer has thehas_color,has_depthandhas_stencilmethods. This information can be queried using theaspectsortype_*methods ofFormat. - Breaking Changes made to
DescriptorDescTyto support immutable samplers. - Breaking
DescriptorWrite::combined_image_samplernow takes the sampler in anOption. UseNonewhen the descriptor has immutable samplers. - Breaking Changes to pipeline layout tweaks:
DescriptorSetDesc::tweakis renamed toset_buffer_dynamic, and now takes only a single binding index.DescriptorSetDesc::tweak_multipleis removed.- The dynamic buffers parameter of
GraphicsPipelineBuilder::with_auto_layouthas been replaced with a closure that can be used to make tweaks to the descriptor set layouts as needed. ComputePipeline::newhas an additional closure parameter identical to the one described above.
- Breaking
AttachmentImage::dimensions()now returns[u32; 3]which includes the layer count. - Breaking Buffers and Images that have
with_exportable_fduse dedicated allocation, thus requiring khr_get_memory_requirements2 and khr_dedicated_allocation on top of already needed khr_external_memory and khr_external_memory_fd. - Breaking
Compareis renamed toCompareOpto match Vulkan. - Breaking Vulkano-shaders no longer generates a
Shaderstruct, but instead providesloadas a standalone function that returnsArc<ShaderModule>directly. - Breaking Vulkano-shaders no longer generates a function for each entry point. Entry points are now retrieved using the
entry_pointmethod ofShaderModule. - Breaking The
shadermodule is moved to the crate root, andspirvis now a submodule of it. - Breaking
ShaderModule::newis renamed tofrom_bytesto match the existingfrom_words. - Breaking
ShaderModulenow parses and analyses the shader provided to it on construction, checks whether the shader is compatible with the device, and gathers data such as descriptor sets and input/output interfaces directly from its code. To provide this data yourself as before, and avoid parsing, you can use the_with_dataconstructors. - Breaking
ComputeEntryPointandGraphicsEntryPointare removed, as are the functions onShaderModulethat generate them. Instead, you can look up an entry point using theentry_pointmethod. - Added support for additional shader types in
ShaderStage,ShaderStagesandPipelineStages. - Added
export_fdandwith_exportable_fdtoAttachmentImageandStorageImageas well asmem_sizewhich is needed when using those images with Cuda. - Vulkano-shaders: added extension/feature checks for more SPIR-V capabilities.
- Added support for surface creation from a CAMetalLayer using VK_EXT_metal_surface.
- Bug fixed. Image layout passed to SubImage is now being respected
- The full Rust code is now generated from vk.xml by autogen directly, instead of using intermediate macros.
- Added
storage_buffer()method toBufferUsage. - Fixed mismatched types on Android.
- Fixed bug in descriptor set validity checking that allowed drawing/dispatching with descriptor sets that didn't match the pipeline.
- Fixed bug where the wrong functions were used for retrieving physical device info.
- Fixed minor bug in retrieving features from the physical device.
- Add BSD platforms to external memory (dma-buf fd) cfgs
- Added support for
u8index buffers with theext_index_buffer_uint8extension. - Descriptor sets now support variable count descriptors.
- e.g.
layout(set = 0, binding = 0) uniform sampler2D textures[];
- e.g.
- Non-breaking
Formatadditions:- Formats and their metadata are now auto-generated from vk.xml. This significantly expands the support for YCbCr formats in particular.
- The
compatibilitymethod returns an object that can be used to check the compatibility of two formats, explained here. - The
componentsmethod returns the number of bits in each colour component. - The
compressionmethod returns the compression scheme as a new enum,CompressionType. - The
requires_sampler_ycbcr_conversionmethod returns whether the "sampler YCbCr conversion" must be enabled on an image view and sampler in order to use this format. GraphicsPipelineBuildernow usesVecinstead ofSmallVecinternally to reduced stack usage.
- Added support for descriptors with immutable samplers.
- They are included as separate members on the appropriate variants of
DescriptorDescTy. - Added a
set_immutable_samplersmethod toDescriptorSetDesc, which lets you set the immutable samplers for a descriptor. This can be used together with the closure provided to pipeline constructors. add_imagecan be used when building a descriptor set, to provide an image to a combined image sampler descriptor that has immutable samplers.
- They are included as separate members on the appropriate variants of
- Updated dependencies:
- png 0.16 > 0.17
- time 0.2 > 0.3
AttachmentImage::current_layer_levels_access()now returns the correct range which solves pipeline barriers only affecting the first layers of of a multi-layerAttachmentImage.- A new Vulkano-shaders macro option
shadersto compile several shaders in a single macro invocation producing generated Rust structs common for all specified shaders without duplications. This feature improves type-safe interoperability between shaders. - Fixed CommandBufferExecFuture adding the command buffer to queue submission after being flushed.
- Added a
spirvmodule to the main crate, which contains an auto-generated parser for SPIR-V files, and various other utilities that can be used to analyze shaders at runtime. DescriptorSetLayoutnow hasvariable_descriptor_countwhich returns the descriptor count in a variable count descriptor if present.- Additional copy buffer to image checks.
- Add
clear_depth_stencil_imagetoAutoCommandBufferBuilderto clear depth / stencil images. AutoCommandBufferBuilderandSyncCommandBufferBuildernow have astatemethod, which can be used to query the state set by previous "bind" and "set" commands.- Changed parameters requiring an iterator so that they now take
IntoIterator, for more flexibility. - Removed various custom iterator types in favour of returning
impl Iterator. - Replaced the various dynamic state querying methods of
GraphicsPipelinewith two:dynamic_stateto query a single dynamic state, anddynamic_statesto iterate over all of them.
- Breaking Refactoring of
PhysicalDeviceand related types.- The module
instance::physical_deviceis moved todevice::physical. Items are exported directly from there. - Functions on
PhysicalDevicethat previously returned a custom iterator type now returnimpl ExactSizeIterator. PhysicalDevicenow has new methodssupported_extensionsandrequired_extensions. The equivalent constructors onDeviceExtensionsare deprecated, but still present.
- The module
- Breaking Renamed
Device::loaded_extensionstoenabled_extensions, to match the terminology used forenabled_featuresas well as the Vulkan standard. - Breaking Renamed
Instance::loaded_extensionsandloaded_layerstoenabled_extensionsandenabled_layersrespectively. - Breaking Major reorganisation of the
descriptormodule. Most importantly, itsdescriptor_setchild is moved to the crate root and everything is placed under there. Full list of module changes:descriptor::descriptor_set::*>descriptor_set.descriptor::descriptor::*>descriptor_set::layout.- But
ShaderStages*are moved topipeline::shader.
- But
descriptor_set::UnsafeDescriptorSetLayout>descriptor_set::layout::DescriptorSetLayout(renamed).descriptor_set::DescriptorSetDesc>descriptor_set::layout.descriptor_set::{FixedSize*}>descriptor_set::fixed_size_pool.- Re-exported
descriptor_set::FixedSizeDescriptorSetsPool.
- Re-exported
descriptor_set::{Persistent*}>descriptor_set::persistent.- Re-exported
descriptor_set::PersistentDescriptorSet,descriptor_set::PersistentDescriptorSetBuildError,descriptor_set::PersistentDescriptorSetError.
- Re-exported
descriptor_set::{DescriptorPool*, DescriptorsCount, UnsafeDescriptorSetPool*}>descriptor_set::pool.descriptor_set::{StdDescriptorPool*}>descriptor_set::pool::standard.- Re-exported
descriptor_set::pool::StdDescriptorPool.
- Re-exported
descriptor_set::{DescriptorWrite, UnsafeDescriptorSet}>descriptor_set::sys.descriptor_set::collectionis now private.
- Breaking
Features::superset_ofis renamed tois_superset_of. - Breaking The
VertexDefinitiontrait no longer hasAttribsIterandBuffersIteras associated types. It instead returns aVertexInput. - Breaking The various types for vertex definitions (except
BufferlessDefinition) have been replaced with the newBuffersDefinitiontype, which can handle any number of vertex and instance buffers. Examples of how it's used can be seen in the "instancing" and "teapot" examples. - Breaking
InputRatehas been renamed toVertexInputRateto match the Vulkan name. TheInstancevariant now has adivisormember. - Breaking
DescriptorSetDescis converted from a trait to a struct.DescriptorSetLayoutcan take this struct in its constructor, as alternative to the iterator which was already possible previously. - Breaking
PipelineLayoutis now built from a list of descriptor set layouts and push constant ranges, like in plain Vulkan. It no longer constructs its own descriptor set layouts internally. - Breaking
PipelineLayoutDescPcRangeis renamed toPipelineLayoutPcRange. - Breaking
PipelineLayoutDescis no longer needed and is removed. Its functionality has been moved toDescriptorSetDescandPipelineLayoutPcRange. This also applies toComputeEntryPoint,GraphicsEntryPointandEntryPointAbstract. - Breaking
PipelineLayoutnow has adescriptor_set_layoutsmethod which returns a slice of all the layouts, replacing the previousdescriptor_set_layoutwhich only returned one at a time. - Breaking Vulkano is now relaying on features from Rustc >= 1.53.0.
- Breaking The boolean
graphicsparameter on thebind_descriptor_setsmethod ofSyncCommandBufferBuilder,UnsafeCommandBufferBuilderandStateCacherhas been replaced with a new enumPipelineBindPoint. - Breaking Known physical device properties (VkPhysicalDeviceProperties, VkPhysicalDeviceLimits, VkPhysicalDeviceSparseProperties) are now no longer
Option<T>.- These properties are available with every
vkGetPhysicalDeviceProperties2call. - Add some
Defaultinstances to make the auto trait happy.
- These properties are available with every
- Breaking Values that represent a size, offset or index on the device are now represented as
DeviceSize(a type alias ofu64). - Breaking Fix in push constant ranges with intersecting stage flags.
- Added support for the
ext_vertex_attribute_divisorextension, via the newBuffersDefinitiontype and the additions toVertexInputRate. - Added
is_superset_ofmethod toDeviceExtensionsandInstanceExtensions. - Examples now enable only the features they need instead of all of them.
- Examples have much smarter device selection logic. In the triangle example this is supplied with comments.
- Errors checking(by unwrapping) in
MappedDeviceMemory::read_write. - Add creation of Semaphores with exportable Linux file descriptor on.
- Add method to export file descriptor corresponding to Semaphore.
SemaphoreBuilderintroduced.- Add DisplayNative enum variant to ColorSpaceEnum (AMD-specific feature).
- Vulkano-shaders now provides the image format for descriptors, if the shader requires a specific format.
- Vulkano-shaders now uses the
spirv_headerscrate for some of its types. - Large allocations now use dedicated allocations which improves memory efficiency.
- Add
Cloneinterface forLayerProperties. - Fixed detection of storage buffers in SPIR-V so that it works for all SPIR-V versions.
- Added
VertexInputtype, which contains the binding and attribute descriptions. - Added a
vertex_inputmethod toGraphicsPipelineAbstract, which returns a reference to the vertex input. - Add support for 8bit uniform storage.
- Added limits check for vertex buffer binding numbers.
- Fixed synchronization bug where pipeline barriers were placed based on the binding of resources instead of the draw/dispatch calls that use them.
SyncCommandBufferBuilderandUnsafeCommandBufferBuilderaccept anyIntoIteratorwhere they previously only acceptedIterator.- Updated ash to 0.33.0, vk.xml to 1.2.185, and ran
cargo updateto update other dependencies' patch versions. - Add support for EXTENDED_SRGB_NONLINEAR_EXT color space.
- Better error message for wrong color space value
- Added
impl BitOrfordebug::MessageTypeanddebug::MessageSeverityand some bit field generators, also turning them intoconst fn.
- Breaking Vulkano-shaders now checks if the device supports the shader's SPIR-V version, when loading the shader.
- Breaking (but unlikely) Vulkano-shaders now compiles to SPIR-V 1.0 by default. If your shader needs features only available in a higher version, you can specify the target version on the
shader!macro with the newvulkan_version: "major.minor"andspirv_version: "major.minor"arguments. - Breaking Changes to how image sample counts are represented.
- Instead of an integer, functions with a parameter for number of image samples now take a value of
SampleCount, an enum with variants namedSampleN, whereNis a power-of-two integer. It can be converted to a VulkanSampleCountFlags, and from an integer withtry_from. sample_countsfield is originally represented as u32 type, which is now represented bySampleCountsstruct-type which is a boolean collection of supportedsample_counts. It can be converted to and from a VulkanSampleCountFlags.
- Instead of an integer, functions with a parameter for number of image samples now take a value of
- Breaking Changes to shader interfaces and pipeline layouts.
- The module
descriptor::pipeline_layouthas been renamed topipeline::layout. - The trait
ShaderInterfaceDefhas been replaced by a simple structShaderInterface, and itselementsmethod returns a slice instead of an iterator. This means you no longer need to define a new type for a shader interface. The accompanying typeShaderInterfaceDefEntryhas been renamed toShaderInterfaceEntryto match. TheShaderInterfaceDefMatchtrait andEmptyShaderInterfaceDefstruct have been removed. - The trait
PipelineLayoutDeschas also been converted into a struct, with methodsdescriptor_setsandpush_constantswhich return slices. It is functionally equivalent to the oldRuntimePipelineDesctype, which is now merged into it. The traitsPipelineLayoutSuperset,PipelineLayoutSetsCompatibleandPipelineLayoutPushConstantsCompatiblehave been integrated into this struct as well. TheEmptyPipelineDesctrait has been replaced with an::empty()constructor. - Consequently, functions that took a value of these traits now take a plain
ShaderInterfaceorPipelineLayoutDesc. Types that had a type parameter for it no longer have it, e.g.VertexDefinition,GraphicsEntryPoint,GraphicsEntryPointAbstract,PipelineLayout. - Now that
PipelineLayouthas no more type parameter, the traitPipelineLayoutAbstractis removed. The layout type parameter is also removed fromComputePipelineandGraphicsPipeline. ComputeEntryPointandGraphicsEntryPointnow take a value specifying the push constants descriptor, instead of having a type parameter. The corresponding associated type onEntryPointAbstracthas been removed.- The
GraphicsEntryPointAbstracttrait has been removed.GraphicsPipelineBuildernow takes aGraphicsEntryPointobject directly, and has lifetime parameters for the 5 shader types instead.EntryPointDummyis no longer needed and has been removed.
- The module
- Breaking The constructors of
Instancenow take an additional argument to specify the maximum API version. - Breaking Vulkano is now built on top of Ash instead of vk-sys.
- The
EntryPoints,InstancePointersandDevicePointerstypes from vk-sys have been replaced with a new modulefnscontainingEntryFunctions,InstanceFunctionsandDeviceFunctions. Rather than containing the functions directly, there is a member for each Vulkan version and extension, which is loaded from Ash. - The functions to retrieve the function pointers have been renamed to
fns. - The
TYPEassociated constant has been removed from theVulkanObjecttrait. This is now provided by the AshHandletrait, which the object returned byinternal_objectmust implement.
- The
- Breaking
RawInstanceExtensionsandRawDeviceExtensionshave been removed. TheInstanceandDeviceconstructors now take&InstanceExtensionsand&DeviceExtensionsrespectively. Theloaded_extensionsfunction returns these reference types as well. - Breaking The restrictions of each enabled extension and feature are checked when creating an instance or device.
- Breaking Physical device properties are now retrieved through a new
propertiesmethod, returning a&Propertiesreference.- To allow for the possibility that not every property is known by the physical device, fields in
Propertiesare wrapped by anOption. - The previous methods for retrieving properties,
name,ty,limits,driver_version,pci_device_id,pci_vendor_id,uuidandextended_properties, have been removed. - The
api_versionmethod remains, but there is now a semantic difference between it and the version reported byproperties: The raw property gives the maximum supported version that the driver itself reports, while the method onPhysicalDevicereturns the version a logical device would support if it were created from this physical device (that is, restricted by the instance'smax_api_version).
- To allow for the possibility that not every property is known by the physical device, fields in
- Breaking
ImageAccesstrait methodtry_gpu_lock()now has an additional argument to allow locking the image in an uninitialized state.` - Breaking The
conflicts_bufferandconflicts_imagemethods on theBufferAccessandImageAccesstraits are removed. - Breaking Draw and dispatch calls on
AutoCommandBufferBuilderno longer have a parameter for dynamic offsets. Instead, they are provided as part of the descriptor sets parameter. They are added to each descriptor set individually using the newoffsetsmethod on theDescriptorSettrait.SyncCommandBufferBuilderandStateCacherlikewise take dynamic offsets as part of the descriptor set. - Breaking
StencilFaceFlagsis renamed toStencilFaces, and its variants are also shortened. - Breaking
DynamicStencilValuenow contains afrontand abackvalue. - Breaking The stencil state commands of
SyncCommandBufferBuildernow take aStencilFacesvalue and au32instead ofDynamicStencilValue. - Improve
ImageLayoutchecks to preventAccessError::ImageNotInitializedfrom occurring where the image is safe to use uninitialized. - Added
DeviceExtensions::khr_spirv_1_4, which allows SPIR-V 1.4 shaders in Vulkan 1.1. - Added
FunctionPointers::api_versionto query the highest supported instance version. - Added
Instance::api_versionandDevice::api_versionto return the actual supported Vulkan version. These may differ between instance and device, and be lower than whatFunctionPointers::api_versionandPhysicalDevice::api_versionreturn. - Added
Instance::max_api_version, which returns the maximum version that was specified when creating the instance. - Fixed the issue when creating a buffer with exportable fd on Linux(see to #1545).
- The
draw_indirectanddraw_indexed_indirectcommands onAutoCommandBufferBuildernow check the draw count against themax_draw_indirect_countlimit. - Fixed a few documentation errors.
- It is now possible to construct a graphics pipeline without a fragment shader.
- Added support for all core Vulkan 1.1 and 1.2 device features.
- Updated winit to 0.25.
- Fixed the teapot example on ArchLinux (GTX 1650).
- Added support for the SPIR-V draw parameters capability.
- Added support for the VK_KHR_multiview extension.
- Vulkano-shaders: Added support for MultiView SPIR-V capability.
- Multiview example added showing how to utilize the VK_KHR_multiview extension to render to multiple layers of a framebuffer at once.
- All Vulkan extensions supported by Ash are now provided in
InstanceExtensionsandDeviceExtensions. This includes all but the very newest extensions; new extensions should be added whenever Ash is updated to a new version. - Every extension is now documented with a link to its Vulkan page and information about requirements, conflicts, promotion and deprecation.
InstanceExtensionsandDeviceExtensionsnow have aFromimplementation that takes an iterator of&CStr. There is also aFromimplementation forVec<CString>that performs the reverse conversion.- All Vulkan features supported by Ash are now provided.
- Implement fmt::Display for DisplayMode.
- Clarify return value is in millihertz for DisplayMode.refresh_rate()
- Reworked some of the internals of
SyncCommandBufferBuilder, so that a mutex is no longer needed and resource conflict detection is simplified. Features::allandFeatures::noneare nowconst fn.
- Breaking Changes to command buffers:
AutoCommandBufferand theCommandBuffertrait have been split in two, one for primary and the other for secondary command buffers.AutoCommandBufferBuilderremains one type, but has a type parameter for the level of command buffer it will be creating, and some of its methods are only implemented for builders that createPrimaryAutoCommandBuffer.- The
Flagsenum is renamed toCommandBufferUsage, and is exported from the maincommand_buffermodule. TheNonevariant is renamed toMultipleSubmit. - Simplified the number of constructors on
AutoCommandBufferBuilderby adding aCommandBufferUsageparameter. Kindhas been renamed toCommandBufferLevel, and for secondary command buffers it now contains a singleCommandBufferInheritancevalue.CommandBufferInheritance::occlusion_queryandUnsafeCommandBufferBuilder::begin_querynow takeQueryControlFlagsinstead of a boolean.
- Breaking The non-default constructors of
ImageViewhave been replaced with a builder, created withImageView::start(image). - Breaking Added support for component mapping/swizzling on image views.
image::Swizzleis moved and renamed toimage::view::ComponentMapping. It now has anis_identitymethod.- A non-default component mapping can now be specified for image views, via the new builder. A
ComponentMappingparameter has been added toUnsafeImageViewas well. - The
identity_swizzlemethod on theImageViewAbstracttrait has been replaced withcomponent_mapping, which returns aComponentMappingdirectly. - Storage image and input attachment descriptors now check for identity swizzling when being built.
- Breaking Major rearranging of framebuffer and render pass-related types:
- The
framebuffermodule is renamed torender_pass. RenderPassDescis now a struct, not a trait. The methods have been simplified, returning a slice reference to theattachments,subpassesanddependencies.- Renamed:
AttachmentDescription>AttachmentDesc,PassDescription>SubpassDesc,PassDependencyDescription>SubpassDependencyDesc. EmptySinglePassRenderPassDescis replaced with theRenderPassDesc::emptyconstructor, or itsDefaultimplementation.- The
RenderPassCompatible,RenderPassDescClearValuesandRenderPassSubpassInterfacetraits are removed, their functionality is moved toRenderPassDesc.
- Renamed:
RenderPasstakes a concreteRenderPassDescvalue for construction, and no longer has a type parameter.- The
RenderPassAbstracttrait is removed. GraphicsPipelineandFramebufferno longer have a render pass type parameter.GraphicsPipelineAbstractandFramebufferAbstracthave trait methods to retrieve the render pass instead.
- The
- The
ordered_passes_renderpass!andsingle_pass_renderpass!macros are unchanged externally.
- The
- Support for queries:
- Breaking
UnsafeQueryPool,UnsafeQueryandUnsafeQueriesRangehaveUnsaferemoved from their names. - Breaking
QueriesRangeis now represented with a standard RustRangein its API. - Breaking The secondary command buffer constructors that have parameters for queries will check if the corresponding features are enabled, and return a different error type.
- Removed
OcclusionQueriesPool, which was incomplete and never did anything useful. get_resultshas been added toQueriesRange, to copy query results to the CPU.- The following functions have been added to both
SyncCommandBufferBuilderandAutoCommandBufferBuilder:begin_query(still unsafe),end_query(safe),write_timestamp(still unsafe),copy_query_pool_results(safe),reset_command_pool(still unsafe). - Better documentation of everything in the
querymodule. - An example demonstrating occlusion queries.
- Breaking
- Breaking Improved the handling of image aspects a little, with the enum
ImageAspectand the structImageAspects.UnsafeCommandBufferBuilderImageAspecthas been removed. - Breaking Removed the separate structs for each image format. Now, only the
Formatenum exists.- Traits that no longer make sense in this context have been removed:
FormatDesc, thePossible*FormatDesctraits,StrongStorage. - In types that had a type parameter for the format type, it has been removed.
AcceptsPixelshas been converted toPixel, which is implemented on the pixel type rather than on the format type.
- Traits that no longer make sense in this context have been removed:
- Breaking
shader!will generate descriptor information for all variables declared in the shader module, even if they are not used. This reverts the default behavior from the last release.- Breaking Added the
exact_entrypoint_interfaceoption toshader!to force vulkano to only generate descriptor information for variables that are used. (the default behavior from the last release)
- Breaking Added the
- Breaking
AccessFlagBitsis renamed toAccessFlags. - Breaking Minor refactor of
UnsafeBuffer:- Replaced the various usage functions with a single
usagefunction, mirroring the change made earlier toUnsafeImage. - The
SparseLevel::sparsemember is removed, andUnsafeBuffer::newtakesOption<SparseLevel>instead.
- Replaced the various usage functions with a single
- Breaking
Swapchainis now constructed using a builder.Swapchain::startwill start building a new blank swapchain. Callingrecreateon an existing swapchain will create a builder filled with all the properties of the old swapchain. - Added two methods to
Format:planesto query the number of planes in the format, andaspectsto query what aspects an image of this type has. - The deprecated
causetrait function on Vulkano error types is replaced withsource. - Fixed bug in descriptor array layers check when the image is a cubemap.
- Vulkano-shaders: Fixed and refined the generation of the
readonlydescriptor attribute. It should now correctly mark uniforms and sampled images as read-only, but storage buffers and images only if explicitly marked asreadonlyin the shader. - Vulkano-shaders: Added support for StoragePushConstant8 SPIR-V capability.
- Fixed a bug which caused a segfault when extending memory allocation info in DeviceMemoryBuilder
BufferlessDefinitionandBufferlessVerticesnow deriveCopyandClone. This allowsGraphicsPipelineBuilders that have not yet defined a vertex buffer type to be cloned.- Various functions for converting to/from Vulkan flags have been consolidated into implementations of the standard
Fromtrait. - Export root-level
entry_pointmethod onloader::FunctionPointerstype. - Add few more
InstanceExtensionsfrom KHR and EXT.
- Breaking Updated all code to Rust 2018 edition.
- Breaking DeviceMemoryBuilder::new() takes in
memory_indexrather thanMemoryType. - Fixed
shader!generated descriptor set layouts for shader modules with multiple entrypoints.- Breaking Prefixed
shader!generated descriptor setLayoutstructs with the name of the entrypoint the layout belongs to. For shaders generated from GLSL source, this meansLayouthas been renamed toMainLayout. - Breaking
shader!will no longer generate descriptor information for variables that are declared but not used in a shader.
- Breaking Prefixed
- Breaking
shader!now accepts structs in shader interfaces decorated withBufferBlockrather thanBlock. - Fixed missing barriers in dispatch calls
- Breaking
shader!no longer marks descriptor sets as readonly as a fallback when it doesn't know- Breaking The keyword
readonlymight need to be added in front of thebufferkeyword in GLSL files to get them working again
- Breaking The keyword
- Breaking
- Breaking Changes to image types:
- Image types no longer implement
ImageViewAccess. Dimensionsis removed. Image constructors now takeImageDimensions.ImageDimensionsno longer has thecubemap_compatiblemember. Instead, several image constructors takeImageCreateFlagswhich specifies this aspect.- Replaced the various functions of
UnsafeImageto query format features and usage with two that simply returnFormatfeaturesandImageUsage.
- Image types no longer implement
- Breaking Changes to image view handling:
- Created a new
image::viewmodule for all image view related things. - Introduced a new
ImageViewtype, a safe wrapper aroundUnsafeImageView. - The
ImageViewAccesstrait is renamed toImageViewAbstract, some methods added, removed or renamed.ImageViewimplements this trait. UnsafeImageViewno longer holds image usage information, nor does it check for valid usage.
- Created a new
- Breaking
UnsafeCommandBufferandSyncCommandBufferand their corresponding builders and other related types no longer have a type parameter for the command pool allocation, and no longer keep the command pool alive. Their constructors now take an&UnsafeCommandPoolAlloc. Users must now ensure that the pool allocation outlives the command buffers and their builders (AutoCommandBufferdoes this itself). - Breaking The
CommandBuffertrait no longer has thePoolAllocassociated type, and has four new methods:num_buffers,buffer,num_imagesandimage. - Breaking structures passed to
ImmutableBuffer::from_dataandCpuAccessibleBuffer::from_datamust implementCopyto ensure soundness of these functions - Replaced deprecated
compare_and_swapwithcompare_exchange. UnsafeCommandPoolAllocnow implementsDeviceOwned.- Allow
constusage of features andBufferUsage. - Opaque fd and dma-buf import support on
Linux. DeviceMemoryMappingto separate device memory and mappings.- Added external memory support for
DeviceLocalBufferfor Linux. - Implemented synchronization for
SyncCommandBufferBuilder::execute_commands. AutoCommandBufferBuilder::execute_commandsis now fully safe to use.SyncCommandBufferBuildernow becomes poisoned when it returns an error, to prevent using the builder in an inconsistent state.- Added a
dispatch_indirectcommand toAutoCommandBufferBuilder.
- Breaking
Message::layer_prefixturned to Option to prevent segfaults when Vulkan message didn't providepMessageIdNamevalue - Breaking On
AutoCommandBufferBuilder, methods that bind a descriptor set now take adynamic_offsetsparameter - Breaking On
AutoCommandBufferBuilderandSyncCommandBufferBuilder, theupdate_buffermethod now takesdataby reference - Breaking Made
PipelineLayoutDescTweakspublic, for use with compute pipelines - Added support for
ImageAspectand YV12/NV12 formats, for use with the UnsafeImage API. - Added basic VK_KHR_external_memory, VK_KHR_external_memory_fd, and VK_EXT_external_memory_dma_buf support.
- Fixed potential segmentation fault in
ComputePipelinewhen referencingPipelineCacheobjects. - Fixed race condition in
StandardCommandPoolwhen allocating buffers. - Fixed potential stack overflow error in loading large shaders by storing the bytecode as static.
- Fixed descriptor set layouts with arrays containing more than one element triggering unreachable code.
- Fixed panic on some machines when calling
Surface::capabilities - Added basic support and safety checks for dynamic uniform/storage buffers
- Updated dependencies:
crossbeam0.7 -> 0.8half1.6 -> 1.7shaderc0.6 -> 0.7smallvec1.4 -> 1.6cgmath0.17 -> 0.18 (for examples)png0.15 -> 0.16 (for examples)time0.1 -> 0.2 (for examples)
- Added
VK_KHR_portability_subsetdevice extension. - Added
DeviceExtensions::required_extensionsfunction that returns a set of available extensions required to createDeviceon this platform. FormatFeaturesnow implementsCopy.- Removed the
AttachmentImageViewtrait, which didn't appear to be used for anything anyway. - Added support and validation for the
mutable_formatandblock_texel_view_compatibleimage creation flags. - Added
formatto theImageViewBuilder, to choose a different format from the underlying image.
- Breaking The
ImmutableImage::from_iterandImmutableImage::from_buffercan build Mipmaps - Breaking
CpuAccessibleBuffernow usesRwLockfromparking_lot. - Breaking The
KindandSubpassContentstypes have been moved to the root of thecommand_buffermodule. - Breaking On
AutoCommandBufferBuilder, the methodsbegin_render_passandnext_subpassnow takeSubpassContentsinstead of a boolean value. - Breaking The
CommandBuffertrait now has an additional required method,kind. - Breaking Update dependency
winit0.22 -> 0.24 - Breaking Added an Option to the ComputePipeline constructor to enable pipeline caching.
- Add support for 8bit storage.
- Some safety checks have been added to
execute_commands/execute_commands_from_veconAutoCommandBufferBuilder, but not everything is checked yet so it's still unsafe to call. - Added two vulkano-win features
raw-window-handle_andwinit_to be able to use vulkano without winit. - Added function to create surface from
RawWindowHandle. - Added a
propertiesmethod toFormat. - Added additional device feature flags for enabling SPIR-V related capabilities.
- Added method
copy_buffer_dimensionsthat allows copying parts of buffers containing arrays. - Added
debug_marker_begin,debug_marker_endanddebug_marker_inserttoAutoCommandBufferBuilder. - Fixed surface creation function on Windows(PR #1410).
- Travis CI Linux Nightly job temporary disabled until #1423 resolved.
- Renamed feature from
shader_f3264toshader_float64. - Added method
build_with_cacheto theGraphicsPipelineBuilderthat enables pipeline caching. - Check usage bits on image when creating image view.
- Fixing an assertion panic in the SyncCommandBuffer. If the buffer encountered an error while locking the necessary resources, it would unlock all previously locked resources. Images were unlocked incorrectly and an assert in the image unlock function would panic.
- Added support for including precompiled shaders in vulkano-shaders using the
bytesoption. - Added an option for Vulkano-Shaders macro to automatically generate standard traits(Default, PartialEq, etc) implementations for Rust types generated from the Shader types, and to derive these structs with external traits.
- Fixed clear
CubemapandCubemapArrayframebuffer attachment dimensions; previously only 1/6th of the layers in each of these image layouts were actually considered by the framebuffer (for clearing and rendering). This seems to have been a result of the difference betweenDimensionsandImageDimensions.
- Breaking AutoCommandBufferBuilder methods now take a mutable reference to
selfinstead of taking ownership - Update
smallvec1.2 -> 1.4 - Added additional
ImageUsageconstructor functions,color_attachment,depth_stencil_attachment,transient_color_attachment&transient_depth_stencil_attachment. - Update dependency
half1.5 -> 1.6 - Update MacOS dependency
metal0.17 -> 0.18 - Added additional checks around image/device compatibility.
- Fixed all warnings as of Rust 1.43.1
- Provides new API to fetch additional information of the Physical Device from the
PhysicalDeviceProperties2KHRstructure whenever it possible. In the current implementation onlysubgroupSizeproperty is fetching. This interface can be extended in the future to obtain more metadata depending on community needs. dynamic-local-sizecompute shader example added showing how to utilizesubgroupSizeto compute and set shader's local size in run time.- Fixed Vulkano Shaders bug when compute shader local group layout values bound to specialization constants. Now it is possible to define the layout in form of
layout(local_size_x_id = 12, local_size_y_id = 13, local_size_z = 1) in;and then set the values asSpecializationConstants {constant_12: 8, constant_13: 4, ...}. - Allow applications to access the instance and device pointers
- Add a helper function '.boxed()' on the
GpuFuturethat is short forBox::new(yourFuture) as Box<dyn GpuFuture>
- Breaking Update dependency
winit0.21 -> 0.22 - Update dependency
half1.4 -> 1.5 - Update dependency
smallvec0.6 -> 1.2
- Breaking Swapchain::recreate_with_dimension() is now Swapchain::recreate_with_dimensions()
- Breaking Sync::SharingMode::Exclusive(queue_family: u32) is now Sync::SharingMode::Exclusive.
- Breaking Added Swapchain::with_old_swapchain() - same as previous Swapchain::new(), if an oldswapchain needs to be used
- Breaking Swapchain::new() now doesnt need to have the old_swapchain parameter anymore but requires the ColorSpace
- Breaking Decouple descriptor sets from pipeline
- Breaking Update Winit to 0.21.0
- Breaking Add
host_cachedfield to allCpuAccessibleBufferinitializers to allow the user to prefer host cached memory. - Breaking Added
fullscreen_exclusivefield toSwapchaininitializers to allow the user to specify how fullscreen exclusivity should be handled.- Swapchain methods added:
Swapchain::acquire_fullscreen_exclusive(),Swapchain::release_fullscreen_exclusive(), andSwapchain::is_fullscreen_exclusive()
- Swapchain methods added:
- Add function
execute_commands_from_vecto handle submission of multiple secondary command buffers. - Allow
DebugCallbackto be sent between threads - Pipeline barriers are now correctly inserted when a resource is used more than two times.
- Update MacOS dependency cocoa to 0.20
- Fixed code generated by
shader!macro so that SSBO's are supported again (broken in 0.16.0). - Added Swapchain::surface() - which returns the saved surface
- Propagate new lines correctly in shader compile errors.
QueueandQueueFamilynow implementPartialEqandEq- `Swapchain::acquire_next_image()
now returns(image_id, suboptimal, acquire_future)``- suboptimal indicates that the swapchain is usable, but should be recreated
- Fixed Join Future implementation to not submit joined command buffers twice.
- The traits
GraphicsPipelineAbstractandDescriptorSetnow requireDeviceOwned. - Added
PartialEq,EqandHashimplementations to all types involved in a draw call, including:Instance,Device,GraphicsPipelineanddyn GraphicsPipelineAbstractUnsafeBufferand all types implementingBufferAccessUnsafeImage,UnsafeImageViewand all types implementingImageAccessorImageViewAccess- All types implementing
DescriptorSet
- Fixed bug in examples causing OutOfHostMemory errors
- Replaced
VK_EXT_debug_reportVK_EXT_debug_markerwithVK_EXT_debug_utils. - Update MacOS dependencies metal to 0.17 and cocoa to 0.19
- Added dynamic stencil elements to
DynamicState - Fixed
ImageDimensions::mipmap_dimensionsandmax_mipmapsin cases where the original size is not a power of two. - Shader includes now work on Windows.
- Breaking Change Shader include directories passed to the
shader!macro are now relative to the cratesCargo.toml - Add support for
VK_KHR_16bit_storageandVK_KHR_storage_buffer_storage_classdevice extensions. - Update dependencies: lazy_static, half, syn, quote & proc-macro2
- Swapchain can now be recreated with dimensions of corresponding surface using
recreate(). - Added
raw_loaded_extensions()toInstanceto allow querying of all extensions, not just known ones. - Breaking Change
loaded_extensions()onInstanceno longer returns a reference. - Add support for GLSL macro defines to the
shader!macro. - Switch to Vulkan 1.1 and inherently SpirV 1.3 (shaderc default version for vulkan 1.1)
Yanked
- Update shaderc to 0.6. This again allows to use locally installed libraries which reduces the build-time significantly on Arch/Voidlinux (see google/shaderc-rs#58)
- Removed faulty debug_assert in
SwapchainAcquireFuture::drop. - Compressed texture formats can now be uploaded using
ImmutableImage::from_iter,ImmutableImage::from_buffer,AutoCommandBuilder::copy_buffer_to_image_dimensions, andAutoCommandBuilder::copy_buffer_to_image.
This is an emergency breaking breaking change. It fixes Undefined Behaviour that was preventing the compilation of Vulkano on the latest rust nightlies.
- Structs that have the
impl_vertexmacro applied to them, now also need to#[derive(Default)].
- Update shaderc to 0.5. New shaderc has improved pre-built options for libshaderc that significantly reduce package build time and are appropriate for use in CI
QueueFamily::explicitly_supports_transfersonly returns true ifvk::QUEUE_TRANSFER_BITis set instead of also always returning true. Removedsupports_transfers.- Update to winit 0.19
- Add support for
#include "..."and#include <...>directives within source files. - Add a
unionmethod for the extensions types. - Make
BufferUsagederivePartialEqandEq - Fix a compiler error in struct code generated by the
shader!macro. - Improve inference of image layout transitions and in turn image memory barrier behaviour.
- Expose
CopyImageErrorandDrawIndexedIndirectError.
- Update to winit 0.18
- Export features and device extensions from the device module instead of the instance module
instance::Features->device::Featuresinstance::DeviceExtensions->device::DeviceExtensionsinstance::RawDeviceExtensions->device::RawDeviceExtensions
- Added
vulkano_shaders::shader!proc macro, use this instead ofvulkano_shader_derive::VulkanoShaders. - The entire
vulkano_shader_derivecrate is deprecated. vulkano_shaders::{reflect, compile, Error}are no longer public.- Remove vulkano_shaders::build_glsl_shaders
- Removed mir support, as it is being removed from the vulkan spec.
- Split
PersistentDescriptorSetError::MissingUsageintoMissingImageUsageandMissingBufferUsageeach with a matching enum indicating the usage that was missing. - Fix instance_count when using draw_index with instance buffers
- Added a
reinterpretfunction toBufferSlice - Made
AttributeInfoderiveCopy,CloneandDebug - Use google/shaderc for shader compilation
- Reject generation of rust types for SPIR-V arrays that would have incorrect array stride.
- Removed the
Layoutprefix of the descriptions used for a render pass. - Implemented DescriptorSetCollection for
Vec<T>which allows easier use of construction them for usage when drawing.
- Use dynamically loaded
libvulkanlike on other platforms instead of linking to MoltenVK on macOS - Updated winit to version 0.17.
- Allow custom implementations of
RenderPassDescto specifyVK_SUBPASS_EXTERNALas a dependency source or destination - Added
vulkano_win::create_vk_surfacewhich allows creating a surface safely without taking ownership of the window. AutoCommandBufferBuilder::drawand friends no longer consume theDynamicStateargument, allowing reuse between calls.Instance::newandInstance::with_loadernow take in the layers as an iterator of borrowedstrs, not of references to borrowedstrs.
- Updated winit to version 0.11.
- Changed
ShaderInterfaceMismatchErrorto be more verbose. - Allow depth/stencil images to be used with
AutoCommandBufferBuilder::copy_image_to_buffer() - Allow
Surfaceto own the window it references. - Clear value validation for
AutoCommandBufferBuilder::begin_render_pass() - Fix occasional truncation of glslang_validator when glsl-to-spirv is rebuilt
- Fix linking against MoltenVK >= 0.19.0
- Fix panic on DeviceLost error after resizing swapchain on nvidia/amd hardware
- Added
AutoCommandBufferBuilder::copy_image - Added
VulkanObject::TYPEto look up theDebugReportObjectTypeEXTof an object - Added
Device::set_object_nameandDevice::set_object_name_raw - Added
GraphicsPipelineBuilder::with_auto_layoutto simplify use of dynamic buffers.
Yanked
- Allow
impl_vertex!to support generic structs. - Added
GraphicsPipelineBuilder::with_pipeline_layout. - Fixed creating a buffer view not checking the
min_texel_buffer_offset_alignmentlimit. - Added support for loading the
VK_EXT_debug_markerextension and adding debug markers toUnsafeCommandBufferBuilder - Changed
GraphicsPipelineBuilderto default to a buffer-less vertex input. - Deprecated
pipeline::input_assembly::InputAssembly.
- Fixed an HiDPI scaling issue on MacOS in vulkano-win.
- Fixed
le()andge()forDescriptorsCount, which also fixes a potential memory leak when allocating descriptor sets. - Fixed the
ordered_passes_renderpass!macro not working properly when usingresolve. - Added an optional
resolveentry inpassforsingle_pass_renderpass!, for resolving multisampled attachments into non-multisampled attachments. - Fixed the value of
rasterizationSamplesnot corresponding to the render pass. - Added
GraphicsPipelineBuilder::sample_shading_disabled,sample_shading_enabled,alpha_to_coverage_disabled,alpha_to_coverage_enabled,alpha_to_one_disabledandalpha_to_one_enabled. AddedGraphicsPipelineCreationError::SampleRateShadingFeatureNotEnabledandAlphaToOneFeatureNotEnabled. - Deprecated
pipeline::multisample::Multisample.
- Added
RuntimePipelineDesc, an implementation ofPipelineLayoutDescthat makes creating custom layouts easier. - Changed
CpuBufferPool::next()andchunk()to return aResultin case of an error when allocating or mapping memory. - Changed
CommandBufferExecError::AccessErrorto provide a hint of where the error occurs. - Added
vulkano::pipeline::vertex::BufferlessDefinitionandBufferlessVerticesto enable bufferless drawing. - Changed
ImageAccess::try_gpu_lockandunlock()to verify whether the image layout is correct, especially at the first usage of an image. - Changed
BufferAccess::conflict_*andImageAccess::conflict_*to forbid querying a specific range of the resource. - Fixed
layersargument validation inSwapchain::new_inner. - Added a 32-bit word constructor for
ShaderModule(ShaderModule::from_words). - Changed the various
is_superset_offunctions to return aResultinstead of abool.
- Added checking compatibility between the descriptor sets and the pipeline object when adding a draw or compute command.
- Fixed several bugs in the validation checks of
blit_image. - Fixed
blit_image,copy_buffer_to_imageandcopy_image_to_buffernot taking the mipmap level into account when checking for the correct image dimensions. - Added
ImageDimensions::mipmap_dimensions()andImageDimensions::num_mipmaps(). - Added an implementation of
DeviceOwnedforQueuesIterandQueue. - Fixed the standard command pool and descriptor pool being destroyed too often.
- Added
#[allow(non_snake_case)]to structs generated by vulkano-shaders.