Skip to content

Commit 089f933

Browse files
committed
Deploying to master from @ gfx-rs/wgpu@7e11996 🚀
1 parent f053d5f commit 089f933

File tree

1,326 files changed

+5982
-5649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,326 files changed

+5982
-5649
lines changed

doc/search-index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/search.desc/wgpu/wgpu-desc-0-.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/search.desc/wgpu/wgpu-desc-1-.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/search.desc/wgpu_core/wgpu_core-desc-0-.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/search.desc/wgpu_types/wgpu_types-desc-0-.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/src/wgpu/api/device.rs.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@
683683
<span class="macro">static_assertions::assert_impl_all!</span>(DeviceDescriptor&lt;<span class="lifetime">'_</span>&gt;: Send, Sync);
684684

685685
<span class="kw">impl </span>Device {
686-
<span class="doccomment">/// Check for resource cleanups and mapping callbacks. Will block if [`Maintain::Wait`] is passed.
686+
<span class="doccomment">/// Check for resource cleanups and mapping callbacks. Will block if [`PollType::Wait`] is passed.
687687
///
688688
/// Return `true` if the queue is empty, or `false` if there are more queue
689689
/// submissions still in flight. (Note that, unless access to the [`Queue`] is
@@ -692,8 +692,8 @@
692692
/// other threads could submit new work at any time.)
693693
///
694694
/// When running on WebGPU, this is a no-op. `Device`s are automatically polled.
695-
</span><span class="kw">pub fn </span>poll(<span class="kw-2">&amp;</span><span class="self">self</span>, maintain: Maintain) -&gt; MaintainResult {
696-
<span class="self">self</span>.inner.poll(maintain)
695+
</span><span class="kw">pub fn </span>poll(<span class="kw-2">&amp;</span><span class="self">self</span>, poll_type: PollType) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">crate</span>::PollStatus, <span class="kw">crate</span>::PollError&gt; {
696+
<span class="self">self</span>.inner.poll(poll_type)
697697
}
698698

699699
<span class="doccomment">/// The features which can be used on this device.

doc/src/wgpu/api/queue.rs.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@
293293
<span class="attr">#[cfg(send_sync)]
294294
</span><span class="macro">static_assertions::assert_impl_all!</span>(SubmissionIndex: Send, Sync);
295295

296-
<span class="kw">pub use </span>wgt::Maintain <span class="kw">as </span>MaintainBase;
296+
<span class="kw">pub use </span>wgt::PollType <span class="kw">as </span>MaintainBase;
297297
<span class="doccomment">/// Passed to [`Device::poll`] to control how and if it should block.
298-
</span><span class="kw">pub type </span>Maintain = wgt::Maintain&lt;SubmissionIndex&gt;;
298+
</span><span class="kw">pub type </span>PollType = wgt::PollType&lt;SubmissionIndex&gt;;
299299
<span class="attr">#[cfg(send_sync)]
300-
</span><span class="macro">static_assertions::assert_impl_all!</span>(Maintain: Send, Sync);
300+
</span><span class="macro">static_assertions::assert_impl_all!</span>(PollType: Send, Sync);
301301

302302
<span class="doccomment">/// A write-only view into a staging buffer.
303303
///

doc/src/wgpu/api/surface.rs.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,14 @@
387387
<a href="#386" id="386">386</a>
388388
<a href="#387" id="387">387</a>
389389
<a href="#388" id="388">388</a>
390-
<a href="#389" id="389">389</a></pre></div><pre class="rust"><code><span class="kw">use </span>std::{error, fmt};
390+
<a href="#389" id="389">389</a>
391+
<a href="#390" id="390">390</a>
392+
<a href="#391" id="391">391</a>
393+
<a href="#392" id="392">392</a>
394+
<a href="#393" id="393">393</a>
395+
<a href="#394" id="394">394</a>
396+
<a href="#395" id="395">395</a>
397+
<a href="#396" id="396">396</a></pre></div><pre class="rust"><code><span class="kw">use </span>std::{error, fmt};
391398

392399
<span class="kw">use </span>parking_lot::Mutex;
393400
<span class="kw">use </span>raw_window_handle::{HasDisplayHandle, HasWindowHandle};
@@ -464,6 +471,13 @@
464471

465472
<span class="doccomment">/// Initializes [`Surface`] for presentation.
466473
///
474+
/// If the surface is already configured, this will wait for the GPU to come idle
475+
/// before recreating the swapchain to prevent race conditions.
476+
///
477+
/// # Validation Errors
478+
/// - Submissions that happen _during_ the configure may cause the
479+
/// internal wait-for-idle to fail, raising a validation error.
480+
///
467481
/// # Panics
468482
///
469483
/// - A old [`SurfaceTexture`] is still alive referencing an old surface.

doc/src/wgpu/backend/wgpu_core.rs.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3607,7 +3607,10 @@
36073607
<a href="#3606" id="3606">3606</a>
36083608
<a href="#3607" id="3607">3607</a>
36093609
<a href="#3608" id="3608">3608</a>
3610-
<a href="#3609" id="3609">3609</a></pre></div><pre class="rust"><code><span class="kw">use crate</span>::{
3610+
<a href="#3609" id="3609">3609</a>
3611+
<a href="#3610" id="3610">3610</a>
3612+
<a href="#3611" id="3611">3611</a>
3613+
<a href="#3612" id="3612">3612</a></pre></div><pre class="rust"><code><span class="kw">use crate</span>::{
36113614
api,
36123615
dispatch::{<span class="self">self</span>, BufferMappedRangeInterface, InterfaceTypes},
36133616
BindingResource, BufferBinding, BufferDescriptor, CompilationInfo, CompilationMessage,
@@ -5254,14 +5257,17 @@
52545257
<span class="self">self</span>.context.<span class="number">0</span>.device_stop_capture(<span class="self">self</span>.id);
52555258
}
52565259

5257-
<span class="kw">fn </span>poll(<span class="kw-2">&amp;</span><span class="self">self</span>, maintain: <span class="kw">crate</span>::Maintain) -&gt; <span class="kw">crate</span>::MaintainResult {
5258-
<span class="kw">let </span>maintain_inner = maintain.map_index(|i| i.index);
5260+
<span class="kw">fn </span>poll(<span class="kw-2">&amp;</span><span class="self">self</span>, poll_type: <span class="kw">crate</span>::PollType) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">crate</span>::PollStatus, <span class="kw">crate</span>::PollError&gt; {
5261+
<span class="kw">let </span>maintain_inner = poll_type.map_index(|i| i.index);
52595262
<span class="kw">match </span><span class="self">self</span>.context.<span class="number">0</span>.device_poll(<span class="self">self</span>.id, maintain_inner) {
5260-
<span class="prelude-val">Ok</span>(done) =&gt; <span class="kw">match </span>done {
5261-
<span class="bool-val">true </span>=&gt; wgt::MaintainResult::SubmissionQueueEmpty,
5262-
<span class="bool-val">false </span>=&gt; wgt::MaintainResult::Ok,
5263-
},
5264-
<span class="prelude-val">Err</span>(err) =&gt; <span class="self">self</span>.context.handle_error_fatal(err, <span class="string">"Device::poll"</span>),
5263+
<span class="prelude-val">Ok</span>(status) =&gt; <span class="prelude-val">Ok</span>(status),
5264+
<span class="prelude-val">Err</span>(err) =&gt; {
5265+
<span class="kw">if let </span><span class="prelude-val">Some</span>(poll_error) = err.to_poll_error() {
5266+
<span class="kw">return </span><span class="prelude-val">Err</span>(poll_error);
5267+
}
5268+
5269+
<span class="self">self</span>.context.handle_error_fatal(err, <span class="string">"Device::poll"</span>)
5270+
}
52655271
}
52665272
}
52675273

doc/src/wgpu/dispatch.rs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@
10411041
<span class="kw">fn </span>start_capture(<span class="kw-2">&amp;</span><span class="self">self</span>);
10421042
<span class="kw">fn </span>stop_capture(<span class="kw-2">&amp;</span><span class="self">self</span>);
10431043

1044-
<span class="kw">fn </span>poll(<span class="kw-2">&amp;</span><span class="self">self</span>, maintain: <span class="kw">crate</span>::Maintain) -&gt; <span class="kw">crate</span>::MaintainResult;
1044+
<span class="kw">fn </span>poll(<span class="kw-2">&amp;</span><span class="self">self</span>, poll_type: <span class="kw">crate</span>::PollType) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw">crate</span>::PollStatus, <span class="kw">crate</span>::PollError&gt;;
10451045

10461046
<span class="kw">fn </span>get_internal_counters(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw">crate</span>::InternalCounters;
10471047
<span class="kw">fn </span>generate_allocator_report(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;wgt::AllocatorReport&gt;;

0 commit comments

Comments
 (0)