Wgpu

Latest version: v0.15.2

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

Scan your dependencies

Page 6 of 13

0.13.0

Added:

* Add `iDate` builtin to Shadertoy utility.
* Allow "auto" layout args for `create_compute_pipeline()`.
* Official support for Python 3.12 and pypy.

Changed:

* Update to wgpu-native 0.18.1.2.
* `CanvasContext.get_current_texture()` now returns a `GPUTexture` instead of a `GPUTextureView`.
* `OffscreenCanvasBase.present()` now receives a `GPUTexture` instead of a `GPUTextureView`,
and this is a new texture on each draw (no re-use).
* Renamed ``wgpu.gui.WgpuOffscreenCanvas` to `WgpuOffscreenCanvasBase`.
* The `wgpu.base` submodule that defined the GPU classes is renamed to be a private
module. The new `wgpu.classes` namespace contains all GPU classes (and nothing else).
* The `__repr__` of the GPU classes shows a shorter canonical class name.
* Flags and Enums have a more useful `__repr__`.

Fixed:

* Dragging a window between windows with different scale factor (with Qt on Windows)
no longer puts the window in an invalid state. A warning is still produced though.
* `GPUCommandEncoder.begin_render_pass()` binds the lifetime of passed texture views to
the returned render pass object to prevent premature destruction when no reference to
a texture view is kept.

0.12

- API:
- `MULTIVIEW` feature
- `DEPTH_CLIP_CONTROL` feature to replace the old `DEPTH_CLAMP`
- `TEXTURE_FORMAT_16BIT_NORM` feature
- push/pop error scopes on the device
- more limits for compute shaders
- `SamplerBindingType` instead of booleans
- sampler arrays are supported by `TEXTURE_BINDING_ARRAY` feature
- "glsl" cargo feature for accepting GLSL shader code
- enforced MSRV-1.53
- correctness:
- textures are zero-initialized
- lots and lots of fixes
- validation:
- match texture-sampler pairs
- check `min_binding_size` late at draw
- check formats to match in `copy_texture_to_texture`
- allow `strip_index_format` to be none if unused
- check workgroup sizes and counts
- shaders:
- please refer to [naga-0.8 changelog](https://github.com/gfx-rs/naga/pull/1610/files)
- nice error messages

wgpu-core-0.11.3, wgpu-hal-0.11.5, wgpu-0.11.1 (2021-12-01)

- Core:
- validate device descriptor before actually creating it
- fix validation of texture-sampler pairs
- Vulkan:
- fix running on Vulkan-1.1 instance
- improve detection of workaround for Intel+Nvidia on Linux
- fix resource limits on Vulkan-1.2
- fix the check for storage buffer requirement
- change internal semaphore logic to work around Linux+Intel bugs
- fix enabling extension-provided features
- GLES:
- fix running on old and bogus drivers
- fix stale samplers on bindings change
- fix integer textures
- fix querying work group parameters
- fix stale PBO bindings caused by resource copies
- fix rendering to cubemap faces
- fix `Rgba16Float` format
- fix stale vertex attributes when changing the pipeline
- Metal:
- fix window resizing for running in multiple processes
- Web:
- fix `set_index_buffer` and `set_vertex_buffer` to have optional sizes

wgpu-core-0.11.2, wgpu-hal-0.11.4 (2021-10-22)

- fix buffer transition barriers
- Metal:
- disable RW buffers on macOS 10.11
- fix memory leaks in render pass descriptor
- WebGL:
- fix surface reconfiguration
- GLES:
- fix mapping when persistent mapping isn't supported
- allow presentation in Android emulator
- fix sRGB attributes on EGL-1.4 contexts

wgpu-hal-0.11.3 (2021-10-16)

- GL:
- fix mapping flags and buffer initialization
- fix context creation when sRGB is available

wgpu-core-0.11.1 (2021-10-15)

- fix bind group layout lifetime with regard to bind groups

wgpu-hal-0.11.2 (2021-10-12)

- GL/WebGL: fix vertex buffer bindings with non-zero first instance
- DX12: fix cube array view construction

wgpu-hal-0.11.1 (2021-10-09)

- Vulkan: fix NV optimus detection on Linux
- GL:
- fix indirect dispatch buffers
- WebGL:
- fix querying storage-related limits
- work around a browser bug in the clear shader

0.12.0

This is a big release that contains many improvements, but also multiple API changes.

Most backward incompatible changes are due to two things: the backend
system has been refactored, making it simpler and future-proof. And we
have revised the buffer mapping API, making it more similar to the
WebGPU spec, and providing more flexible and performant ways to set
buffer data.

A summary to help you update your code:
py
X import wgpu.backends.rs
import wgpu


X wgpu.request_adapter(canvas=None, power_preference="high-performance")
wgpu.gpu.request_adapter(power_preference="high-performance")

X buffer.map_read()
buffer.map("READ")
buffer.read_mapped(...)
buffer.read_mapped(...)
buffer.unmap()

X buffer.map_write()
buffer.map("WRITE")
buffer.write_mapped(data1, ...)
buffer.write_mapped(data2, ...)
buffer.unmap()


Added:

* The `wgpu.gpu` object, which represents the API entrypoint. This makes the API more clear and more similar to the WebGPU API.
* A convenience `auto` backend, and a stub `js_webgpu` backend.
* New function `enumerate_adapters()` in the `wgpu_native` backend.
* Warning about pip when wgpu-native binary is missing on Linux
* The `GPUBuffer` has new methods `map()`, `map_async()`, `unmap()`. These have been
part of the WebGPU spec for a long time, but we had an alternative API, until now.
* The `GPUBuffer` has new methods `read_mapped()` and `write_mapped()`. These are not
present in the WebGPU spec; they are the Pythonic alternative to `getMappedRange()`.
* Flags can now be passed as strings, and can even be combined using "MAP_READ|COPY_DIST".
* GUI events have an extra "timestamp" field, and wheel events an additional "buttons" field.
* A diagnostics subsystem that amongst other things counts GPU objects. Try e.g. `wgpu.diagnostics.print_report()`.
* Several improvements to the shadertoy util: offscreen support and a snapshot method.

Changed:

* Can create a buffer that is initially mapped: `device.create_buffer(..., mapped_at_creation=True)` is enabled again.
* The `wgpu.request_adapter()` function is moved to `wgpu.gpu.request_adapter()`. Same for the async version.
* The `canvas` argument of the `request_adapter()` function is now optional.
* The `rs` backend is renamed to `wgpu_native`.
* It is no longer necessary to explicitly import the backend.
* The `GPUDevice.request_device_tracing()` method is now a function in the `wgpu_native` backend.
* We no longer force using Vulkan on Windows. For now wgpu-native still prefers Vulkan over D3D12.
* The `wgpu.utils` subpackage is imported by default, but most submodules are not. This means that `compute_with_buffers` must be explicitly imported from `wgpu.utils.compute`.

Deprecated:

* `wgpu.request_adapter()` and its async version. Use `wgpu.gpu.request_adapter()` instead.
* The `GPUBuffer` methods `map_read()`and `map_write()` are deprecated, in favor of `map()`, `unmap()`, `read_mapped()` and `write_mapped()`.

To be clear, these are not changed:

* The convenient `device.create_buffer_with_data()` (not part of the WebGPU spec) is still available.
* The `GPUQueue.read_buffer()` and `GPUQueue.write_buffer()` methods are unchanged.

Fixed:

* The shaderutil now re-uses the default device, avoiding memoryleaks when running multiple consecutively.
* The GUI backend selection takes into account whether a backend module is already imported.
* The offscreen GUI backend no longer uses asyncio (it does not need an event loop).
* Prevent a few classes of memoryleaks. Mind that creating many `GPUDevice` objects still leaks.

0.11

- Infrastructure:
- Deno WebGPU plugin is a part of the repository
- WebGPU CTS is ran on CI via Deno
- API:
- initial WebGL support
- `SwapchainFrame` is removed. `SurfaceTexture::present()` needs to be called instead of dropping.
- better SPIR-V control flow processing
- ability to request a software (fallback) adapter
- new limits for `min_uniform_buffer_offset_alignment` and `min_storage_buffer_offset_alignment`
- features:
- new `PARTIALLY_BOUND_BINDING_ARRAY`
- `NON_FILL_POLYGON_MODE` is split into `POLYGON_MODE_LINE` and `POLYGON_MODE_POINT`
- fixes:
- many shader-related fixes in Naga-0.7
- fix a panic in resource cleanup happening when they are dropped on another thread
- Vulkan:
- create SPIR-V per entry point to work around driver bugs
- expose higher descriptor limits based on descriptor indexing capabilities
- GL and Vulkan:
- Fix renderdoc device pointers
- optimization:
- on Vulkan, bounds checks are omitted if the platform can do them natively

wgpu-core-0.10.4, wgpu-0.10.2 (2021-09-23)

- fix `write_texture` for array textures
- fix closing an encoder on validation error
- expose Metal surface creation
- panic with an actual error message in the default handler

wgpu-hal-0.10.7 (2021-09-14)

- Metal:
- fix stencil back-face state
- fix the limit on command buffer count

wgpu-hal-0.10.6 (2021-09-12)

- Metal:
- fix stencil operations
- fix memory leak on M1 when out of focus
- fix depth clamping checks
- fix unsized storage buffers beyond the first

wgpu-core-0.10.3, wgpu-hal-0.10.4 (2021-09-08)

- Vulkan:
- fix read access barriers for writable storage buffers
- fix shaders using cube array textures
- work around Linux Intel+Nvidia driver conflicts
- work around Adreno bug with `OpName`
- DX12:
- fix storage binding offsets
- Metal:
- fix compressed texture copies

wgpu-core-0.10.2, wgpu-hal-0.10.3 (2021-09-01)

- All:
- fix querying the size of storage textures
- Vulkan:
- use render pass labels
- Metal:
- fix moving the surface between displays
- DX12:
- enable BC compressed textures
- GL:
- fix vertex-buffer and storage related limits

wgpu-core-0.10.1, wgpu-hal-0.10.2 (2021-08-24)

- All:
- expose more formats via adapter-specific feature
- fix creation of depth+stencil views
- validate cube textures to not be used as storage
- fix mip level count check for storage textures
- Metal:
- fix usage of work group memory
- DX12:
- critical fix of pipeline layout

0.11.0

Changed:

* Update to wgpu-native 0.17.2.1. No changes are needed in downstream code.

0.10

- Infrastructure:
- `gfx-hal` is replaced by the in-house graphics abstraction `wgpu-hal`. Backends: Vulkan, Metal, D3D-12, and OpenGL ES-3.
- examples are tested automatically for image snapshots.
- API:
- `cross` feature is removed entirely. Only Rust code from now on.
- processing SPIR-V inputs for later translation now requires `spirv` compile feature enabled
- new `Features::SPIRV_SHADER_PASSTHROUGH` run-time feature allows providing pass-through SPIR-V (orthogonal to the compile feature)
- several bitflag names are renamed to plural: `TextureUsage`, `BufferUsage`, `ColorWrite`.
- the `SwapChain` is merged into `Surface`. Returned frames are `Texture` instead of `TextureView`.
- renamed `TextureUsage` bits: `SAMPLED` -> `TEXTURE_BINDING`, `STORAGE` -> `STORAGE_BINDING`.
- renamed `InputStepMode` to `VertexStepMode`.
- readable storage textures are no longer a part of the base API. Only exposed via format-specific features, non-portably.
- implemented `Rgb9e5Ufloat` format.
- added limits for binding sizes, vertex data, per-stage bindings, and others.
- reworked downlevel flags, added downlevel limits.
- `resolver = "2"` is now required in top-level cargo manifests
- Fixed:
- `Device::create_query_set` would return an error when creating exactly `QUERY_SET_MAX_QUERIES` (8192) queries. Now it only returns an error when trying to create _more_ than `QUERY_SET_MAX_QUERIES` queries.

wgpu-core-0.9.2

- fix `Features::TEXTURE_SPECIFIC_FORMAT_FEATURES` not being supported for rendertargets

wgpu-core-0.9.1 (2021-07-13)

- fix buffer inits delayed by a frame
- fix query resolves to initialize buffers
- fix pipeline statistics stride
- fix the check for maximum query count

Page 6 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.