Skip to content

Releases: gfx-rs/wgpu

v0.16.0

20 Apr 01:01
011a4e2
Compare
Choose a tag to compare

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

  • Added TextureFormatFeatureFlags::MULTISAMPLE_X16. By @Dinnerbone in #3454
  • Added BufferUsages::QUERY_RESOLVE. By @JolifantoBambla in #3489
  • Support stencil-only views and copying to/from combined depth-stencil textures. By @teoxoy in #3436
  • Added Features::SHADER_EARLY_DEPTH_TEST. By @teoxoy in #3494
  • All fxhash dependencies have been replaced with rustc-hash. By @james7132 in #3502
  • Allow copying of textures with copy-compatible formats. By @teoxoy in #3528
  • Improve attachment related errors. By @cwfitzgerald in #3549
  • Make error descriptions all upper case. By @cwfitzgerald in #3549
  • Don't include ANSI terminal color escape sequences in shader module validation error messages. By @jimblandy in #3591
  • Report error messages from DXC compile. By @Davidster in #3632
  • Error in native when using a filterable TextureSampleType::Float on a multisample BindingType::Texture. By @mockersf in #3686
  • On Web, the size of the canvas is adjusted when using Surface::configure(). If the canvas was given an explicit size (via CSS), this will not affect the visual size of the canvas. By @daxpedda in #3690

WebGPU

Vulkan

  • Set max_memory_allocation_size via PhysicalDeviceMaintenance3Properties. By @jinleili in #3567
  • Silence false-positive validation error about surface resizing. By @seabassjh in #3627

Bug Fixes

General

  • copyTextureToTexture src/dst aspects must both refer to all aspects of src/dst format. By @teoxoy in #3431
  • Validate before extracting texture selectors. By @teoxoy in #3487
  • Fix fatal errors (those which panic even if an error handler is set) not including all of the details. By @kpreid in #3563
  • Validate shader location clashes. By @emilk in #3613
  • Fix surfaces not being dropped until exit. By @BenjaminSchaaf in #3647

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

  • Fix metal erroring on an array_stride of 0. By @teoxoy in #3538
  • create_texture returns an error if new_texture returns NULL. By @jinleili in #3554
  • Fix shader bounds checking being ignored. By @FL33TW00D in #3603

Vulkan

  • Treat VK_SUBOPTIMAL_KHR as VK_SUCCESS on Android due to rotation issues. By @James2022-rgb in #3525

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

22 Mar 21:33
4139175
Compare
Choose a tag to compare

This was released as wgpu-hal version 0.15.4 due to a previous publishing issue. All other crates remain unbumped

Bug Fixes

Metal

  • Fix incorrect mipmap being sampled when using MinLod <= 0.0 and MaxLod >= 32.0 or when the fragment shader samples different Lods in the same quad. By @cwfitzgerald in #3610.

GLES

  • Fix Vertex buffer is not big enough for the draw call. for ANGLE/Web when rendering with instance attributes on a single instance. By @Wumpf in #3596
  • Reset all queue state between command buffers in a submit. By @jleibs #3589
  • Reset the state of SAMPLE_ALPHA_TO_COVERAGE on queue reset. By @jleibs #3589

v0.15.2

10 Mar 03:33
Compare
Choose a tag to compare

Bug Fixes

Metal

  • Fix definition of NSOperatingSystemVersion to avoid potential crashes. By @grovesNL in #3557

GLES

  • Enable WEBGL_debug_renderer_info before querying unmasked vendor/renderer to avoid crashing on emscripten by @coderedart in #3519

v0.15.1

09 Feb 21:06
330d112
Compare
Choose a tag to compare

Changes

General

  • Fix for some minor issues in comments on some features. By @Wumpf in #3455

Vulkan

DX12

WebGPU

Bug Fixes

General

Vulkan

DX12

  • Fix DXC validation issues when using a custom dxil_path. By @Elabajaba in #3434

GLES

WebGPU

Documentation

General

