Skip to content

Commit e78bf61

Browse files
committed
Deploying to master from @ gfx-rs/wgpu@ebdd958 🚀
1 parent 2b8fee2 commit e78bf61

File tree

162 files changed

+894
-840
lines changed

Some content is hidden

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

162 files changed

+894
-840
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/src/wgpu/api/surface.rs.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@
385385
<a href="#384" id="384">384</a>
386386
<a href="#385" id="385">385</a>
387387
<a href="#386" id="386">386</a>
388+
<a href="#387" id="387">387</a>
388389
</pre></div><pre class="rust"><code><span class="kw">use </span>std::{error, fmt};
389390

390391
<span class="kw">use </span>parking_lot::Mutex;
@@ -489,6 +490,7 @@
489490
SurfaceStatus::Timeout =&gt; <span class="kw">return </span><span class="prelude-val">Err</span>(SurfaceError::Timeout),
490491
SurfaceStatus::Outdated =&gt; <span class="kw">return </span><span class="prelude-val">Err</span>(SurfaceError::Outdated),
491492
SurfaceStatus::Lost =&gt; <span class="kw">return </span><span class="prelude-val">Err</span>(SurfaceError::Lost),
493+
SurfaceStatus::Unknown =&gt; <span class="kw">return </span><span class="prelude-val">Err</span>(SurfaceError::Other),
492494
};
493495

494496
<span class="kw">let </span>guard = <span class="self">self</span>.config.lock();

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
<a href="#73" id="73">73</a>
7575
<a href="#74" id="74">74</a>
7676
<a href="#75" id="75">75</a>
77+
<a href="#76" id="76">76</a>
78+
<a href="#77" id="77">77</a>
79+
<a href="#78" id="78">78</a>
7780
</pre></div><pre class="rust"><code><span class="kw">use </span>std::{error, fmt, thread};
7881

7982
<span class="kw">use crate</span>::<span class="kw-2">*</span>;
@@ -134,6 +137,8 @@
134137
</span>Lost,
135138
<span class="doccomment">/// There is no more memory left to allocate a new frame.
136139
</span>OutOfMemory,
140+
<span class="doccomment">/// Acquiring a texture failed with a generic error. Check error callbacks for more information.
141+
</span>Other,
137142
}
138143
<span class="macro">static_assertions::assert_impl_all!</span>(SurfaceError: Send, Sync);
139144

@@ -144,6 +149,7 @@
144149
<span class="self">Self</span>::Outdated =&gt; <span class="string">"The underlying surface has changed, and therefore the swap chain must be updated"</span>,
145150
<span class="self">Self</span>::Lost =&gt; <span class="string">"The swap chain has been lost and needs to be recreated"</span>,
146151
<span class="self">Self</span>::OutOfMemory =&gt; <span class="string">"There is no more memory left to allocate a new frame"</span>,
152+
<span class="self">Self</span>::Other =&gt; <span class="string">"Acquiring a texture failed with a generic error. Check error callbacks for more information"</span>,
147153
})
148154
}
149155
}

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

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3536,6 +3536,23 @@
35363536
<a href="#3535" id="3535">3535</a>
35373537
<a href="#3536" id="3536">3536</a>
35383538
<a href="#3537" id="3537">3537</a>
3539+
<a href="#3538" id="3538">3538</a>
3540+
<a href="#3539" id="3539">3539</a>
3541+
<a href="#3540" id="3540">3540</a>
3542+
<a href="#3541" id="3541">3541</a>
3543+
<a href="#3542" id="3542">3542</a>
3544+
<a href="#3543" id="3543">3543</a>
3545+
<a href="#3544" id="3544">3544</a>
3546+
<a href="#3545" id="3545">3545</a>
3547+
<a href="#3546" id="3546">3546</a>
3548+
<a href="#3547" id="3547">3547</a>
3549+
<a href="#3548" id="3548">3548</a>
3550+
<a href="#3549" id="3549">3549</a>
3551+
<a href="#3550" id="3550">3550</a>
3552+
<a href="#3551" id="3551">3551</a>
3553+
<a href="#3552" id="3552">3552</a>
3554+
<a href="#3553" id="3553">3553</a>
3555+
<a href="#3554" id="3554">3554</a>
35393556
</pre></div><pre class="rust"><code><span class="kw">use crate</span>::{
35403557
api,
35413558
dispatch::{<span class="self">self</span>, BufferMappedRangeInterface, InterfaceTypes},
@@ -3980,6 +3997,9 @@
39803997
<span class="doccomment">/// Configured device is needed to know which backend
39813998
/// code to execute when acquiring a new frame.
39823999
</span>configured_device: Mutex&lt;<span class="prelude-ty">Option</span>&lt;wgc::id::DeviceId&gt;&gt;,
4000+
<span class="doccomment">/// The error sink with which to report errors.
4001+
/// `None` if the surface has not been configured.
4002+
</span>error_sink: Mutex&lt;<span class="prelude-ty">Option</span>&lt;ErrorSink&gt;&gt;,
39834003
}
39844004

39854005
<span class="attr">#[derive(Debug)]
@@ -4365,6 +4385,7 @@
43654385
context: <span class="self">self</span>.clone(),
43664386
id,
43674387
configured_device: Mutex::default(),
4388+
error_sink: Mutex::default(),
43684389
}))
43694390
}
43704391

