- This is the final crates-published release of gfx-hal. gfx-hal development was mainly driven by wgpu which has now switched to its own GPU abstraction: wgpu-hal. As such, gfx-hal will be in maintence mode until the story of gfx-portability is figured out. Read more about the transition in #3768.
- MTL: Prevent accessing NSView on other threads.
- Fix panics when android apps reopen.
- Support dynamic array sizes on metal.
- Added backend agnostic RenderDoc captures.
- Allow initialization of gfx objects from raw handles.
- Add missing features to the dx12 backend that are needed by wgpu.
- Made
PhysicalDevice::enabled_extensionspublic. - Added the ability to import formeign memory
- GLES: Deferred deleting shaders until after linking
- GLES: Fix texture views
- GLES: Fix nearest neighbor filtering.
- Assorted: Documentation fixes
- fix linking to QuartzCore
- Naga is the required and preferred shader translation path in Metal and OpenGL
- enabling SPIRV-Cross is optional behind
crossfeature API:- all backends can create shader modules from
naga::Module - sampler reduction modes (min/max samplers)
- image view creation requires
image::Usageto be specified - timestamp period query is moved to the
Queue DescriptorLimitsis added to consolidate descriptor-related limits and its fields changed fromusizetou32LimitsandCapabilitiesstructures merged together asPhysicalDeviceProperties- Entries for Mesh Shading and Descriptor Indexing added to
PhysicalDeviceProperties - buffer descriptor indexing
- sparse memory binding
- blend color is renamed to blend constants
- debug capture API for interfacing with XCode/RenderDoc/PIX
- better shader and pipeline creation errors
- all backends can create shader modules from
- Infrastructure:
- the new "bench" example is added
- Metal backend:
- pipeline cache support with binary archives
profilingintegration- immutable sampler support on Naga path
- improve window resizing, expose "present with transaction" option
BorrowandExactSizeIteratorbounds are removed from the iterators- error improvements:
- use
thiserrorfor errors - variants and a few names are refactored
- use
- API external synchronization constraints now match Vulkan,
&mutchanges affected the following parameters:- event in
Device::set_eventandDevice::reset_event - fence in
Device::reset_fencesandQueue::submit - destination sets in
write_descriptor_setsandcopy_descriptor_sets - memory in
map_memoryandunmap_memory - queue in
Queue::wait_idle - semaphore in
Queue::present
- event in
ImageFeatureimprovements:- new
STORAGE_READ_WRITEbit, indicating that the storage can be read and written within the same draw/dispatch call - new
TRANSFER_SRCandTRANSFER_DSTbits, followingVK_KHR_maintenance1 - new
SAMPLED_MINMAXbit, followingVK_EXT_sampling_minmax
- new
- Framebuffers become image-less, following
VK_KHR_imageless_framebuffer - the old swapchain model is removed, and the new one is updated to match the backends even better
- debug names are supported for all objectr
- other API changes:
bind_index_buffernow doesn't need a separate structure- plural versions of
reset_fenceandcreate_xx_pipelineare removed - swapchain images can be used for transfer operations
- separate feature for comparison mutable samplers
- pipeline descriptor vectors are replaced with slices
- features for non-normalized mutable samplers
Capabilitiesstructure with supported dynamic state flags
- OpenGL backend improvements:
- finally has the API fully matching gfx-hal
- now only uses OpenGL ES on Linux/Android/Web targets
- binding model has been completely rewritten
- various number of fixed in rendering, memory mapping, and other areas
- fix SPIR-V entry point selection
- support different types of descriptors in a single
DescriptorSetWrite
- update spirv_cross to 0.21:
- force zero initialization in all generated shaders
- force the use of native arrays for MSL
- get proper support for compressed textures
- allow color blend factors to be used on alpha channel
- implement command buffer markers
- debug names for render passes and descriptor sets
- enable VK_KHR_maintenance3 when VK_EXT_descriptor_indexing is enabled
- fix descriptor indexing features
- fix memory flush ranges
- support presentation modes
- fix cpu-visible mapping
- fix UAV reset count
- fix bindings filter by shader stages
- implement copies from buffers into R8, RG8, and RGBA8 textures
- fix read-only storage buffer support
- fix race condition in internal shader operations
- update to newer version of spirv_cross to be consistent with backends
- fix root signature indexing
- force zero initialization for shader variables
- enable compatibility with iOS emulator
- force zero initialization for shader variables
- force the use of native arrays for MSL
- force zero initialization for shader variables
- fix layer checks in
clear_image
- enable multisampling and object labels
- fix descriptor binding
- fix Android build
- API changes:
- the old Vulkan-ish swapchain model is completely removed
pso::Stageenum is removed from the API intogfx-auxil::ShaderStageSubresourceRangeallows unbound array layers and mipmap levels- new
PrimitiveAssemblerDescenum DescriptorPool::free_setsis renamed to justfree
- Features:
- object labels for pipelines and their layouts
- draw with indirect counts
- mesh shaders (Vulkan with NV extension only, for now)
- fix binding of dynamic uniform buffers
- fix creation of depth-stencil views
- fix command allocator reset validation errors
- fix the crash on
unconfigure_swapchain
- update libloading to 0.6
- switch from
core-graphicstocore-graphics-types.
- update metal to 0.20
- switch from
cocoatococoa-foundation. - remove core-graphics dependency
- update cocoa to 0.22 and metal to 0.19.
- skip unknown memory types
- mock descriptor set creation functions
- start turning the empty backend into a mock instead of always panicking
- mock memory creation and buffer and image creation functions
- add
DRAW_INDIRECT_COUNTfeature and enable on supported backends
- add descriptor indexing features and enable on supported backends
- add
TEXTURE_DESCRIPTOR_ARRAYfeature and enable on supported backends
- implement descriptor pool destruction
- fix detection of integrated gpus
- fix UB in
compile_shader
- update spirv_cross to 0.20
- fix offset calculation for root descriptors
- fix drop of physical devices
- handle device lost during a fence wait
- rework the way swapchain waits to acquire new frames
- gracefully detect when the driver supports it but hardware does not
- switch to
VK_LAYER_KHRONOS_validation
- fix support for
AMD_NEGATIVE_VIEWPORT_HEIGHT
- fix debug assertion for the index buffer range
- fix
NDC_Y_FLIPfeature
- fix debug color markers
- fix detection of the
MirrorClampmode
- API changes:
- allocating command buffers or descriptor sets no longer touches the heap
DescriptorTypeis now a rich enumRangeArgtrait is removed, instead the offsets are required, and the sizes are optional- Removed
AnisotropicandSubpassRefenums in favor of options
- Features:
- debug markers
- new
WrapMode::MirrorClamp - Y-flipped NDC space
- read-only storage descriptors
- support version 2.2 of the Metal shading language
- work around Intel swapchain bug when acquiring images
- fix a crash at initialization time
- disable coherent memory for being broken
- rewrite the binding model completely
- fix missing iOS metallib
- fix viewport/scissor after
clear_attachmentscall
Errorimplementations- fix
ShaderStageFlags::ALL
- switch to explicit linking of "d3d12.dll", "d3d11.dll" and "dxgi.dll"
- switch to explicit linking of "d3d12.dll" and "dxgi.dll"
- all strongly typed HAL wrappers are removed
- all use of
failureis removed - alternative swapchain model built into
Surface Instancetrait is assocated byBackend, now includes surface creation and destructionSurfacecapabiltities queried are refactored,PresentModeis turned into bitflagsPrimitiveenum is refactored and moved topsomoduleSamplerInfostruct is refactored and renamed toSamplerDesc- debug labels for objects
- improve external render pass barriers
- fix immutable samplers in combined image-samplers
- fix iOS build
- add
Instance::try_createmethods
- fix memory leaks in render pass and labels creation
- graphics pipeline state refactor
- no
winitfeature by default - events support
- more device limits are exposed
- Vulkan: fixed swapchain ranges, stencil dynamic states
- DX12: "readonly" storage support
- Metal: argument buffer support, real immutable samplers
- GL: compute shaders, new memory model, WebGL support, lots of other goodies
- optimize shader visibility of descriptors
- fix exposed MSAA capabilities and resolves
- fix image view creation panics
- fixed depth clip mode support, updates spirv-cross
Debugimplementations forInstance
- allow building on macOS for Vulkan Portability
- fixed memory leaks in render pass descriptors and function strings
Debugimplementations
- fix
VK_EXT_debug_utilscheck at startup
- pipeline cache support
- rich presentation errors
- nicer specialization constants
Debugimplementations- consistent format names
- more limits
- surface alpha composition properties
- descriptor pool create flags
- removal of
FrameSync
- fixed buffer bind flags
- synchronization of disjoint CB across copy operations
- depth texture views
- typeless formats for textures
- fixed vertex buffer binding
- fixed non-array views of array textures
- secondary command buffers
- multiple iOS fixes
- fixed surface dimensions
get_fence_status
- dummy surface creation
gfx-hal: graphics hardware abstraction layergfx-backend-*: Vulkan, D3D12, D3D11, Metal, and GLrange-alloc: helper struct to manage ranges- unsafe qualifiers on all the API methods
- non-clonable command buffers and resources