v0.15.0

26 Jan 00:47
659f697
Compare
Choose a tag to compare

Major Changes

WGSL Top-Level let is now const

All top level constants are now declared with const, catching up with the wgsl spec.

let is no longer allowed at the global scope, only within functions.

-let SOME_CONSTANT = 12.0;
+const SOME_CONSTANT = 12.0;

See https://github.com/gfx-rs/naga/blob/master/CHANGELOG.md#v011-2023-01-25 for smaller shader improvements.

Surface Capabilities API

The various surface capability functions were combined into a single call that gives you all the capabilities.

- let formats = surface.get_supported_formats(&adapter);
- let present_modes = surface.get_supported_present_modes(&adapter);
- let alpha_modes = surface.get_supported_alpha_modes(&adapter);
+ let caps = surface.get_capabilities(&adapter);
+ let formats = caps.formats;
+ let present_modes = caps.present_modes;
+ let alpha_modes = caps.alpha_modes;

Additionally Surface::get_default_config now returns an Option and returns None if the surface isn't supported by the adapter.

- let config = surface.get_default_config(&adapter);
+ let config = surface.get_default_config(&adapter).expect("Surface unsupported by adapter");

Fallible surface creation

Instance::create_surface() now returns Result<Surface, CreateSurfaceError> instead of Surface. This allows an error to be returned if the given window is a HTML canvas and obtaining a WebGPU or WebGL 2 context fails. (No other platforms currently report any errors through this path.) By @kpreid in #3052

Queue::copy_external_image_to_texture on WebAssembly

A new api, Queue::copy_external_image_to_texture, allows you to create wgpu textures from various web image primitives. Specificically from HtmlVideoElement, HtmlCanvasElement, OffscreenCanvas, and ImageBitmap. This provides multiple low-copy ways of interacting with the browser. WebGL is also supported, though WebGL has some additional restrictions, represented by the UNRESTRICTED_EXTERNAL_IMAGE_COPIES downlevel flag. By @cwfitzgerald in #3288

Instance creation now takes InstanceDescriptor instead of Backends

Instance::new() and hub::Global::new() now take an InstanceDescriptor struct which cointains both the existing Backends selection as well as a new Dx12Compiler field for selecting which Dx12 shader compiler to use.

- let instance = Instance::new(wgpu::Backends::all());
+ let instance = Instance::new(wgpu::InstanceDescriptor {
+     backends: wgpu::Backends::all(),
+     dx12_shader_compiler: wgpu::Dx12Compiler::Fxc,
+ });

Instance now also also implements Default, which uses wgpu::Backends::all() and wgpu::Dx12Compiler::Fxc for InstanceDescriptor

- let instance = Instance::new(wgpu::InstanceDescriptor {
-     backends: wgpu::Backends::all(),
-     dx12_shader_compiler: wgpu::Dx12Compiler::Fxc,
- });
+ let instance = Instance::default();

By @Elabajaba in #3356

Texture Format Reinterpretation

The new view_formats field in the TextureDescriptor is used to specify a list of formats the texture can be re-interpreted to in a texture view. Currently only changing srgb-ness is allowed (ex. Rgba8Unorm <=> Rgba8UnormSrgb).

let texture = device.create_texture(&wgpu::TextureDescriptor {
  // ...
  format: TextureFormat::Rgba8UnormSrgb,
+ view_formats: &[TextureFormat::Rgba8Unorm],
});
let config = wgpu::SurfaceConfiguration {
  // ...
  format: TextureFormat::Rgba8Unorm,
+ view_formats: vec![wgpu::TextureFormat::Rgba8UnormSrgb],
};
surface.configure(&device, &config);

MSAA x2 and x8 Support

Via the TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES feature, MSAA x2 and x8 are now supported on textures. To query for x2 or x8 support, enable the feature and look at the texture format flags for the texture format of your choice.

By @39ali in 3140

DXC Shader Compiler Support for DX12

