Wgpu

Latest version: v0.15.2

Safety actively analyzes 629788 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 13

0.18.0

For naga changelogs at or before v0.14.0. See [naga's changelog](naga/CHANGELOG.md).

Desktop OpenGL 3.3+ Support on Windows

We now support OpenGL on Windows! This brings support for a vast majority of the hardware that used to be covered by our DX11 backend. As of this writing we support OpenGL 3.3+, though there are efforts to reduce that further.

This allows us to cover the last 12 years of Intel GPUs (starting with Ivy Bridge; aka 3xxx), and the last 16 years of AMD (starting with Terascale; aka HD 2000) / NVidia GPUs (starting with Tesla; aka GeForce 8xxx).

By Zoxc in [4248](https://github.com/gfx-rs/wgpu/pull/4248)

Timestamp Queries Supported on Metal and OpenGL

Timestamp queries are now supported on both Metal and Desktop OpenGL. On Apple chips on Metal, they only support timestamp queries in command buffers or in the renderpass descriptor,
they do not support them inside a pass.

Metal: By Wumpf in [4008](https://github.com/gfx-rs/wgpu/pull/4008)
OpenGL: By Zoxc in [4267](https://github.com/gfx-rs/wgpu/pull/4267)

Render/Compute Pass Query Writes

Addition of the `TimestampWrites` type to compute and render pass descriptors to allow profiling on tilers which do not support timestamps inside passes.

Added [an example](https://github.com/gfx-rs/wgpu/tree/trunk/examples/timestamp-queries) to demonstrate the various kinds of timestamps.

Additionally, metal now supports timestamp queries!

By FL33TW00D & wumpf in [3636](https://github.com/gfx-rs/wgpu/pull/3636).

Occlusion Queries

We now support binary occlusion queries! This allows you to determine if any of the draw calls within the query drew any pixels.

Use the new `occlusion_query_set` field on `RenderPassDescriptor` to give a query set that occlusion queries will write to.

diff
let mut rpass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
// ...
+ occlusion_query_set: Some(&my_occlusion_query_set),
});


Within the renderpass do the following to write the occlusion query results to the query set at the given index:

rust
rpass.begin_occlusion_query(index);
rpass.draw(...);
rpass.draw(...);
rpass.end_occlusion_query();


These are binary occlusion queries, so the result will be either 0 or an unspecified non-zero value.

By Valaphee in [3402](https://github.com/gfx-rs/wgpu/pull/3402)

Shader Improvements

rust
// WGSL constant expressions are now supported!
const BLAH: u32 = 1u + 1u;

// `rgb10a2uint` and `bgra8unorm` can now be used as a storage image format.
var image: texture_storage_2d<rgb10a2uint, write>;
var image: texture_storage_2d<bgra8unorm, write>;

// You can now use dual source blending!
struct FragmentOutput{
location(0) source1: vec4<f32>,
location(0) second_blend_source source2: vec4<f32>,
}

// `modf`/`frexp` now return structures
let result = modf(1.5);

0.17.2

Bug Fixes

Vulkan

- Fix x11 hang while resizing on vulkan. Azorlogh in [4184](https://github.com/gfx-rs/wgpu/pull/4184).

0.17.1

Added/New Features

- Add `get_mapped_range_as_array_buffer` for faster buffer read-backs in wasm builds. By ryankaplan in [4042] (https://github.com/gfx-rs/wgpu/pull/4042).

Bug Fixes

DX12

- Fix panic on resize when using DX12. By cwfitzgerald in [4106](https://github.com/gfx-rs/wgpu/pull/4106)

Vulkan

- Suppress validation error caused by OBS layer. This was also fixed upstream. By cwfitzgerald in [4002](https://github.com/gfx-rs/wgpu/pull/4002)
- Work around bug in nvidia's vkCmdFillBuffer implementation. By cwfitzgerald in [4132](https://github.com/gfx-rs/wgpu/pull/4132).

0.17.0

This is the first release that featured `wgpu-info` as a binary crate for getting information about what devices wgpu sees in your system. It can dump the information in both human readable format and json.

Major Changes

This release was fairly minor as breaking changes go.

`wgpu` types now `!Send` `!Sync` on wasm

Up until this point, wgpu has made the assumption that threads do not exist on wasm. With the rise of libraries like [`wasm_thread`](https://crates.io/crates/wasm_thread) making it easier and easier to do wasm multithreading this assumption is no longer sound. As all wgpu objects contain references into the JS heap, they cannot leave the thread they started on.

As we understand that this change might be very inconvenient for users who don't care about wasm threading, there is a crate feature which re-enables the old behavior: `fragile-send-sync-non-atomic-wasm`. So long as you don't compile your code with `-Ctarget-feature=+atomics`, `Send` and `Sync` will be implemented again on wgpu types on wasm. As the name implies, especially for libraries, this is very fragile, as you don't know if a user will want to compile with atomics (and therefore threads) or not.

By daxpedda in [3691](https://github.com/gfx-rs/wgpu/pull/3691)

Power Preference is now optional

The `power_preference` field of `RequestAdapterOptions` is now optional. If it is `PowerPreference::None`, we will choose the first available adapter, preferring GPU adapters over CPU adapters.

By Aaron1011 in [3903](https://github.com/gfx-rs/wgpu/pull/3903)

`initialize_adapter_from_env` argument changes

Removed the backend_bits parameter from `initialize_adapter_from_env` and `initialize_adapter_from_env_or_default`. If you want to limit the backends used by this function, only enable the wanted backends in the instance.

Added a compatible surface parameter, to ensure the given device is able to be presented onto the given surface.

diff
- wgpu::util::initialize_adapter_from_env(instance, backend_bits);
+ wgpu::util::initialize_adapter_from_env(instance, Some(&compatible_surface));


By fornwall in [3904](https://github.com/gfx-rs/wgpu/pull/3904) and [#3905](https://github.com/gfx-rs/wgpu/pull/3905)

Misc Breaking Changes

- Change `AdapterInfo::{device,vendor}` to be `u32` instead of `usize`. By ameknite in [3760](https://github.com/gfx-rs/wgpu/pull/3760)

Changes

- Added support for importing external buffers using `buffer_from_raw` (Dx12, Metal, Vulkan) and `create_buffer_from_hal`. By AdrianEddy in [3355](https://github.com/gfx-rs/wgpu/pull/3355)


Vulkan

- Work around [Vulkan-ValidationLayers5671](https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5671) by ignoring reports of violations of [VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912](https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdEndDebugUtilsLabelEXT-commandBuffer-01912). By jimblandy in [3809](https://github.com/gfx-rs/wgpu/pull/3809).

Added/New Features

General

- Empty scissor rects are allowed now, matching the specification. by PJB3005 in [3863](https://github.com/gfx-rs/wgpu/pull/3863).
- Add back components info to `TextureFormat`s. By teoxoy in [3843](https://github.com/gfx-rs/wgpu/pull/3843).
- Add `get_mapped_range_as_array_buffer` for faster buffer read-backs in wasm builds. By ryankaplan in [4042] (https://github.com/gfx-rs/wgpu/pull/4042).

Documentation

- Better documentation for draw, draw_indexed, set_viewport and set_scissor_rect. By genusistimelord in [3860](https://github.com/gfx-rs/wgpu/pull/3860)
- Fix link to `GPUVertexBufferLayout`. By fornwall in [3906](https://github.com/gfx-rs/wgpu/pull/3906)
- Document feature requirements for `DEPTH32FLOAT_STENCIL8` by ErichDonGubler in [3734](https://github.com/gfx-rs/wgpu/pull/3734).
- Flesh out docs. for `AdapterInfo::{device,vendor}` by ErichDonGubler in [3763](https://github.com/gfx-rs/wgpu/pull/3763).
- Spell out which sizes are in bytes. By jimblandy in [3773](https://github.com/gfx-rs/wgpu/pull/3773).
- Validate that `descriptor.usage` is not empty in `create_buffer` by nical in [3928](https://github.com/gfx-rs/wgpu/pull/3928)
- Update `max_bindings_per_bind_group` limit to reflect spec changes by ErichDonGubler and nical in [3943](https://github.com/gfx-rs/wgpu/pull/3943) [#3942](https://github.com/gfx-rs/wgpu/pull/3942)
- Add better docs for `Limits`, listing the actual limits returned by `downlevel_defaults` and `downlevel_webgl2_defaults` by JustAnotherCodemonkey in [3988](https://github.com/gfx-rs/wgpu/pull/3988)

Bug Fixes

General

- Fix order of arguments to glPolygonOffset by komadori in [3783](https://github.com/gfx-rs/wgpu/pull/3783).
- Fix OpenGL/EGL backend not respecting non-sRGB texture formats in `SurfaceConfiguration`. by liquidev in [3817](https://github.com/gfx-rs/wgpu/pull/3817)
- Make write- and read-only marked buffers match non-readonly layouts. by fornwall in [3893](https://github.com/gfx-rs/wgpu/pull/3893)
- Fix leaking X11 connections. by wez in [3924](https://github.com/gfx-rs/wgpu/pull/3924)
- Fix ASTC feature selection in the webgl backend. by expenses in [3934](https://github.com/gfx-rs/wgpu/pull/3934)
- Fix Multiview to disable validation of TextureViewDimension and ArrayLayerCount. By MalekiRe in [3779](https://github.com/gfx-rs/wgpu/pull/3779#issue-1713269437).

Vulkan

- Fix incorrect aspect in barriers when using emulated Stencil8 textures. By cwfitzgerald in [3833](https://github.com/gfx-rs/wgpu/pull/3833).
- Implement depth-clip-control using depthClamp instead of VK_EXT_depth_clip_enable. By AlbinBernhardssonARM [3892](https://github.com/gfx-rs/wgpu/pull/3892).
- Fix enabling `wgpu::Features::PARTIALLY_BOUND_BINDING_ARRAY` not being actually enabled in vulkan backend. By 39ali in[3772](https://github.com/gfx-rs/wgpu/pull/3772).

Metal

- Fix renderpasses being used inside of renderpasses. By cwfitzgerald in [3828](https://github.com/gfx-rs/wgpu/pull/3828)
- Support (simulated) visionOS. By jinleili in [3883](https://github.com/gfx-rs/wgpu/pull/3883)

DX12

- Disable suballocation on Intel Iris(R) Xe. By xiaopengli89 in [3668](https://github.com/gfx-rs/wgpu/pull/3668)
- Change the `max_buffer_size` limit from `u64::MAX` to `i32::MAX`. By nical in [4020](https://github.com/gfx-rs/wgpu/pull/4020)

WebGPU

- Use `get_preferred_canvas_format()` to fill `formats` of `SurfaceCapabilities`. By jinleili in [3744](https://github.com/gfx-rs/wgpu/pull/3744)

Examples

- Publish examples to wgpu.rs on updates to trunk branch instead of gecko. By paul-hansen in [3750](https://github.com/gfx-rs/wgpu/pull/3750)
- Ignore the exception values generated by the winit resize event. By jinleili in [3916](https://github.com/gfx-rs/wgpu/pull/3916)

0.16.3

Changes

General

- Make the `Id` type that is exposed when using the `expose-ids` feature implement `Send` and `Sync` again. This was unintentionally changed by the v0.16.0 release and is now fixed.

0.16.2

Changes

DX12

- Increase the `max_storage_buffers_per_shader_stage` and `max_storage_textures_per_shader_stage` limits based on what the hardware supports. by Elabajaba in [3798]https://github.com/gfx-rs/wgpu/pull/3798

Page 3 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.