This is the first release that featured wgpu-info as a binary crate for getting information about what devices wgpu sees in your system. It can dump the information in both human readable format and json.
Major Changes
This release was fairly minor as breaking changes go.
wgpu types now !Send !Sync on wasm
Up until this point, wgpu has made the assumption that threads do not exist on wasm. With the rise of libraries like wasm_thread making it easier and easier to do wasm multithreading this assumption is no longer sound. As all wgpu objects contain references into the JS heap, they cannot leave the thread they started on.
As we understand that this change might be very inconvenient for users who don't care about wasm threading, there is a crate feature which re-enables the old behavior: fragile-send-sync-non-atomic-wasm. So long as you don't compile your code with -Ctarget-feature=+atomics, Send and Sync will be implemented again on wgpu types on wasm. As the name implies, especially for libraries, this is very fragile, as you don't know if a user will want to compile with atomics (and therefore threads) or not.
Power Preference is now optional
The power_preference field of RequestAdapterOptions is now optional. If it is PowerPreference::None, we will choose the first available adapter, preferring GPU adapters over CPU adapters.
By @Aaron1011 in #3903
initialize_adapter_from_env argument changes
Removed the backend_bits parameter from initialize_adapter_from_env and initialize_adapter_from_env_or_default. If you want to limit the backends used by this function, only enable the watned backends in the instance.
Added a compatible surface parameter, to ensure the given device is able to be presented onto the given surface.
- wgpu::util::initialize_adapter_from_env(instance, backend_bits);
+ wgpu::util::initialize_adapter_from_env(instance, Some(&compatible_surface));By @fornwall in #3904 and #3905
Misc Breaking Changes
Changes
- Added support for importing external buffers using
buffer_from_raw(Dx12, Metal, Vulkan) andcreate_buffer_from_hal. By @AdrianEddy in #3355
Vulkan
- Work around Vulkan-ValidationLayers#5671 by ignoring reports of violations of VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912. By @jimblandy in #3809.
Added/New Features
- Empty scissor rects are allowed now, matching the specification. by @PJB3005 in #3863.
- Add back components info to
TextureFormats. By @teoxoy in #3843.
Documentation
- Better documentation for draw, draw_indexed, set_viewport and set_scissor_rect. By @genusistimelord in #3860
- Fix link to
GPUVertexBufferLayout. By @fornwall in #3906 - Document feature requirements for
DEPTH32FLOAT_STENCIL8by @ErichDonGubler in #3734. - Flesh out docs. for
AdapterInfo::{device,vendor}by @ErichDonGubler in #3763. - Spell out which sizes are in bytes. By @jimblandy in #3773.
- Validate that
descriptor.usageis not empty increate_bufferby @nical in #3928 - Update
max_bindings_per_bind_grouplimit to reflect spec changes by @ErichDonGubler and @nical in #3943 #3942
Bug Fixes
General
- Fix order of arguments to glPolygonOffset by @komadori in #3783.
- Fix OpenGL/EGL backend not respecting non-sRGB texture formats in
SurfaceConfiguration. by @liquidev in #3817 - Make write- and read-only marked buffers match non-readonly layouts. by @fornwall in #3893
- Fix leaking X11 connections. by @wez in #3924
- Fix ASTC feature selection in the webgl backend. by @expenses in #3934
- Fix Multiview to disable validation of TextureViewDimension and ArrayLayerCount. By @MalekiRe in #3779.
Vulkan
- Fix incorrect aspect in barriers when using emulated Stencil8 textures. By @cwfitzgerald in #3833.
- Implement depth-clip-control using depthClamp instead of VK_EXT_depth_clip_enable. By @AlbinBernhardssonARM #3892.
Metal
- Fix renderpasses being used inside of renderpasses. By @cwfitzgerald in #3828
- Support (simulated) visionOS. By @jinleili in #3883
DX12
- Disable suballocation on Intel Iris(R) Xe. By @xiaopengli89 in #3668
WebGPU
Examples
- Publish examples to wgpu.rs on updates to trunk branch instead of gecko. By @paul-hansen in #3750
- Ignore the exception values generated by the winit resize event. By @jinleili in #3916