You can now choose to use the DXC compiler for DX12 instead of FXC. The DXC compiler is faster, less buggy, and allows for new features compared to the old, unmaintained FXC compiler.

You can choose which compiler to use at Instance creation using the dx12_shader_compiler field in the InstanceDescriptor struct. Note that DXC requires both dxcompiler.dll and dxil.dll, which can be downloaded from https://github.com/microsoft/DirectXShaderCompiler/releases. Both .dlls need to be shipped with your application when targeting DX12 and using the DXC compiler. If the .dlls can't be loaded, then it will fall back to the FXC compiler. By @39ali and @Elabajaba in #3356

Suballocate DX12 buffers and textures

The DX12 backend can now suballocate buffers and textures from larger chunks of memory, which can give a significant increase in performance (in testing a 100x improvement has been seen in a simple scene with 200 write_buffer calls per frame, and a 1.4x improvement in Bistro using Bevy).

Previously wgpu-hal's DX12 backend created a new heap on the GPU every time you called write_buffer (by calling CreateCommittedResource), whereas now it uses gpu_allocator to manage GPU memory (and calls CreatePlacedResource with a suballocated heap). By @Elabajaba in #3163

Backend selection by features in wgpu-core

Whereas wgpu-core used to automatically select backends to enable
based on the target OS and architecture, it now has separate features
to enable each backend:

  • "metal", for the Metal API on macOS and iOS
  • "vulkan", for the Vulkan API (Linux, some Android, and occasionally Windows)
  • "dx12", for Microsoft's Direct3D 12 API
  • "gles", OpenGL ES, available on many systems
  • "dx11", for Microsoft's Direct3D 11 API

None are enabled by default, but the wgpu crate automatically
selects these features based on the target operating system and
architecture, using the same rules that wgpu-core used to, so users
of wgpu should be unaffected by this change. However, other crates
using wgpu-core directly will need to copy wgpu's logic or write
their own. See the [target] section of wgpu/Cargo.toml for
details.

Similarly, wgpu-core now has emscripten and renderdoc features
that wgpu enables on appropriate platforms.

