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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,28 @@ Bottom level categories:
42
42
43
43
### Major Changes
44
44
45
+
#### Deferred command buffer actions: `map_buffer_on_submit` and `on_submitted_work_done`
46
+
47
+
You may schedule buffer mapping and a submission-complete callback to run automatically after you submit, directly from encoders, command buffers, and passes.
48
+
49
+
```rust
50
+
// Record some GPU work so the submission isn't empty and touches `buffer`.
// Fires after the command buffer's work is finished.
57
+
encoder.on_submitted_work_done(|| { .. });
58
+
59
+
// Automatically calls `map_async` and `on_submitted_work_done` after this submission finishes.
60
+
queue.submit([encoder.finish()]);
61
+
```
62
+
63
+
Available on `CommandEncoder`, `CommandBuffer`, `RenderPass`, and `ComputePass`.
64
+
65
+
By @cwfitzgerald in [#8125](https://github.com/gfx-rs/wgpu/pull/8125).
66
+
45
67
#### Builtin Support for DXGI swapchains on top of of DirectComposition Visuals in DX12
46
68
47
69
By enabling DirectComposition support, the dx12 backend can now support transparent windows.
@@ -75,6 +97,7 @@ We have merged the acceleration structure feature into the `RayQuery` feature. T
75
97
By @Vecvec in [#7913](https://github.com/gfx-rs/wgpu/pull/7913).
76
98
77
99
#### New `EXPERIMENTAL_PRECOMPILED_SHADERS` API
100
+
78
101
We have added `Features::EXPERIMENTAL_PRECOMPILED_SHADERS`, replacing existing passthrough types with a unified `CreateShaderModuleDescriptorPassthrough` which allows passing multiple shader codes for different backends. By @SupaMaggie70Incorporated in [#7834](https://github.com/gfx-rs/wgpu/pull/7834)
79
102
80
103
Difference for SPIR-V passthrough:
@@ -94,6 +117,21 @@ Difference for SPIR-V passthrough:
94
117
```
95
118
This allows using precompiled shaders without manually checking which backend's code to pass, for example if you have shaders precompiled for both DXIL and SPIR-V.
96
119
120
+
#### Buffer mapping apis no longer have lifetimes
121
+
122
+
`Buffer::get_mapped_range()`, `Buffer::get_mapped_range_mut()`, and `Queue::write_buffer_with()` now return guard objects without any lifetimes. This
123
+
makes it significantly easier to store these types in structs, which is useful for building utilities that build the contents of a buffer over time.
124
+
125
+
```diff
126
+
- let buffer_mapping_ref: wgpu::BufferView<'_> = buffer.get_mapped_range(..);
127
+
- let buffer_mapping_mut: wgpu::BufferViewMut<'_> = buffer.get_mapped_range_mut(..);
128
+
- let queue_write_with: wgpu::QueueWriteBufferView<'_> = queue.write_buffer_with(..);
129
+
+ let buffer_mapping_ref: wgpu::BufferView = buffer.get_mapped_range(..);
130
+
+ let buffer_mapping_mut: wgpu::BufferViewMut = buffer.get_mapped_range_mut(..);
131
+
+ let queue_write_with: wgpu::QueueWriteBufferView = queue.write_buffer_with(..);
132
+
```
133
+
134
+
By @sagudev in [#8046](https://github.com/gfx-rs/wgpu/pull/8046) and @cwfitzgerald in [#8070](https://github.com/gfx-rs/wgpu/pull/8161).
97
135
#### `EXPERIMENTAL_*` features now require unsafe code to enable
98
136
99
137
We want to be able to expose potentially experimental features to our users before we have ensured that they are fully sound to use.
@@ -139,15 +177,18 @@ By @cwfitzgerald in [#8162](https://github.com/gfx-rs/wgpu/pull/8162).
139
177
- Copies within the same texture must not overlap.
140
178
- Copies of multisampled or depth/stencil formats must span an entire subresource (layer).
141
179
- Copies of depth/stencil formats must be 4B aligned.
180
+
- For texture-buffer copies, `bytes_per_row` on the buffer side must be 256B-aligned, even if the transfer is a single row.
142
181
- The offset for `set_vertex_buffer` and `set_index_buffer` must be 4B aligned. By @andyleiserson in [#7929](https://github.com/gfx-rs/wgpu/pull/7929).
143
182
- The offset and size of bindings are validated as fitting within the underlying buffer in more cases. By @andyleiserson in [#7911](https://github.com/gfx-rs/wgpu/pull/7911).
144
183
- The function you pass to `Device::on_uncaptured_error()` must now implement `Sync` in addition to `Send`, and be wrapped in `Arc` instead of `Box`.
145
184
In exchange for this, it is no longer possible for calling `wgpu` functions while in that callback to cause a deadlock (not that we encourage you to actually do that).
146
185
By @kpreid in [#8011](https://github.com/gfx-rs/wgpu/pull/8011).
147
186
- Make a compacted hal acceleration structure inherit a label from the base BLAS. By @Vecvec in [#8103](https://github.com/gfx-rs/wgpu/pull/8103).
148
187
- The limits requested for a device must now satisfy `min_subgroup_size <= max_subgroup_size`. By @andyleiserson in [#8085](https://github.com/gfx-rs/wgpu/pull/8085).
188
+
- Improve errors when buffer mapping is done incorrectly. Allow aliasing immutable [`BufferViews`]. By @cwfitzgerald in [#8150](https://github.com/gfx-rs/wgpu/pull/8150).
149
189
- Require new `F16_IN_F32` downlevel flag for `quantizeToF16`, `pack2x16float`, and `unpack2x16float` in WGSL input. By @aleiserson in [#8130](https://github.com/gfx-rs/wgpu/pull/8130).
150
190
- The error message for non-copyable depth/stencil formats no longer mentions the aspect when it is not relevant. By @reima in [#8156](https://github.com/gfx-rs/wgpu/pull/8156).
191
+
- Track the initialization status of buffer memory correctly when `copy_texture_to_buffer` skips over padding space between rows or layers, or when the start/end of a texture-buffer transfer is not 4B aligned. By @andyleiserson in [#8099](https://github.com/gfx-rs/wgpu/pull/8099).
0 commit comments