fix(deps): update rust crate wgpu to 0.20 #65
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:
0.19->0.20Release Notes
gfx-rs/wgpu (wgpu)
v0.20.1Compare Source
This release included v0.21.0 of
wgpu-coreandwgpu-hal, due to breaking changes needed to solve vulkan validation issues.Bug Fixes
This release fixes the validation errors whenever a surface is used with the vulkan backend. By @cwfitzgerald in #5681.
General
Metal
Vulkan
GLES / OpenGL
naga
switchstatements with a single body for all cases. These are now written asdo {} while(false);loops in hlsl-out and glsl-out. By @Imberflur in #5654continuestatements in switches by setting a flag and breaking from the switch. This allows such constructs to work with FXC which does not supportcontinuewithin a switch. By @Imberflur in #5654v0.20.0Compare Source
Major Changes
Pipeline overridable constants
Wgpu supports now pipeline-overridable constants
This allows you to define constants in wgsl like this:
And then set them at runtime like so on your pipeline consuming this shader:
By @teoxoy & @jimblandy in #5500
Changed feature requirements for timestamps
Due to a specification change
write_timestampis no longer supported on WebGPU.wgpu::CommandEncoder::write_timestamprequires now the newwgpu::Features::TIMESTAMP_QUERY_INSIDE_ENCODERSfeature which is available on all native backends but not on WebGPU.By @wumpf in #5188
Wgsl const evaluation for many more built-ins
Many numeric built-ins have had a constant evaluation implementation added for them, which allows them to be used in a
constcontext:abs,acos,acosh,asin,asinh,atan,atanh,cos,cosh,round,saturate,sin,sinh,sqrt,step,tan,tanh,ceil,countLeadingZeros,countOneBits,countTrailingZeros,degrees,exp,exp2,floor,fract,fma,inverseSqrt,log,log2,max,min,radians,reverseBits,sign,truncBy @ErichDonGubler in #4879, #5098
New native-only wgsl features
Subgroup operations
The following subgroup operations are available in wgsl now:
subgroupBallot,subgroupAll,subgroupAny,subgroupAdd,subgroupMul,subgroupMin,subgroupMax,subgroupAnd,subgroupOr,subgroupXor,subgroupExclusiveAdd,subgroupExclusiveMul,subgroupInclusiveAdd,subgroupInclusiveMul,subgroupBroadcastFirst,subgroupBroadcast,subgroupShuffle,subgroupShuffleDown,subgroupShuffleUp,subgroupShuffleXorAvailability is governed by the following feature flags:
wgpu::Features::SUBGROUPfor all operations exceptsubgroupBarrierin fragment & compute, supported on Vulkan, DX12 and Metal.wgpu::Features::SUBGROUP_VERTEX, for all operations exceptsubgroupBarriergeneral operations in vertex shaders, supported on Vulkanwgpu::Features::SUBGROUP_BARRIER, for support of thesubgroupBarrieroperation, supported on Vulkan & MetalNote that there currently some differences between wgpu's native-only implementation and the open WebGPU proposal.
By @exrook and @lichtso in #5301
Signed and unsigned 64 bit integer support in shaders.
wgpu::Features::SHADER_INT64enables 64 bit integer signed and unsigned integer variables in wgsl (i64andu64respectively).Supported on Vulkan, DX12 (requires DXC) and Metal (with MSL 2.3+ support).
By @atlv24 and @cwfitzgerald in #5154
New features
General
Unorm10_10_10_2VertexFormat by @McMackety in #5477wgpu-types'straceandreplayfeatures have been replaced by theserdefeature. By @KirmesBude in #5149wgpu-core'sserial-passfeature has been removed. Useserdeinstead. By @KirmesBude in #5149InstanceFlags::GPU_BASED_VALIDATION, which enables GPU-based validation for shaders. This is currently only supported on the DX12 and Vulkan backends; other platforms ignore this flag, for now. By @ErichDonGubler in #5146, #5046.InstanceFlags::VALIDATION.InstanceFlags::advanced_debugging. Since the overhead is potentially very large, the flag is not enabled by default in debug builds when usingInstanceFlags::from_build_config.InstanceFlags::with_envwith the newWGPU_GPU_BASED_VALIDATIONenvironment variable.wgpu::Instancecan now report whichwgpu::Backendsare available based on the build configuration. By @wumpf #5167wgpu_core::pipeline::ProgrammableStageDescriptoris now optional. By @ErichDonGubler in #5305.Features::downlevel{_webgl2,}_featureswas made const by @MultisampledNight in #5343wgpu_core::pipeline::ShaderErrorhas been moved tonaga. By @stefnotch in #5410wgpu::CommandEncoder::as_hal_mutwgpu::TextureView::as_halwgpu::Texture::as_halnow returns a user-defined type to match the other as_hal functionsnaga
--metal-versionwith naga CLI. By @pcleavelin in #5392arrayLengthfor runtime-sized arrays inside binding arrays (for WGSL input and SPIR-V output). By @kvark in #5428--shader-stageand--input-kindoptions to naga-cli for specifying vertex/fragment/compute shaders, and frontend. by @ratmice in #5411create_validatorfunction to wgpu_coreDeviceto create nagaValidators. By @atlv24 #5606WebGPU
device_set_device_lost_callbackmethod forContextWebGpu. By @suti in #5438ReadOnlyandReadWrite. By @JolifantoBambla in #5434GLES / OpenGL
get_texture_format_featurescheap. By @Dinnerbone in #5346DEPTH32FLOAT_STENCIL8as supported in GLES. By @Dinnerbone in #5370TEXTURE_COMPRESSION_ETC2. By @Valaphee in #5568driveranddriver_info, with the OpenGL flavor and version, similar to Vulkan. By @valaphee in #5482Metal
DX12
Other performance improvements
Documentation
wgpu_haldocumentation. By @jimblandy in #5516, #5524, #5562, #5563, #5566, #5617, #5618PrimitiveState::strip_index_format. By @cpsdqs in #5350SourceLocation. By @stefnotch in #5386 and #5410push_constantsyntax. By @waywardmonkeys in #5393Limits::max_compute_workgroup_storage_sizedefault value. By @atlv24 in #5601Bug Fixes
General
serdefeature not compiling forwgpu-types. By @KirmesBude in #5149storageanduniformvars. By @jimblandy #5222extern "C"+ [no_mangle]) from RenderPass & ComputePass recording. By @wumpf in #5409.naga
Expression::ZeroValue. By @Imberflur in #5587.extractBitsandinsertBitswhenoffset + countoverflows the bit width. By @cwfitzgerald in #5305clampwhenminargument >maxargument. By @cwfitzgerald in #5300.TypeInner::scalar_widthto be consistent with the rest of the codebase and return values in bytes not bits. By @atlv24 in #5532.GLES / OpenGL
first_instancegetting ignored in draw indexed whenARB_shader_draw_parametersfeature is present andbase_vertexis 0. By @valaphee in #5482Vulkan
wgpu_hal::vulkan::CommandEncoderto make surediscard_encodingis not called in the closed state. By @villuna in #5557LocalTypecaching. By @atlv24 in #5590ashto0.38. By @MarijnS95 in #5504.Tests
multithreaded_computetest. By @jimblandy in #5129.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 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.