@@ -6973,9 +6994,11 @@
69736994

69746995
<span class="kw">let </span>error = <span class="self">self</span>.context.<span class="number">0</span>.surface_configure(<span class="self">self</span>.id, device.id, config);
69756996
<span class="kw">if let </span><span class="prelude-val">Some</span>(e) = error {
6976-
<span class="self">self</span>.context.handle_error_fatal(e, <span class="string">"Surface::configure"</span>);
6997+
<span class="self">self</span>.context
6998+
.handle_error_nolabel(<span class="kw-2">&amp;</span>device.error_sink, e, <span class="string">"Surface::configure"</span>);
69776999
} <span class="kw">else </span>{
69787000
<span class="kw-2">*</span><span class="self">self</span>.configured_device.lock() = <span class="prelude-val">Some</span>(device.id);
7001+
<span class="kw-2">*</span><span class="self">self</span>.error_sink.lock() = <span class="prelude-val">Some</span>(device.error_sink.clone());
69797002
}
69807003
}
69817004

@@ -6986,6 +7009,12 @@
69867009
<span class="kw">crate</span>::SurfaceStatus,
69877010
dispatch::DispatchSurfaceOutputDetail,
69887011
) {
7012+
<span class="kw">let </span>output_detail = CoreSurfaceOutputDetail {
7013+
context: <span class="self">self</span>.context.clone(),
7014+
surface_id: <span class="self">self</span>.id,
7015+
}
7016+
.into();
7017+
69897018
<span class="kw">match </span><span class="self">self</span>.context.<span class="number">0</span>.surface_get_current_texture(<span class="self">self</span>.id, <span class="prelude-val">None</span>) {
69907019
<span class="prelude-val">Ok</span>(wgc::present::SurfaceOutput { status, texture_id }) =&gt; {
69917020
<span class="kw">let </span>data = texture_id
@@ -6996,19 +7025,24 @@
69967025
})
69977026
.map(Into::into);
69987027

6999-
(
7000-
data,
7001-
status,
7002-
CoreSurfaceOutputDetail {
7003-
context: <span class="self">self</span>.context.clone(),
7004-
surface_id: <span class="self">self</span>.id,
7028+
(data, status, output_detail)
7029+
}
7030+
<span class="prelude-val">Err</span>(err) =&gt; {
7031+
<span class="kw">let </span>error_sink = <span class="self">self</span>.error_sink.lock();
7032+
<span class="kw">match </span>error_sink.as_ref() {
7033+
<span class="prelude-val">Some</span>(error_sink) =&gt; {
7034+
<span class="self">self</span>.context.handle_error_nolabel(
7035+
error_sink,
7036+
err,
7037+
<span class="string">"Surface::get_current_texture_view"</span>,
7038+
);
7039+
(<span class="prelude-val">None</span>, <span class="kw">crate</span>::SurfaceStatus::Unknown, output_detail)
70057040
}
7006-
.into(),
7007-
)
7041+
<span class="prelude-val">None </span>=&gt; <span class="self">self
7042+
</span>.context
7043+
.handle_error_fatal(err, <span class="string">"Surface::get_current_texture_view"</span>),
7044+
}
70087045
}
7009-
<span class="prelude-val">Err</span>(err) =&gt; <span class="self">self
7010-
</span>.context
7011-
.handle_error_fatal(err, <span class="string">"Surface::get_current_texture_view"</span>),
70127046
}
70137047
}
70147048
}

doc/src/wgpu_examples/framework.rs.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@
638638
<a href="#637" id="637">637</a>
639639
<a href="#638" id="638">638</a>
640640
<a href="#639" id="639">639</a>
641+
<a href="#640" id="640">640</a>
641642
</pre></div><pre class="rust"><code><span class="kw">use </span>std::sync::Arc;
642643

643644
<span class="kw">use </span>wgpu::{Instance, Surface};
@@ -866,6 +867,7 @@
866867
<span class="comment">// If the surface is outdated, or was lost, reconfigure it.
867868
</span>wgpu::SurfaceError::Outdated
868869
| wgpu::SurfaceError::Lost
870+
| wgpu::SurfaceError::Other
869871
<span class="comment">// If OutOfMemory happens, reconfiguring may not help, but we might as well try
870872
</span>| wgpu::SurfaceError::OutOfMemory,
871873
) =&gt; {

doc/src/wgpu_types/lib.rs.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7795,6 +7795,8 @@
77957795
<a href="#7794" id="7794">7794</a>
77967796
<a href="#7795" id="7795">7795</a>
77977797
<a href="#7796" id="7796">7796</a>
7798+
<a href="#7797" id="7797">7797</a>
7799+
<a href="#7798" id="7798">7798</a>
77987800
</pre></div><pre class="rust"><code><span class="doccomment">//! This library describes the API surface of WebGPU that is agnostic of the backend.
77997801
//! This API is used for targeting both Web and Native.
78007802

@@ -13439,6 +13441,8 @@
1343913441
</span>Outdated,
1344013442
<span class="doccomment">/// The surface under the swap chain is lost.
1344113443
</span>Lost,
13444+
<span class="doccomment">/// The surface status is not known since `get_current_texture` previously failed.
13445+
</span>Unknown,
1344213446
}
1344313447

1344413448
<span class="doccomment">/// Nanosecond timestamp used by the presentation engine.

0 commit comments

Comments
 (0)