In previous releases, the wgpu-core crate decided which backends to
support. However, this left wgpu-core's users with no way to
override those choices. (Firefox doesn't want the GLES back end, for
example.) There doesn't seem to be any way to have a crate select
backends based on target OS and architecture that users of that crate
can still override. Default features can't be selected based on the
target, for example. That implies that we should do the selection as
late in the dependency DAG as feasible. Having wgpu (and
wgpu-core's other dependents) choose backends seems like the best
option.

By @jimblandy in #3254.

Changes

General

  • Convert all Default Implementations on Enums to derive(Default)
  • Implement Default for CompositeAlphaMode
  • New downlevel feature UNRESTRICTED_INDEX_BUFFER to indicate support for using INDEX together with other non-copy/map usages (unsupported on WebGL). By @Wumpf in #3157
  • Add missing DEPTH_BIAS_CLAMP and FULL_DRAW_INDEX_UINT32 downlevel flags. By @teoxoy in #3316
  • Combine Surface::get_supported_formats, Surface::get_supported_present_modes, and Surface::get_supported_alpha_modes into Surface::get_capabilities and SurfaceCapabilities. By @cwfitzgerald in #3157
  • Make Surface::get_default_config return an Option to prevent panics. By @cwfitzgerald in #3157
  • Lower the max_buffer_size limit value for compatibility with Apple2 and WebGPU compliance. By @jinleili in #3255
  • Limits min_uniform_buffer_offset_alignment and min_storage_buffer_offset_alignment is now always at least 32. By @Wumpf #3262
  • Dereferencing a buffer view is now marked inline. By @Wumpf in #3307
  • The strict_assert family of macros was moved to wgpu-types. By @i509VCB in #3051
  • Make ObjectId structure and invariants idiomatic. By @teoxoy in #3347
  • Add validation in accordance with WebGPU GPUSamplerDescriptor valid usage for lodMinClamp and lodMaxClamp. By @James2022-rgb in #3353
  • Remove panics in Deref implementations for QueueWriteBufferView and BufferViewMut. Instead, warnings are logged, since reading from these types is not recommended. By @botahamec in [#3336]
  • Implement view_formats in the TextureDescriptor to match the WebGPU spec. By @jinleili in #3237
  • Show more information in error message for non-aligned buffer bindings in WebGL #3414
  • Update TextureView validation according to the WebGPU spec. By @teoxoy in #3410
  • Implement view_formats in the SurfaceConfiguration to match the WebGPU spec. By @jinleili in #3409

Vulkan

  • Set `WE...
Read more

v0.14.2

30 Nov 23:03
628a25e
Compare
Choose a tag to compare

This release includes wgpu, and wgpu-core. The crates wgpu-hal and wgpu-types are still at 0.14.1.

Bug Fixes

  • Fix incorrect offset in get_mapped_range by @nical in #3233

v0.14.1

02 Nov 21:43
77b9a99
Compare
Choose a tag to compare

This release includes wgpu-hal, and wgpu-types. The crates wgpu and wgpu-core are still at 0.14.0.

Bug Fixes

  • Make wgpu::TextureFormat::Depth24PlusStencil8 available on all backends by making the feature unconditionally available and the feature unneeded to use the format. By @Healthire and @cwfitzgerald in #3165

v0.14.0

05 Oct 23:12
Compare
Choose a tag to compare

Major Changes

@invariant Warning

When using CompareFunction::Equal or CompareFunction::NotEqual on a pipeline, there is now a warning logged if the vertex
shader does not have a @invariant tag on it. On some machines, rendering the same triangles multiple times without an
@invariant tag will result in slightly different depths for every pixel. Because the *Equal functions rely on depth being
the same every time it is rendered, we now warn if it is missing.

-@vertex
-fn vert_main(v_in: VertexInput) -> @builtin(position) vec4<f32> {...}
+@vertex
+fn vert_main(v_in: VertexInput) -> @builtin(position) @invariant vec4<f32> {...}

Surface Alpha and PresentModes

Surface supports alpha_mode now. When alpha_mode is equal to PreMultiplied or PostMultiplied,
the alpha channel of framebuffer is respected in the compositing process, but which mode is available depends on
the different API and Device. If don't care about alpha_mode, you can set it to Auto.

SurfaceConfiguration {
// ...
+ alpha_mode: surface.get_supported_alpha_modes(&adapter)[0],
}

The function to enumerate supported presentation modes changed:

- pub fn wgpu::Surface::get_supported_modes(&self, adapter: &wgpu::Adapter) -> Vec<PresentMode>
+ pub fn wgpu::Surface::get_supported_present_modes(&self, adapter: &wgpu::Adapter) -> Vec<PresentMode>

Updated raw-window-handle to 0.5

This will allow use of the latest version of winit. As such the bound on create_surface is now RWH 0.5 and requires
both raw_window_handle::HasRawWindowHandle and raw_window_handle::HasRawDisplayHandle.

Added/New Features

  • Add Buffer::size() and Buffer::usage(); by @kpreid in #2923
  • Split Blendability and Filterability into Two Different TextureFormatFeatureFlags; by @stakka in #3012
  • Expose alpha_mode on SurfaceConfiguration, by @jinleili in #2836
  • Introduce fields for driver name and info in AdapterInfo, by @i509VCB in #3037
  • Implemented copy_external_image_to_texture on WebGPU, by @ybiletskyi in #2781

Bug Fixes

General

  • Free StagingBuffers even when an error occurs in the operation that consumes them. By @jimblandy in #2961
  • Avoid overflow when checking that texture copies fall within bounds. By @jimblandy in #2963
  • Improve the validation and error reporting of buffer mappings by @nical in #2848
  • Fix compilation errors when using wgpu-core in isolation while targetting wasm32-unknown-unknown by @Seamooo in #2922
  • Fixed opening of RenderDoc library by @ABuffSeagull in #2930
  • Added missing validation for BufferUsages mismatches when Features::MAPPABLE_PRIMARY_BUFFERS is not
    enabled. By @Imberflur in #3023
  • Fixed CommandEncoder not being Send and Sync on web by @i509VCB in #3025
  • Document meaning of vendor in AdapterInfo if the vendor has no PCI id.
  • Fix missing resource labels from some Errors by @scoopr in #3066

Metal

  • Add the missing msg_send![view, retain] call within from_view by @jinleili in #2976
  • Fix max_buffer max_texture and max_vertex_buffers limits by @jinleili in #2978
  • Remove PrivateCapabilities's format_rgb10a2_unorm_surface field by @jinleili in #2981
  • Fix validation error when copying into a subset of a single-layer texture by @nical in #3063
  • Fix _buffer_sizes encoding by @dtiselice in #3047

Vulkan

  • FixΒ astc_hdrΒ formats support by @jinleili in [#2971]](#2971)
  • Update to Naga b209d91 (2022-9-1) to avoid generating SPIR-V that
    violates Vulkan valid usage rules VUID-StandaloneSpirv-Flat-06202
    and VUID-StandaloneSpirv-Flat-04744. By @jimblandy in
    #3008
  • Fix bug where the Vulkan backend would panic when using a supported window and display handle but the
    dependent extensions are not available by @i509VCB in #3054.

GLES

Changes

General

  • Changed wgpu-hal and wgpu-core implementation to pass RawDisplayHandle and RawWindowHandle as separate
    parameters instead of passing an impl trait over both HasRawDisplayHandle and HasRawWindowHandle. By @i509VCB in #3022
  • Changed Instance::as_hal<A> to just return an Option<&A::Instance> rather than taking a callback. By @jimb in #2991
  • Added downlevel restriction error message for InvalidFormatUsages error by @Seamooo in #2886
  • Add warning when using CompareFunction::*Equal with vertex shader that is missing @invariant tag by @cwfitzgerald in #2887
  • Update Winit to version 0.27 and raw-window-handle to 0.5 by @wyatt-herkamp in #2918
  • Address Clippy 0.1.63 complaints. By @jimblandy in #2977
  • Don't use PhantomData for IdentityManager's Input type. By @jimblandy in #2972
  • Changed Naga variant in ShaderSource to Cow<'static, Module>, to allow loading global variables by @daxpedda in #2903

Metal

Vulkan

  • Remove use of Vulkan12Features/Properties types. By @i509VCB in #2936
  • Provide a means for wgpu users to access vk::Queue and the queue index. By @anlumo in #2950
  • Use the use effective api version for determining device features instead of wrongly assuming VkPhysicalDeviceProperties.apiVersion
    is the actual version of the device. By @i509VCB in #3011

GLES

  • Add Rgba16Float format support for color attachments. By @jinleili in #3045
  • TEXTURE_COMPRESSION_ASTC_HDR feature detection by @jinleili in #3042

Performance

  • Made StagingBelt::write_buffer() check more thoroughly for reusable memory; by @kpreid in #2906

Documentation

  • Add WGSL examples to complement existing examples written in GLSL by @norepimorphism in #2888
  • Document wgpu_core resource allocation. @jimblandy in #2973
  • Expanded StagingBelt documentation by @kpreid in #2905
  • Fixed documentation for Instance::create_surface_from_canvas and
    Instance::create_surface_from_offscreen_canvas regarding their
    safety contract. These functions are not unsafe. By @jimblandy #2990
  • Document that write_buffer_with() is sound but unwise to read from by @kpreid in #3006
  • Explain why Adapter::as_hal and Device::as_hal have to take callback functions. By @jimblandy in #2992

Dependency Updates

WebGPU

  • Update wasm32 dependencies, set alpha_mode on web target by @jinleili in #3040

Build Configuration

  • Add the "strict_asserts" feature, to enable additional internal
    run-time validation in wgpu-core. By @jimblandy in
    #2872.

Full API Diff

Manual concatination of cargo public-api --diff-git-checkouts v0.13.2 v0.14.0 -p wgpu and cargo public-api --diff-git-checkouts v0.13.2 v0.14.0 -p wgpu-types

Removed items from the public API
=================================
-pub fn wgpu::Surface::get_supported_modes(&self, adapter: &wgpu::Adapter) -> Vec<PresentMode>
-pub const wgpu::Features::DEPTH24UNORM_STENCIL8: Self
-pub enum variant wgpu::TextureFormat::Depth24UnormStencil8

Changed items in the public API
===============================
-pub unsafe fn wgpu::Instance::as_hal<A: wgc::hub::HalApi, F: FnOnce(Option<&<A as >::Instance>) -> R, R>(&self, hal_instance_callback: F) -> R
+pub unsafe fn wgpu::Instance::as_hal<A: wgc::hub::HalApi>(&self) -> Option<&<A as >::Instance>
-pub unsafe fn wgpu::Instance::create_surface<W: raw_window_handle::HasRawWindowHandle>(&self, window: &W) -> wgpu::Surface
+pub unsafe fn wgpu::Instance::create_surface<W: raw_window_handle::HasRawWindowHandle + raw_window_handle::HasRawDisplayHandle>(&self, window: &W) -> wgpu::Surface

Added items to the public API
=============================
+pub fn wgpu::Buffer::size(&self) -> wgt::BufferAddress
+pub fn wgpu::Buffer::usage(&self) -> BufferUsages
+pub fn wgpu::Surface:...
Read more

v0.13.2

14 Jul 02:30
Compare
Choose a tag to compare

This release includes wgpu-core, wgpu-hal, and wgpu-types. The crate wgpu is still at 0.13.1.

Bug Fixes

General

  • Prefer DeviceType::DiscreteGpu over DeviceType::Other for PowerPreference::LowPower so Vulkan is preferred over OpenGL again by @Craig-Macomber in #2853
  • Allow running get_texture_format_features on unsupported texture formats (returning no flags) by @cwfitzgerald in #2856
  • Allow multi-sampled textures that are supported by the device but not WebGPU if TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES is enabled by @cwfitzgerald in #2856
  • get_texture_format_features only lists the COPY_* usages if the adapter actually supports that usage by @cwfitzgerald in #2856
  • Fix bind group / pipeline deduplication not taking into account RenderBundle execution resetting these values by @shoebe #2867
  • Fix panics that occur when using as_hal functions when the hal generic type does not match the hub being looked up in by @i509VCB #2871
  • Add some validation in map_async by @nical in #2876
  • Fix bugs when mapping/unmapping zero-sized buffers and ranges by @nical in #2877

DX12

  • DownlevelCapabilities::default() now returns the ANISOTROPIC_FILTERING flag set to true so DX12 lists ANISOTROPIC_FILTERING as true again by @cwfitzgerald in #2851
  • Properly query format features for UAV/SRV usages of depth formats by @cwfitzgerald in #2856

GLES

  • Fix depth stencil texture format capability by @jinleili in #2854
  • get_texture_format_features now only returns usages for formats it actually supports by @cwfitzgerald in #2856

Hal

  • Allow access to queue family index in Vulkan hal by @i509VCB in #2859
  • Allow access to the EGLDisplay and EGLContext pointer in Gles hal Adapter and Device by @i509VCB in #2860

Documentation

  • Update present_mode docs as most of them don't automatically fall back to Fifo anymore. by @Elabajaba in #2855

Hal

  • Document safety requirements for Adapter::from_external in gles hal by @i509VCB in #2863

v0.13.1

03 Jul 06:05
Compare
Choose a tag to compare

This release includes wgpu, wgpu-core, and wgpu-hal. The crate wgpu-types is still at 0.13.0.

General

  • Fix out of bounds access when surface texture is written to by multiple command buffers by @cwfitzgerald in #2843

GLES