Skip to content

Commit e647238

Browse files
committed
Deploying to master from @ gfx-rs/wgpu@c0a580d 🚀
1 parent bbd7311 commit e647238

File tree

1,696 files changed

+9443
-8900
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,696 files changed

+9443
-8900
lines changed

doc/player/trait.GlobalPlay.html

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,37 @@
22
// Required methods
33
fn <a href="#tymethod.encode_commands" class="fn">encode_commands</a>(
44
&amp;self,
5-
encoder: CommandEncoderId,
6-
commands: <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Command&gt;,
7-
) -&gt; CommandBufferId;
5+
encoder: <a class="type" href="../wgpu_core/id/type.CommandEncoderId.html" title="type wgpu_core::id::CommandEncoderId">CommandEncoderId</a>,
6+
commands: <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../wgpu_core/device/trace/enum.Command.html" title="enum wgpu_core::device::trace::Command">Command</a>&gt;,
7+
) -&gt; <a class="type" href="../wgpu_core/id/type.CommandBufferId.html" title="type wgpu_core::id::CommandBufferId">CommandBufferId</a>;
88
<span class="item-spacer"></span> fn <a href="#tymethod.process" class="fn">process</a>(
99
&amp;self,
10-
device: DeviceId,
11-
queue: QueueId,
12-
action: Action&lt;'_&gt;,
10+
device: <a class="type" href="../wgpu_core/id/type.DeviceId.html" title="type wgpu_core::id::DeviceId">DeviceId</a>,
11+
queue: <a class="type" href="../wgpu_core/id/type.QueueId.html" title="type wgpu_core::id::QueueId">QueueId</a>,
12+
action: <a class="enum" href="../wgpu_core/device/trace/enum.Action.html" title="enum wgpu_core::device::trace::Action">Action</a>&lt;'_&gt;,
1313
dir: &amp;<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
14-
comb_manager: &amp;mut IdentityManager&lt;CommandBuffer&gt;,
14+
comb_manager: &amp;mut <a class="struct" href="../wgpu_core/identity/struct.IdentityManager.html" title="struct wgpu_core::identity::IdentityManager">IdentityManager</a>&lt;<a class="enum" href="../wgpu_core/id/markers/enum.CommandBuffer.html" title="enum wgpu_core::id::markers::CommandBuffer">CommandBuffer</a>&gt;,
1515
);
1616
}</code></pre><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><section id="tymethod.encode_commands" class="method"><a class="src rightside" href="../src/player/lib.rs.html#14-18">Source</a><h4 class="code-header">fn <a href="#tymethod.encode_commands" class="fn">encode_commands</a>(
1717
&amp;self,
18-
encoder: CommandEncoderId,
19-
commands: <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Command&gt;,
20-
) -&gt; CommandBufferId</h4></section><section id="tymethod.process" class="method"><a class="src rightside" href="../src/player/lib.rs.html#19-26">Source</a><h4 class="code-header">fn <a href="#tymethod.process" class="fn">process</a>(
18+
encoder: <a class="type" href="../wgpu_core/id/type.CommandEncoderId.html" title="type wgpu_core::id::CommandEncoderId">CommandEncoderId</a>,
19+
commands: <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../wgpu_core/device/trace/enum.Command.html" title="enum wgpu_core::device::trace::Command">Command</a>&gt;,
20+
) -&gt; <a class="type" href="../wgpu_core/id/type.CommandBufferId.html" title="type wgpu_core::id::CommandBufferId">CommandBufferId</a></h4></section><section id="tymethod.process" class="method"><a class="src rightside" href="../src/player/lib.rs.html#19-26">Source</a><h4 class="code-header">fn <a href="#tymethod.process" class="fn">process</a>(
2121
&amp;self,
22-
device: DeviceId,
23-
queue: QueueId,
24-
action: Action&lt;'_&gt;,
22+
device: <a class="type" href="../wgpu_core/id/type.DeviceId.html" title="type wgpu_core::id::DeviceId">DeviceId</a>,
23+
queue: <a class="type" href="../wgpu_core/id/type.QueueId.html" title="type wgpu_core::id::QueueId">QueueId</a>,
24+
action: <a class="enum" href="../wgpu_core/device/trace/enum.Action.html" title="enum wgpu_core::device::trace::Action">Action</a>&lt;'_&gt;,
2525
dir: &amp;<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
26-
comb_manager: &amp;mut IdentityManager&lt;CommandBuffer&gt;,
27-
)</h4></section></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-GlobalPlay-for-Global" class="impl"><a class="src rightside" href="../src/player/lib.rs.html#29-428">Source</a><a href="#impl-GlobalPlay-for-Global" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.GlobalPlay.html" title="trait player::GlobalPlay">GlobalPlay</a> for Global</h3></section></summary><div class="impl-items"><section id="method.encode_commands" class="method trait-impl"><a class="src rightside" href="../src/player/lib.rs.html#30-181">Source</a><a href="#method.encode_commands" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.encode_commands" class="fn">encode_commands</a>(
26+
comb_manager: &amp;mut <a class="struct" href="../wgpu_core/identity/struct.IdentityManager.html" title="struct wgpu_core::identity::IdentityManager">IdentityManager</a>&lt;<a class="enum" href="../wgpu_core/id/markers/enum.CommandBuffer.html" title="enum wgpu_core::id::markers::CommandBuffer">CommandBuffer</a>&gt;,
27+
)</h4></section></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-GlobalPlay-for-Global" class="impl"><a class="src rightside" href="../src/player/lib.rs.html#29-428">Source</a><a href="#impl-GlobalPlay-for-Global" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.GlobalPlay.html" title="trait player::GlobalPlay">GlobalPlay</a> for <a class="struct" href="../wgpu_core/global/struct.Global.html" title="struct wgpu_core::global::Global">Global</a></h3></section></summary><div class="impl-items"><section id="method.encode_commands" class="method trait-impl"><a class="src rightside" href="../src/player/lib.rs.html#30-181">Source</a><a href="#method.encode_commands" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.encode_commands" class="fn">encode_commands</a>(
2828
&amp;self,
29-
encoder: CommandEncoderId,
30-
commands: <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;Command&gt;,
31-
) -&gt; CommandBufferId</h4></section><section id="method.process" class="method trait-impl"><a class="src rightside" href="../src/player/lib.rs.html#183-427">Source</a><a href="#method.process" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.process" class="fn">process</a>(
29+
encoder: <a class="type" href="../wgpu_core/id/type.CommandEncoderId.html" title="type wgpu_core::id::CommandEncoderId">CommandEncoderId</a>,
30+
commands: <a class="struct" href="https://doc.rust-lang.org/1.84.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../wgpu_core/device/trace/enum.Command.html" title="enum wgpu_core::device::trace::Command">Command</a>&gt;,
31+
) -&gt; <a class="type" href="../wgpu_core/id/type.CommandBufferId.html" title="type wgpu_core::id::CommandBufferId">CommandBufferId</a></h4></section><section id="method.process" class="method trait-impl"><a class="src rightside" href="../src/player/lib.rs.html#183-427">Source</a><a href="#method.process" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.process" class="fn">process</a>(
3232
&amp;self,
33-
device: DeviceId,
34-
queue: QueueId,
35-
action: Action&lt;'_&gt;,
33+
device: <a class="type" href="../wgpu_core/id/type.DeviceId.html" title="type wgpu_core::id::DeviceId">DeviceId</a>,
34+
queue: <a class="type" href="../wgpu_core/id/type.QueueId.html" title="type wgpu_core::id::QueueId">QueueId</a>,
35+
action: <a class="enum" href="../wgpu_core/device/trace/enum.Action.html" title="enum wgpu_core::device::trace::Action">Action</a>&lt;'_&gt;,
3636
dir: &amp;<a class="struct" href="https://doc.rust-lang.org/1.84.1/std/path/struct.Path.html" title="struct std::path::Path">Path</a>,
37-
comb_manager: &amp;mut IdentityManager&lt;CommandBuffer&gt;,
37+
comb_manager: &amp;mut <a class="struct" href="../wgpu_core/identity/struct.IdentityManager.html" title="struct wgpu_core::identity::IdentityManager">IdentityManager</a>&lt;<a class="enum" href="../wgpu_core/id/markers/enum.CommandBuffer.html" title="enum wgpu_core::id::markers::CommandBuffer">CommandBuffer</a>&gt;,
3838
)</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/player/trait.GlobalPlay.js" data-ignore-extern-crates="wgpu_core" async></script></section></div></main></body></html>

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-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_hal/wgpu_hal-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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,8 @@
781781
<a href="#780" id="780">780</a>
782782
<a href="#781" id="781">781</a>
783783
<a href="#782" id="782">782</a>
784-
<a href="#783" id="783">783</a></pre></div><pre class="rust"><code><span class="kw">use </span>alloc::{boxed::Box, string::String, sync::Arc, vec};
784+
<a href="#783" id="783">783</a>
785+
<a href="#784" id="784">784</a></pre></div><pre class="rust"><code><span class="kw">use </span>alloc::{boxed::Box, string::String, sync::Arc, vec};
785786
<span class="kw">use </span>core::{error, fmt, future::Future};
786787

