chore(deps): update rust crate wgpu to v25 - abandoned#1542
Closed
renovate[bot] wants to merge 2 commits into
Closed
chore(deps): update rust crate wgpu to v25 - abandoned#1542renovate[bot] wants to merge 2 commits into
renovate[bot] wants to merge 2 commits into
Conversation
Contributor
Package Changes Through 35270dcThere are 1 changes which include wry with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
4dd1a07 to
0abc9c0
Compare
cb71bbe to
4ad4f59
Compare
4ad4f59 to
7bb04ba
Compare
ddb6087 to
ea0926c
Compare
ea0926c to
2f1fc42
Compare
Contributor
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
Contributor
Author
Autoclosing SkippedThis PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
23->25Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
gfx-rs/wgpu (wgpu)
v25.0.0Compare Source
Major Features
Hashmaps Removed from APIs
Both
PipelineCompilationOptions::constantsandShaderSource::Glsl::definesnow takeslices of key-value pairs instead of
hashmaps. This is to prepare forno_stdsupport and allow us to keep which
hashmaphasher and such as implementation details. Italso allows more easily creating these structures inline.
By @cwfitzgerald in #7133
All Backends Now Have Features
Previously, the
vulkanandglesbackends 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 thewebglfeature, 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.pollApi ReworkedThis release reworked the poll api significantly to allow polling to return errors when polling hits internal timeout limits.
Maintainwas renamedPollType. Additionally,pollnow returns a result containing information about what happened during the poll.By @cwfitzgerald in #6942 and #7030.
wgpu::Device::start_capturerenamed, 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
FeaturesinternallyInternally split up the
Featuresstruct 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 (
FeaturesWGPUandFeaturesWebGPUrespectively) andFeatures::from_internal_flagswhichallow 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
wgpunative 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:
struct FragmentOutput{ - @​location(0) source0: vec4<f32>, - @​location(0) @​second_blend_source source1: vec4<f32>, + @​location(0) @​blend_src(0) source0: vec4<f32>, + @​location(0) @​blend_src(1) source1: vec4<f32>, }With that
wgpu::Features::DUAL_SOURCE_BLENDINGis now available on WebGPU.Furthermore, GLSL shaders now support dual source blending as well via the
indexlayout qualifier:By @wumpf in #7144
Unify interface for SpirV shader passthrough
Replace device
create_shader_module_spirvfunction with a genericcreate_shader_module_passthroughfunctiontaking a
ShaderModuleDescriptorPassthroughenum as parameter.Update your calls to
create_shader_module_spirvand usecreate_shader_module_passthroughinstead:By @syl20bnr in #7326.
Noop Backend
It is now possible to create a dummy
wgpudevice 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
noopfeature ofwgpu, and either callDevice::noop(), or addNoopBackendOptions { enable: true }to the backend options of yourInstance(this is an additional safeguard beyond theBackendsbits).By @kpreid in #7063 and #7342.
SHADER_F16feature is now available with naga shadersPreviously this feature only allowed you to use
f16on 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_2darrays 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_stagefor all non-sampler resourcesmax_binding_array_sampler_elements_per_shader_stagefor 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
UpdateAfterBinddescriptors.By @cwfitzgerald in #6811, #6815, and #6952.
New Features
General
Buffermethods corresponding toBufferSlicemethods, so you can skip creating aBufferSlicewhen 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 BufferBindingandimpl From<BufferSlice> for BindingResource, allowingBufferSlices 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_rawfor native API interop. By @JMS55 in #7228.as_halfor both acceleration structures. By @Vecvec in #7303.create_shader_module_passthroughon device. By @syl20bnr in #7326.Features::MSL_SHADER_PASSTHROUGHrun-time feature allows providing pass-through MSL Metal shaders. By @syl20bnr in #7326.wgpu_hal. By @SupaMaggie70Incorporated in #7089Naga
unpackSnorm4x8,unpackUnorm4x8,unpackSnorm2x16,unpackUnorm2x16for GLSL versions they aren't supported in. By @DJMcNab in #7408.Examples
GPUBufferby distributing it across many buffers, and then having the shader receive them as abinding_arrayof storage buffers. By @alphastrata in #6138Changes
General
wgpu::Instance::request_adapter()now returnsResultinstead ofOption; the error provides information about why no suitable adapter was returned. By @kpreid in #7330.hashbrownto simplify no-std support. By Brody in #6938 & #6925.instance_idandinstance_custom_indextoinstance_indexandinstance_custom_databy @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.
usestatements to simplify futureno_stdsupport. 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
Vulkan
HAL queue callback support
Queue::submit()to Vulkan'svk::Semaphoreallocated outside of wgpu. By @sotaroikeda in #6813.Bug Fixes
Naga
letdeclarations, 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_attachmentslimit from 8 to 4 for better GLES compatibility. By @adrian17 in #6994.#7062.
Device::last_acceleration_structure_build_command_indexinto queue submit. By @Vecvec in #7462.Vulkan
Gles
gles. By @richerfu in #7085Dx12
WebGPU
Performance
Naga
unicode-xidwithunicode-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.3Compare Source
Bug Fixes
Surface, solving segfaults on exit on some systems. By @ed-2100 in #6997v24.0.1Compare Source
Bug Fixes
wgpunot building with--no-default-featureson when targetingwasm32-unknown-unknown. By @wumpf in #6946.CloneonShaderModule. By @a1phyr in #6937.CopyExternalImageDestInfonot exported onwgpu. By @wumpf in #6962.v24.0.0Compare Source
Major changes
Refactored Dispatch Between
wgpu-coreandwebgpuThe crate
wgpuhas two different "backends", one which targets webgpu in the browser, one which targetswgpu_coreon native platforms and webgl. This was previously very difficult to traverse and add new features to. The entire system was refactored to make it simpler. Additionally the new system has zero overhead if there is only one "backend" in use. You can see the new system in action by using go-to-definition on any wgpu functions in your IDE.By @cwfitzgerald in #6619.
Most objects in
wgpuare nowCloneAll types in the
wgpuAPI are nowClone.This is implemented with internal reference counting, so cloning for instance a
Bufferdoes copies only the "handle" of the GPU buffer, not the underlying resource.Previously, libraries using
wgpuobjects likeDevice,BufferorTextureetc. often had to manually wrap them in aArcto allow passing between libraries.This caused a lot of friction since if one library wanted to use a
Bufferby value, calling code had to give up ownership of the resource which may interfere with other subsystems.Note that this also mimics how the WebGPU javascript API works where objects can be cloned and moved around freely.
By @cwfitzgerald in #6665.
Render and Compute Passes Now Properly Enforce Their Lifetime
A regression introduced in 23.0.0 caused lifetimes of render and compute passes to be incorrectly enforced. While this is not
a soundness issue, the intent is to move an error from runtime to compile time. This issue has been fixed and restored to the 22.0.0 behavior.
Bindless (
binding_array) Grew More CapabilitiesPARTIALLY_BOUND_BINDING_ARRAYon Resource Binding Tier 3 Hardware. This is most D3D12 hardware D3D12 Feature Table for more information on what hardware supports this feature. By @cwfitzgerald in #6734.Device::create_shader_module_uncheckedRenamed and Now Has Configuration Optionscreate_shader_module_uncheckedbecamecreate_shader_module_trusted.This allows you to customize which exact checks are omitted so that you can get the correct balance of performance and safety for your use case. Calling the function is still unsafe, but now can be used to skip certain checks only on certain builds.
This also allows users to disable the workarounds in the
msl-outbackend to prevent the compiler from optimizing infinite loops. This can have a big impact on performance, but is not recommended for untrusted shaders.By @cwfitzgerald and @rudderbucky in #6662.
wgpu::Instance::newnow takesInstanceDescriptorby referencePreviously
wgpu::Instance::newtookInstanceDescriptorby value (which is overall fairly uncommon in wgpu).Furthermore,
InstanceDescriptoris now cloneable.By @wumpf in #6849.
Environment Variable Handling Overhaul
Previously how various bits of code handled reading settings from environment variables was inconsistent and unideomatic.
We have unified it to (
Type::from_env()orType::from_env_or_default()) andType::with_envfor all types.By @cwfitzgerald in #6895
Backend-specific instance options are now in separate structs
In order to better facilitate growing more interesting backend options, we have put them into individual structs. This allows users to more easily understand what options can be defaulted and which they care about. All of these new structs implement
from_env()and delegate to their respectivefrom_env()methods.If you do not need any of these options, or only need one backend's info use the
default()impl to fill out the remaining feelds.By @cwfitzgerald in #6895
The
diagnostic(…);directive is now supported in WGSLNaga now parses
diagnostic(…);directives according to the WGSL spec. This allows users to control certain lints, similar to Rust'sallow,warn, anddenyattributes. For example, in standard WGSL (but, notably, not Naga yet—see #4369) this snippet would emit a uniformity error:…but we can now silence it with the
offseverity level, like so:There are some limitations to keep in mind with this new functionality:
@diagnostic(…)rules asfnattributes, but prioritization for rules in statement positions (i.e.,if (…) @​diagnostic(…) { … }is unclear. If you are blocked by not being able to parsediagnostic(…)rules in statement positions, please let us know in #5320, so we can determine how to prioritize it!error,warning,info, andoffseverity levels. These are all technically usable now! A caveat, though: warning- and info-level are only emitted tostderrvia thelogfaçade, rather than being reported through aResult::Errin Naga or theCompilationInfointerface inwgpu{,-core}. This will require breaking changes in Naga to fix, and is being tracked by #6458.diagnostic(…)rules. In fact, only thederivative_uniformitytriggering rule exists in the WGSL standard. That said, Naga contributors are excited to see how this level of control unlocks a new ecosystem of configurable diagnostics.diagnostic(…)rules are not yet emitted in WGSL output. This means thatwgsl-in→wgsl-outis currently a lossy process. We felt that it was important to unblock users who neededdiagnostic(…)rules (i.e., #3135) before we took significant effort to fix this (tracked in #6496).By @ErichDonGubler in #6456, #6148, #6533, #6353, #6537.
New Features
Naga
nagaCLI would incorrectly skip the first positional argument when--stdin-file-pathwas specified. By @ErichDonGubler in #6480.quantizeToF16()for WGSL frontend, and WGSL, SPIR-V, HLSL, MSL, and GLSL backends. By @jamienicol in #6519.usampler*andisampler*. By @DavidPeicho in #6513.{U,S}{int,norm}{8,16},Float16andUnorm8x4Bgra). By @nolanderc in #6632workgroup_size. By @KentSlaney in #6635.pointer_composite_accessWGSL language extension is implemented. By @sagudev in #6913General
map_asyncandon_submitted_work_doneto track down completion of async callbacks. By @eliemichel in #6360..dllfiles. By @DouglasDwyer in #6574.DeviceTypeandAdapterInfonow implHashby @cwfitzgerald in #6868wgsl_language_featuresfor obtaining available WGSL language feature by @sagudev in #6814no_stdsupport towgpu-types. By @bushrat011899 in #6892.Vulkan
VK_EXT_shader_atomic_float. By @AsherJingkongChen in #6234.Metal
raw_handlemethod to access raw Metal textures in #6894.D3D12
Changes
Naga
overrideinitializers. By @sagudev in 6920General
Surface::as_haltake an immutable reference to the surface. By @jerzywilczek in #9999CreateBindGroupError::InvalidTextureSampleTypeerror message. By @ErichDonGubler in #6530.Surface::configureandSurface::get_current_textureare no longer fatal. By @alokedesai in #6253BlasTriangleGeometry::index_buffer_offsettoBlasTriangleGeometry::first_index. By @Vecvec in #6873D3D12
dxcompiler.dll&dxil.dllare also now required. By @teoxoy in #6643.Vulkan
HAL
usage: Range<T>, forBufferUses,TextureUses, andAccelerationStructureBarrierwith a newStateTransition<T>. By @atlv24 in #6703DropCallbackAPI to useFnOnceinstead ofFnMut. By @jerzywilczek in #6482Bug Fixes
General
Device, rather than panicking. By @ErichDonGubler in #6505.Features::TIMESTAMP_QUERYis set when using timestamp writes in render and compute passes. By @ErichDonGubler in #6497.QUERY_SET_MAX_QUERIES(and enforced limits) from 8192 to 4096 to match WebGPU spec. By @ErichDonGubler in #6525.PreHashedMapwithFastHashMap. By @jamienicol in #6541.TIMESTAMP_QUERYfeature before other validation.Deviceon some environments. By @Dinnerbone in #6681.get_acceleration_structure_build_sizes. By @Vecvec in #6802.wgpu-infonot showing dx12 adapters. By @wumpf in #6844.transform_buffer_offsetwhen initialisingtransform_buffer. By @Vecvec in #6864.Naga
vecNconstructors have less than N arguments. By @ErichDonGubler in #6508.>=ina<b>=c. By @KentSlaney in #6898.Statement::ImageStore. By @jimblandy in #6729.Vulkan
max_color_attachment_bytes_per_sampleis now correctly set to 128. By @cwfitzgerald in #6866D3D12
max_color_attachment_bytes_per_sampleis now correctly set to 128. By @cwfitzgerald in #6866Examples
Testing
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, 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.