fix(deps): update rust crate wgpu to v25 #119
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
24.0.1
->25.0.0
Release Notes
gfx-rs/wgpu (wgpu)
v25.0.0
Compare Source
Major Features
Hashmaps Removed from APIs
Both
PipelineCompilationOptions::constants
andShaderSource::Glsl::defines
now takeslices of key-value pairs instead of
hashmap
s. This is to prepare forno_std
support and allow us to keep which
hashmap
hasher and such as implementation details. Italso allows more easily creating these structures inline.
By @cwfitzgerald in #7133
All Backends Now Have Features
Previously, the
vulkan
andgles
backends were non-optional on windows, linux, and android and there was no way to disable them. We have now figured out how to properly make them disablable! Additionally, if you turn on thewebgl
feature, you will only get the GLES backend on WebAssembly, it won't leak into native builds, like previously it might have.By @cwfitzgerald in #7076.
device.poll
Api ReworkedThis release reworked the poll api significantly to allow polling to return errors when polling hits internal timeout limits.
Maintain
was renamedPollType
. Additionally,poll
now returns a result containing information about what happened during the poll.By @cwfitzgerald in #6942 and #7030.
wgpu::Device::start_capture
renamed, documented, and made unsafeThere is now documentation to describe how this maps to the various debuggers' apis.
By @cwfitzgerald in #7470
Ensure loops generated by SPIR-V and HLSL Naga backends are bounded
Make sure that all loops in shaders generated by these naga backends are bounded
to avoid undefined behaviour due to infinite loops. Note that this may have a
performance cost. As with the existing implementation for the MSL backend this
can be disabled by using
Device::create_shader_module_trusted()
.By @jamienicol in #6929 and #7080.
Split up
Features
internallyInternally split up the
Features
struct and recombine them internally using a macro. There should be no breakingchanges from this. This means there are also namespaces (as well as the old
Features::*
) for all wgpu specificfeatures and webgpu feature (
FeaturesWGPU
andFeaturesWebGPU
respectively) andFeatures::from_internal_flags
whichallow you to be explicit about whether features you need are available on the web too.
By @Vecvec in #6905, #7086
WebGPU compliant dual source blending feature
Previously, dual source blending was implemented with a
wgpu
native only feature flag and used a custom syntax in wgpu.By now, dual source blending was added to the WebGPU spec as an extension.
We're now following suite and implement the official syntax.
Existing shaders using dual source blending need to be updated:
With that
wgpu::Features::DUAL_SOURCE_BLENDING
is now available on WebGPU.Furthermore, GLSL shaders now support dual source blending as well via the
index
layout qualifier:By @wumpf in #7144
Unify interface for SpirV shader passthrough
Replace device
create_shader_module_spirv
function with a genericcreate_shader_module_passthrough
functiontaking a
ShaderModuleDescriptorPassthrough
enum as parameter.Update your calls to
create_shader_module_spirv
and usecreate_shader_module_passthrough
instead:By @syl20bnr in #7326.
Noop Backend
It is now possible to create a dummy
wgpu
device even when no GPU is available. This may be useful for testing of code which manages graphics resources. Currently, it supports reading and writing buffers, and other resource types can be created but do nothing.To use it, enable the
noop
feature ofwgpu
, and either callDevice::noop()
, or addNoopBackendOptions { enable: true }
to the backend options of yourInstance
(this is an additional safeguard beyond theBackends
bits).By @kpreid in #7063 and #7342.
SHADER_F16
feature is now available with naga shadersPreviously this feature only allowed you to use
f16
on SPIR-V passthrough shaders. Now you can use it on all shaders, including WGSL, SPIR-V, and GLSL!By @FL33TW00D, @ErichDonGubler, and @cwfitzgerald in #5701
Bindless support improved and validation rules changed.
Metal support for bindless has significantly improved and the limits for binding arrays have been increased.
Previously, all resources inside binding arrays contributed towards the standard limit of their type (
texture_2d
arrays for example would contribute tomax_sampled_textures_per_shader_stage
). Now these resources will only contribute towards binding-array specific limits:max_binding_array_elements_per_shader_stage
for all non-sampler resourcesmax_binding_array_sampler_elements_per_shader_stage
for sampler resources.This change has allowed the metal binding array limits to go from between 32 and 128 resources, all the way 500,000 sampled textures. Additionally binding arrays are now bound more efficiently on Metal.
This change also enabled legacy Intel GPUs to support 1M bindless resources, instead of the previous 1800.
To facilitate this change, there was an additional validation rule put in place: if there is a binding array in a bind group, you may not use dynamic offset buffers or uniform buffers in that bind group. This requirement comes from vulkan rules on
UpdateAfterBind
descriptors.By @cwfitzgerald in #6811, #6815, and #6952.
New Features
General
Buffer
methods corresponding toBufferSlice
methods, so you can skip creating aBufferSlice
when it offers no benefit, andBufferSlice::slice()
for sub-slicing a slice. By @kpreid in #7123.BufferSlice::buffer()
,BufferSlice::offset()
andBufferSlice::size()
. By @kpreid in #7148.impl From<BufferSlice> for BufferBinding
andimpl From<BufferSlice> for BindingResource
, allowingBufferSlice
s to be easily used in creating bind groups. By @kpreid in #7148.util::StagingBelt::allocate()
so the staging belt can be used to write textures. By @kpreid in #6900.CommandEncoder::transition_resources()
for native API interop, and allowing users to slightly optimize barriers. By @JMS55 in #6678.wgpu_hal::vulkan::Adapter::texture_format_as_raw
for native API interop. By @JMS55 in #7228.as_hal
for both acceleration structures. By @Vecvec in #7303.create_shader_module_passthrough
on device. By @syl20bnr in #7326.Features::MSL_SHADER_PASSTHROUGH
run-time feature allows providing pass-through MSL Metal shaders. By @syl20bnr in #7326.wgpu_hal
. By @SupaMaggie70Incorporated in #7089Naga
unpackSnorm4x8
,unpackUnorm4x8
,unpackSnorm2x16
,unpackUnorm2x16
for GLSL versions they aren't supported in. By @DJMcNab in #7408.Examples
GPUBuffer
by distributing it across many buffers, and then having the shader receive them as abinding_array
of storage buffers. By @alphastrata in #6138Changes
General
wgpu::Instance::request_adapter()
now returnsResult
instead ofOption
; the error provides information about why no suitable adapter was returned. By @kpreid in #7330.hashbrown
to simplify no-std support. By Brody in #6938 & #6925.instance_id
andinstance_custom_index
toinstance_index
andinstance_custom_data
by @Vecvec in#6780
Naga
naga::ir
(e.g.naga::ir::Module
).The original names (e.g.
naga::Module
) remain present for compatibility.By @kpreid in #7365.
use
statements to simplify futureno_std
support. By @bushrat011899 in #7256&
operator to take the address of a component of a vector,which is not permitted by the WGSL specification. By @andyleiserson in #7284
termcolor
andstderr
are now optional behind features of the same names. By @bushrat011899 in #7482Vulkan
HAL queue callback support
Queue::submit()
to Vulkan'svk::Semaphore
allocated outside of wgpu. By @sotaroikeda in #6813.Bug Fixes
Naga
let
declarations, and acceptvecN()
as a constructor for vectors (in any context). By @andyleiserson in #7367.&&
and||
operators are no longer allowed on vectors. By @andyleiserson in #7368.General
structures. By @Vecvec in #7486.
max_color_attachments
limit from 8 to 4 for better GLES compatibility. By @adrian17 in #6994.#7062.
Device::last_acceleration_structure_build_command_index
into queue submit. By @Vecvec in #7462.Vulkan
Gles
gles
. By @richerfu in #7085Dx12
WebGPU
Performance
Naga
unicode-xid
withunicode-ident
. By @CrazyboyQCD in #7135Documentation
Improved documentation around pipeline caches and
TextureBlitter
. By @DJMcNab in #6978 and #7003.Improved documentation of
PresentMode
, buffer mapping functions, memory alignment requirements, texture formats’ automatic conversions, and various types and constants. By @kpreid in #7211 and #7283.Added a hello window example. By @laycookie in #6992.
Examples
pre_present_notify()
before presenting. By @kjarosh in #7074.v24.0.3
Compare Source
Bug Fixes
Surface
, solving segfaults on exit on some systems. By @ed-2100 in #6997Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.