787788
<span class="kw">use </span><span class="kw">crate</span>::api::blas::{Blas, BlasGeometrySizeDescriptors, CreateBlasDescriptor};
@@ -1105,6 +1106,7 @@
11051106
/// - `hal_buffer` must be created from this device internal handle
11061107
/// - `hal_buffer` must be created respecting `desc`
11071108
/// - `hal_buffer` must be initialized
1109+
/// - `hal_buffer` must not have zero size
11081110
</span><span class="attr">#[cfg(wgpu_core)]
11091111
#[must_use]
11101112
</span><span class="kw">pub unsafe fn </span>create_buffer_from_hal&lt;A: wgc::hal_api::HalApi&gt;(

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3686,7 +3686,13 @@
36863686
<a href="#3685" id="3685">3685</a>
36873687
<a href="#3686" id="3686">3686</a>
36883688
<a href="#3687" id="3687">3687</a>
3689-
<a href="#3688" id="3688">3688</a></pre></div><pre class="rust"><code><span class="kw">use </span>alloc::{
3689+
<a href="#3688" id="3688">3688</a>
3690+
<a href="#3689" id="3689">3689</a>
3691+
<a href="#3690" id="3690">3690</a>
3692+
<a href="#3691" id="3691">3691</a>
3693+
<a href="#3692" id="3692">3692</a>
3694+
<a href="#3693" id="3693">3693</a>
3695+
<a href="#3694" id="3694">3694</a></pre></div><pre class="rust"><code><span class="kw">use </span>alloc::{
36903696
borrow::Cow::{<span class="self">self</span>, Borrowed},
36913697
boxed::Box,
36923698
format,
@@ -3858,7 +3864,13 @@
38583864
}
38593865
}
38603866

3861-
<span class="kw">pub unsafe fn </span>create_buffer_from_hal&lt;A: wgc::hal_api::HalApi&gt;(
3867+
<span class="doccomment">/// # Safety
3868+
///
3869+
/// - `hal_buffer` must be created from `device`.
3870+
/// - `hal_buffer` must be created respecting `desc`
3871+
/// - `hal_buffer` must be initialized
3872+
/// - `hal_buffer` must not have zero size.
3873+
</span><span class="kw">pub unsafe fn </span>create_buffer_from_hal&lt;A: wgc::hal_api::HalApi&gt;(
38623874
<span class="kw-2">&amp;</span><span class="self">self</span>,
38633875
hal_buffer: A::Buffer,
38643876
device: <span class="kw-2">&amp;</span>CoreDevice,

doc/src/wgpu_core/binding_model.rs.html

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,34 @@
12361236
<a href="#1235" id="1235">1235</a>
12371237
<a href="#1236" id="1236">1236</a>
12381238
<a href="#1237" id="1237">1237</a>
1239-
<a href="#1238" id="1238">1238</a></pre></div><pre class="rust"><code><span class="kw">use </span>alloc::{
1239+
<a href="#1238" id="1238">1238</a>
1240+
<a href="#1239" id="1239">1239</a>
1241+
<a href="#1240" id="1240">1240</a>
1242+
<a href="#1241" id="1241">1241</a>
1243+
<a href="#1242" id="1242">1242</a>
1244+
<a href="#1243" id="1243">1243</a>
1245+
<a href="#1244" id="1244">1244</a>
1246+
<a href="#1245" id="1245">1245</a>
1247+
<a href="#1246" id="1246">1246</a>
1248+
<a href="#1247" id="1247">1247</a>
1249+
<a href="#1248" id="1248">1248</a>
1250+
<a href="#1249" id="1249">1249</a>
1251+
<a href="#1250" id="1250">1250</a>
1252+
<a href="#1251" id="1251">1251</a>
1253+
<a href="#1252" id="1252">1252</a>
1254+
<a href="#1253" id="1253">1253</a>
1255+
<a href="#1254" id="1254">1254</a>
1256+
<a href="#1255" id="1255">1255</a>
1257+
<a href="#1256" id="1256">1256</a>
1258+
<a href="#1257" id="1257">1257</a>
1259+
<a href="#1258" id="1258">1258</a>
1260+
<a href="#1259" id="1259">1259</a>
1261+
<a href="#1260" id="1260">1260</a>
1262+
<a href="#1261" id="1261">1261</a>
1263+
<a href="#1262" id="1262">1262</a>
1264+
<a href="#1263" id="1263">1263</a>
1265+
<a href="#1264" id="1264">1264</a>
1266+
<a href="#1265" id="1265">1265</a></pre></div><pre class="rust"><code><span class="kw">use </span>alloc::{
12401267
borrow::{Cow, ToOwned},
12411268
boxed::Box,
12421269
string::String,
@@ -1332,15 +1359,48 @@
13321359
}
13331360
}
13341361

1335-
<span class="comment">//TODO: refactor this to move out `enum BindingError`.
1362+
<span class="attr">#[derive(Clone, Debug, Error)]
1363+
#[non_exhaustive]
1364+
</span><span class="kw">pub enum </span>BindingError {
1365+
<span class="attr">#[error(transparent)]
1366+
</span>DestroyedResource(<span class="attr">#[from] </span>DestroyedResourceError),
1367+
<span class="attr">#[error(<span class="string">"Buffer {buffer}: Binding with size {binding_size} at offset {offset} would overflow buffer size of {buffer_size}"</span>)]
1368+
</span>BindingRangeTooLarge {
1369+
buffer: ResourceErrorIdent,
1370+
offset: wgt::BufferAddress,
1371+
binding_size: u64,
1372+
buffer_size: u64,
1373+
},
1374+
<span class="attr">#[error(<span class="string">"Buffer {buffer}: Binding offset {offset} is greater than buffer size {buffer_size}"</span>)]
1375+
</span>BindingOffsetTooLarge {
1376+
buffer: ResourceErrorIdent,
1377+
offset: wgt::BufferAddress,
1378+
buffer_size: u64,
1379+
},
1380+
}
13361381

1382+
<span class="kw">impl </span>WebGpuError <span class="kw">for </span>BindingError {
1383+
<span class="kw">fn </span>webgpu_error_type(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; ErrorType {
1384+
<span class="kw">match </span><span class="self">self </span>{
1385+
<span class="self">Self</span>::DestroyedResource(e) =&gt; e.webgpu_error_type(),
1386+
<span class="self">Self</span>::BindingRangeTooLarge { .. } | <span class="self">Self</span>::BindingOffsetTooLarge { .. } =&gt; {
1387+
ErrorType::Validation
1388+
}
1389+
}
1390+
}
1391+
}
1392+
1393+
<span class="comment">// TODO: there may be additional variants here that can be extracted into
1394+
// `BindingError`.
13371395
</span><span class="attr">#[derive(Clone, Debug, Error)]
13381396
#[non_exhaustive]
13391397
</span><span class="kw">pub enum </span>CreateBindGroupError {
13401398
<span class="attr">#[error(transparent)]
13411399
</span>Device(<span class="attr">#[from] </span>DeviceError),
13421400
<span class="attr">#[error(transparent)]
13431401
</span>DestroyedResource(<span class="attr">#[from] </span>DestroyedResourceError),
1402+
<span class="attr">#[error(transparent)]
1403+
</span>BindingError(<span class="attr">#[from] </span>BindingError),
13441404
<span class="attr">#[error(
13451405
<span class="string">"Binding count declared with at most {expected} items, but {actual} items were provided"
13461406
</span>)]
@@ -1351,12 +1411,6 @@
13511411
</span>BindingArrayLengthMismatch { actual: usize, expected: usize },
13521412
<span class="attr">#[error(<span class="string">"Array binding provided zero elements"</span>)]
13531413
</span>BindingArrayZeroLength,
1354-
<span class="attr">#[error(<span class="string">"The bound range {range:?} of {buffer} overflows its size ({size})"</span>)]
1355-
</span>BindingRangeTooLarge {
1356-
buffer: ResourceErrorIdent,
1357-
range: Range&lt;wgt::BufferAddress&gt;,
1358-
size: u64,
1359-
},
13601414
<span class="attr">#[error(<span class="string">"Binding size {actual} of {buffer} is less than minimum {min}"</span>)]
13611415
</span>BindingSizeTooSmall {
13621416
buffer: ResourceErrorIdent,
@@ -1471,14 +1525,14 @@
14711525
<span class="kw">let </span>e: <span class="kw-2">&amp;</span><span class="kw">dyn </span>WebGpuError = <span class="kw">match </span><span class="self">self </span>{
14721526
<span class="self">Self</span>::Device(e) =&gt; e,
14731527
<span class="self">Self</span>::DestroyedResource(e) =&gt; e,
1528+
<span class="self">Self</span>::BindingError(e) =&gt; e,
14741529
<span class="self">Self</span>::MissingBufferUsage(e) =&gt; e,
14751530
<span class="self">Self</span>::MissingTextureUsage(e) =&gt; e,
14761531
<span class="self">Self</span>::ResourceUsageCompatibility(e) =&gt; e,
14771532
<span class="self">Self</span>::InvalidResource(e) =&gt; e,
14781533
<span class="self">Self</span>::BindingArrayPartialLengthMismatch { .. }
14791534
| <span class="self">Self</span>::BindingArrayLengthMismatch { .. }
14801535
| <span class="self">Self</span>::BindingArrayZeroLength
1481-
| <span class="self">Self</span>::BindingRangeTooLarge { .. }
14821536
| <span class="self">Self</span>::BindingSizeTooSmall { .. }
14831537
| <span class="self">Self</span>::BindingsNumMismatch { .. }
14841538
| <span class="self">Self</span>::BindingZeroSize(<span class="kw">_</span>)

0 commit comments

Comments
 (0)