You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have revised the buffer mapping API, making it more similar to the
48
-
WebGPU spec, and providing more flexible and performant ways to set
49
-
buffer data.
45
+
# X buffer.map_write()
46
+
buffer.map("WRITE")
47
+
buffer.write_mapped(data1, ...)
48
+
buffer.write_mapped(data2, ...)
49
+
buffer.unmap()
50
+
```
50
51
51
52
Added:
52
53
54
+
* The `wgpu.gpu` object, which represents the API entrypoint. This makes the API more clear and more similar to the WebGPU API.
55
+
* A convenience `auto` backend, and a stub `js_webgpu` backend.
56
+
* New function `enumerate_adapters()` in the `wgpu_native` backend.
57
+
* Warning about pip when wgpu-native binary is missing on Linux
53
58
* The `GPUBuffer` has new methods `map()`, `map_async()`, `unmap()`. These have been
54
59
part of the WebGPU spec for a long time, but we had an alternative API, until now.
55
60
* The `GPUBuffer` has new methods `read_mapped()` and `write_mapped()`. These are not
56
61
present in the WebGPU spec; they are the Pythonic alternative to `getMappedRange()`.
62
+
* Flags can now be passed as strings, and can even be combined using "MAP_READ|COPY_DIST".
63
+
* GUI events have an extra "timestamp" field, and wheel events an additional "buttons" field.
64
+
* A diagnostics subsystem that amongst other things counts GPU objects. Try e.g. `wgpu.diagnostics.print_report()`.
65
+
* Several improvements to the shadertoy util: offscreen support and a snapshot method.
57
66
58
67
Changed:
59
68
60
69
* Can create a buffer that is initially mapped: `device.create_buffer(..., mapped_at_creation=True)` is enabled again.
70
+
* The `wgpu.request_adapter()` function is moved to `wgpu.gpu.request_adapter()`. Same for the async version.
71
+
* The `canvas` argument of the `request_adapter()` function is now optional.
72
+
* The `rs` backend is renamed to `wgpu_native`.
73
+
* It is no longer necessary to explicitly import the backend.
74
+
* The `GPUDevice.request_device_tracing()` method is now a function in the `wgpu_native` backend.
75
+
* We no longer force using Vulkan on Windows. For now wgpu-native still prefers Vulkan over D3D12.
76
+
* 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`.
61
77
62
-
Removed:
78
+
Deprecated:
63
79
80
+
*`wgpu.request_adapter()` and its async version. Use `wgpu.gpu.request_adapter()` instead.
64
81
* The `GPUBuffer` methods `map_read()`and `map_write()` are deprecated, in favor of `map()`, `unmap()`, `read_mapped()` and `write_mapped()`.
65
82
66
-
For the record, these are not changed:
83
+
To be clear, these are not changed:
67
84
68
-
* The convenient `device.create_buffer_with_data()` (not part of the WebGPU spec) is also available.
85
+
* The convenient `device.create_buffer_with_data()` (not part of the WebGPU spec) is still available.
69
86
* The `GPUQueue.read_buffer()` and `GPUQueue.write_buffer()` methods are unchanged.
70
87
88
+
Fixed:
89
+
90
+
* The shaderutil now re-uses the default device, avoiding memoryleaks when running multiple consecutively.
91
+
* The GUI backend selection takes into account whether a backend module is already imported.
92
+
* The offscreen GUI backend no longer uses asyncio (it does not need an event loop).
93
+
* Prevent a few classes of memoryleaks. Mind that creating many `GPUDevice` objects still leaks.
94
+
95
+
96
+
### [v0.11.0] - 11-10-2023
97
+
98
+
Changed:
99
+
100
+
* Update to wgpu-native 0.17.2.1. No changes are needed in downstream code.
0 commit comments