chore(deps): update rust crate wgpu to 0.20 #1236
Open
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.20
Release Notes
gfx-rs/wgpu (wgpu)
v0.20.1
Compare Source
This release included v0.21.0 of
wgpu-core
andwgpu-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
switch
statements with a single body for all cases. These are now written asdo {} while(false);
loops in hlsl-out and glsl-out. By @Imberflur in #5654continue
statements in switches by setting a flag and breaking from the switch. This allows such constructs to work with FXC which does not supportcontinue
within a switch. By @Imberflur in #5654v0.20.0
Compare 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_timestamp
is no longer supported on WebGPU.wgpu::CommandEncoder::write_timestamp
requires now the newwgpu::Features::TIMESTAMP_QUERY_INSIDE_ENCODERS
feature 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
const
context: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
,trunc
By @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
,subgroupShuffleXor
Availability is governed by the following feature flags:
wgpu::Features::SUBGROUP
for all operations exceptsubgroupBarrier
in fragment & compute, supported on Vulkan, DX12 and Metal.wgpu::Features::SUBGROUP_VERTEX
, for all operations exceptsubgroupBarrier
general operations in vertex shaders, supported on Vulkanwgpu::Features::SUBGROUP_BARRIER
, for support of thesubgroupBarrier
operation, 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_INT64
enables 64 bit integer signed and unsigned integer variables in wgsl (i64
andu64
respectively).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_2
VertexFormat by @McMackety in #5477wgpu-types
'strace
andreplay
features have been replaced by theserde
feature. By @KirmesBude in #5149wgpu-core
'sserial-pass
feature has been removed. Useserde
instead. 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_env
with the newWGPU_GPU_BASED_VALIDATION
environment variable.wgpu::Instance
can now report whichwgpu::Backends
are available based on the build configuration. By @wumpf #5167wgpu_core::pipeline::ProgrammableStageDescriptor
is now optional. By @ErichDonGubler in #5305.Features::downlevel{_webgl2,}_features
was made const by @MultisampledNight in #5343wgpu_core::pipeline::ShaderError
has been moved tonaga
. By @stefnotch in #5410wgpu::CommandEncoder::as_hal_mut
wgpu::TextureView::as_hal
wgpu::Texture::as_hal
now returns a user-defined type to match the other as_hal functionsNaga
--metal-version
with Naga CLI. By @pcleavelin in #5392arrayLength
for runtime-sized arrays inside binding arrays (for WGSL input and SPIR-V output). By @kvark in #5428--shader-stage
and--input-kind
options to naga-cli for specifying vertex/fragment/compute shaders, and frontend. by @ratmice in #5411create_validator
function to wgpu_coreDevice
to create nagaValidator
s. By @atlv24 #5606WebGPU
device_set_device_lost_callback
method forContextWebGpu
. By @suti in #5438ReadOnly
andReadWrite
. By @JolifantoBambla in #5434GLES / OpenGL
get_texture_format_features
cheap. By @Dinnerbone in #5346DEPTH32FLOAT_STENCIL8
as supported in GLES. By @Dinnerbone in #5370TEXTURE_COMPRESSION_ETC2
. By @Valaphee in #5568driver
anddriver_info
, with the OpenGL flavor and version, similar to Vulkan. By @valaphee in #5482Metal
DX12
Other performance improvements
Documentation
wgpu_hal
documentation. By @jimblandy in #5516, #5524, #5562, #5563, #5566, #5617, #5618PrimitiveState::strip_index_format
. By @cpsdqs in #5350SourceLocation
. By @stefnotch in #5386 and #5410push_constant
syntax. By @waywardmonkeys in #5393Limits::max_compute_workgroup_storage_size
default value. By @atlv24 in #5601Bug Fixes
General
serde
feature not compiling forwgpu-types
. By @KirmesBude in #5149storage
anduniform
vars. By @jimblandy #5222extern "C"
+ [no_mangle]) from RenderPass & ComputePass recording. By @wumpf in #5409.Naga
Expression::ZeroValue
. By @Imberflur in #5587.extractBits
andinsertBits
whenoffset + count
overflows the bit width. By @cwfitzgerald in #5305clamp
whenmin
argument >max
argument. By @cwfitzgerald in #5300.TypeInner::scalar_width
to be consistent with the rest of the codebase and return values in bytes not bits. By @atlv24 in #5532.GLES / OpenGL
first_instance
getting ignored in draw indexed whenARB_shader_draw_parameters
feature is present andbase_vertex
is 0. By @valaphee in #5482Vulkan
wgpu_hal::vulkan::CommandEncoder
to make surediscard_encoding
is not called in the closed state. By @villuna in #5557LocalType
caching. By @atlv24 in #5590ash
to0.38
. By @MarijnS95 in #5504.Tests
multithreaded_compute
test. 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 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.