Skip to content

Commit bbd7311

Browse files
committed
Deploying to master from @ gfx-rs/wgpu@3d0fe3a 🚀
1 parent 4e22eb4 commit bbd7311

File tree

492 files changed

+2482
-2099
lines changed

Some content is hidden

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

492 files changed

+2482
-2099
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: <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>;
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;
88
<span class="item-spacer"></span> fn <a href="#tymethod.process" class="fn">process</a>(
99
&amp;self,
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;,
10+
device: DeviceId,
11+
queue: QueueId,
12+
action: Action&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 <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;,
14+
comb_manager: &amp;mut IdentityManager&lt;CommandBuffer&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: <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>(
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>(
2121
&amp;self,
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;,
22+
device: DeviceId,
23+
queue: QueueId,
24+
action: Action&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 <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>(
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>(
2828
&amp;self,
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>(
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>(
3232
&amp;self,
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;,
33+
device: DeviceId,
34+
queue: QueueId,
35+
action: Action&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 <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;,
37+
comb_manager: &amp;mut IdentityManager&lt;CommandBuffer&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-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_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_core/command/transfer.rs.html

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,13 +1207,24 @@
12071207
<a href="#1206" id="1206">1206</a>
12081208
<a href="#1207" id="1207">1207</a>
12091209
<a href="#1208" id="1208">1208</a>
1210-
<a href="#1209" id="1209">1209</a></pre></div><pre class="rust"><code><span class="kw">use </span>alloc::{sync::Arc, vec::Vec};
1210+
<a href="#1209" id="1209">1209</a>
1211+
<a href="#1210" id="1210">1210</a>
1212+
<a href="#1211" id="1211">1211</a>
1213+
<a href="#1212" id="1212">1212</a>
1214+
<a href="#1213" id="1213">1213</a>
1215+
<a href="#1214" id="1214">1214</a>
1216+
<a href="#1215" id="1215">1215</a>
1217+
<a href="#1216" id="1216">1216</a>
1218+
<a href="#1217" id="1217">1217</a>
1219+
<a href="#1218" id="1218">1218</a>
1220+
<a href="#1219" id="1219">1219</a></pre></div><pre class="rust"><code><span class="kw">use </span>alloc::{sync::Arc, vec::Vec};
12111221

12121222
<span class="kw">use </span>arrayvec::ArrayVec;
12131223
<span class="kw">use </span>thiserror::Error;
12141224
<span class="kw">use </span>wgt::{
12151225
error::{ErrorType, WebGpuError},
1216-
BufferAddress, BufferUsages, Extent3d, TextureSelector, TextureUsages,
1226+
BufferAddress, BufferTextureCopyInfoError, BufferUsages, Extent3d, TextureSelector,
1227+
TextureUsages,
12171228
};
12181229

12191230
<span class="attr">#[cfg(feature = <span class="string">"trace"</span>)]
@@ -1304,6 +1315,8 @@
13041315
</span>InvalidBytesPerRow,
13051316
<span class="attr">#[error(<span class="string">"Number of rows per image is invalid"</span>)]
13061317
</span>InvalidRowsPerImage,
1318+
<span class="attr">#[error(<span class="string">"Overflow while computing the size of the copy"</span>)]
1319+
</span>SizeOverflow,
13071320
<span class="attr">#[error(<span class="string">"Copy source aspects must refer to all aspects of the source texture format"</span>)]
13081321
</span>CopySrcMissingAspects,
13091322
<span class="attr">#[error(
@@ -1373,6 +1386,7 @@
13731386
| <span class="self">Self</span>::UnspecifiedRowsPerImage
13741387
| <span class="self">Self</span>::InvalidBytesPerRow
13751388
| <span class="self">Self</span>::InvalidRowsPerImage
1389+
| <span class="self">Self</span>::SizeOverflow
13761390
| <span class="self">Self</span>::CopySrcMissingAspects
13771391
| <span class="self">Self</span>::CopyDstMissingAspects
13781392
| <span class="self">Self</span>::CopyAspectNotOne
@@ -1390,6 +1404,18 @@
13901404
}
13911405
}
13921406

1407+
<span class="kw">impl </span>From&lt;BufferTextureCopyInfoError&gt; <span class="kw">for </span>TransferError {
1408+
<span class="kw">fn </span>from(value: BufferTextureCopyInfoError) -&gt; <span class="self">Self </span>{
1409+
<span class="kw">match </span>value {
1410+
BufferTextureCopyInfoError::InvalidBytesPerRow =&gt; <span class="self">Self</span>::InvalidBytesPerRow,
1411+
BufferTextureCopyInfoError::InvalidRowsPerImage =&gt; <span class="self">Self</span>::InvalidRowsPerImage,
1412+
BufferTextureCopyInfoError::ImageStrideOverflow
1413+
| BufferTextureCopyInfoError::ImageBytesOverflow(<span class="kw">_</span>)
1414+
| BufferTextureCopyInfoError::ArraySizeOverflow(<span class="kw">_</span>) =&gt; <span class="self">Self</span>::SizeOverflow,
1415+
}
1416+
}
1417+
}
1418+
13931419
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>extract_texture_selector&lt;T&gt;(
13941420
copy_texture: <span class="kw-2">&amp;</span>wgt::TexelCopyTextureInfo&lt;T&gt;,
13951421
copy_size: <span class="kw-2">&amp;</span>Extent3d,
@@ -1463,7 +1489,7 @@
14631489
width_blocks: <span class="kw">_</span>,
14641490
height_blocks,
14651491

1466-
row_bytes_dense,
1492+
row_bytes_dense: <span class="kw">_</span>,
14671493
row_stride_bytes,
14681494

14691495
image_stride_rows: <span class="kw">_</span>,
@@ -1473,7 +1499,7 @@
14731499
image_bytes_dense: <span class="kw">_</span>,
14741500

14751501
bytes_in_copy,
1476-
} = layout.get_buffer_texture_copy_info(format, aspect, copy_size);
1502+
} = layout.get_buffer_texture_copy_info(format, aspect, copy_size)<span class="question-mark">?</span>;
14771503

14781504
<span class="kw">if </span>copy_width % block_width_texels != <span class="number">0 </span>{
14791505
<span class="kw">return </span><span class="prelude-val">Err</span>(TransferError::UnalignedCopyWidth);
@@ -1485,21 +1511,15 @@
14851511
<span class="kw">let </span>requires_multiple_rows = depth_or_array_layers &gt; <span class="number">1 </span>|| height_blocks &gt; <span class="number">1</span>;
14861512
<span class="kw">let </span>requires_multiple_images = depth_or_array_layers &gt; <span class="number">1</span>;
14871513

1488-
<span class="kw">if let </span><span class="prelude-val">Some</span>(raw_bytes_per_row) = layout.bytes_per_row {
1489-
<span class="kw">let </span>raw_bytes_per_row = raw_bytes_per_row <span class="kw">as </span>BufferAddress;
1490-
<span class="kw">if </span>raw_bytes_per_row &lt; row_bytes_dense {
1491-
<span class="kw">return </span><span class="prelude-val">Err</span>(TransferError::InvalidBytesPerRow);
1492-
}
1493-
} <span class="kw">else if </span>requires_multiple_rows {
1514+
<span class="comment">// `get_buffer_texture_copy_info()` already proceeded with defaults if these
1515+
// were not specified, and ensured that the values satisfy the minima if
1516+
// they were, but now we enforce the WebGPU requirement that they be
1517+
// specified any time they apply.
1518+
</span><span class="kw">if </span>layout.bytes_per_row.is_none() &amp;&amp; requires_multiple_rows {
14941519
<span class="kw">return </span><span class="prelude-val">Err</span>(TransferError::UnspecifiedBytesPerRow);
14951520
}
14961521

1497-
<span class="kw">if let </span><span class="prelude-val">Some</span>(raw_rows_per_image) = layout.rows_per_image {
1498-
<span class="kw">let </span>raw_rows_per_image = raw_rows_per_image <span class="kw">as </span>BufferAddress;
1499-
<span class="kw">if </span>raw_rows_per_image &lt; height_blocks {
1500-
<span class="kw">return </span><span class="prelude-val">Err</span>(TransferError::InvalidRowsPerImage);
1501-
}
1502-
} <span class="kw">else if </span>requires_multiple_images {
1522+
<span class="kw">if </span>layout.rows_per_image.is_none() &amp;&amp; requires_multiple_images {
15031523
<span class="kw">return </span><span class="prelude-val">Err</span>(TransferError::UnspecifiedRowsPerImage);
15041524
};
15051525

0 commit comments

Comments
 (0)