Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Update Rust crate wgpu to 0.16 #30

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Update Rust crate wgpu to 0.16 #30

wants to merge 5 commits into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 20, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
wgpu (source) dependencies minor 0.15 -> 0.16

Release Notes

gfx-rs/wgpu

v0.16.0

Compare Source

Major changes
Shader Changes

type has been replaced with alias to match with upstream WebGPU.

- type MyType = vec4<u32>;
+ alias MyType = vec4<u32>;
TextureFormat info API

The TextureFormat::describe function was removed in favor of separate functions: block_dimensions, is_compressed, is_srgb, required_features, guaranteed_format_features, sample_type and block_size.

- let block_dimensions = format.describe().block_dimensions;
+ let block_dimensions = format.block_dimensions();
- let is_compressed = format.describe().is_compressed();
+ let is_compressed = format.is_compressed();
- let is_srgb = format.describe().srgb;
+ let is_srgb = format.is_srgb();
- let required_features = format.describe().required_features;
+ let required_features = format.required_features();

Additionally guaranteed_format_features now takes a set of features to assume are enabled.

- let guaranteed_format_features = format.describe().guaranteed_format_features;
+ let guaranteed_format_features = format.guaranteed_format_features(device.features());

Additionally sample_type and block_size now take an optional TextureAspect and return Options.

- let sample_type = format.describe().sample_type;
+ let sample_type = format.sample_type(None).expect("combined depth-stencil format requires specifying a TextureAspect");
- let block_size = format.describe().block_size;
+ let block_size = format.block_size(None).expect("combined depth-stencil format requires specifying a TextureAspect");

By @​teoxoy in #​3436

BufferUsages::QUERY_RESOLVE

Buffers used as the destination argument of CommandEncoder::resolve_query_set now have to contain the QUERY_RESOLVE usage instead of the COPY_DST usage.

  let destination = device.create_buffer(&wgpu::BufferDescriptor {
      // ...
-     usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::MAP_READ,
+     usage: wgpu::BufferUsages::QUERY_RESOLVE | wgpu::BufferUsages::MAP_READ,
      mapped_at_creation: false,
  });
  command_encoder.resolve_query_set(&query_set, query_range, &destination, destination_offset);

By @​JolifantoBambla in #​3489

Renamed features

The following Features have been renamed.

  • SHADER_FLOAT16 -> SHADER_F16
  • SHADER_FLOAT64 -> SHADER_F64
  • SHADER_INT16 -> SHADER_I16
  • TEXTURE_COMPRESSION_ASTC_LDR -> TEXTURE_COMPRESSION_ASTC
  • WRITE_TIMESTAMP_INSIDE_PASSES -> TIMESTAMP_QUERY_INSIDE_PASSES

By @​teoxoy in #​3534

Anisotropic Filtering

Anisotropic filtering has been brought in line with the spec. The anisotropic clamp is now a u16 (was a Option<u8>) which must be at least 1.

If the anisotropy clamp is not 1, all the filters in a sampler must be Linear.

SamplerDescriptor {
-    anisotropic_clamp: None,
+    anisotropic_clamp: 1,
}

By @​cwfitzgerald in #​3610.

TextureFormat Names

Some texture format names have changed to get back in line with the spec.

- TextureFormat::Bc6hRgbSfloat
+ TextureFormat::Bc6hRgbFloat

By @​cwfitzgerald in #​3671.

Misc Breaking Changes
  • Change type of mip_level_count and array_layer_count (members of TextureViewDescriptor and ImageSubresourceRange) from Option<NonZeroU32> to Option<u32>. By @​teoxoy in #​3445
  • Change type of bytes_per_row and rows_per_image (members of ImageDataLayout) from Option<NonZeroU32> to Option<u32>. By @​teoxoy in #​3529
  • On Web, Instance::create_surface_from_canvas() and create_surface_from_offscreen_canvas() now take the canvas by value. By @​daxpedda in #​3690
Changes
General
WebGPU
Vulkan
Bug Fixes
General
WebGPU
  • Fix handling of None values for depth_ops and stencil_ops in RenderPassDescriptor::depth_stencil_attachment. By @​niklaskorz in #​3660
  • Avoid using WasmAbi functions for WebGPU backend. By @​grovesNL in #​3657
DX12
  • Use typeless formats for textures that might be viewed as srgb or non-srgb. By @​teoxoy in #​3555
GLES
  • Set FORCE_POINT_SIZE if it is vertex shader with mesh consist of point list. By @​REASY in 3440
  • Remove unwraps inside surface.configure. By @​cwfitzgerald in #​3585
  • Fix copy_external_image_to_texture, copy_texture_to_texture and copy_buffer_to_texture not taking the specified index into account if the target texture is a cube map, 2D texture array or cube map array. By @​daxpedda #​3641
  • Fix disabling of vertex attributes with non-consecutive locations. By @​Azorlogh in #​3706
Metal
Vulkan
Examples
  • Use BufferUsages::QUERY_RESOLVE instead of BufferUsages::COPY_DST for buffers used in CommandEncoder::resolve_query_set calls in mipmap example. By @​JolifantoBambla in #​3489

v0.15.1

Compare Source

Changes
General
Vulkan
DX12
WebGPU
Bug Fixes
General
Vulkan
DX12
GLES
WebGPU
Documentation
General

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/wgpu-0.x branch from 388552c to 4b08f40 Compare April 30, 2023 01:37
@renovate
Copy link
Contributor Author

renovate bot commented Apr 30, 2023

Edited/Blocked Notification

Renovate 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.

Warning: custom changes will be lost.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant