Skip to content

Commit 34d2f14

Browse files
committed
Deploying to master from @ gfx-rs/wgpu@029bdb1 🚀
1 parent 55dbdb3 commit 34d2f14

File tree

1,494 files changed

+7279
-7044
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,494 files changed

+7279
-7044
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.85.0/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.85.0/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.85.0/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.85.0/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.85.0/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.85.0/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-468">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-221">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-468">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-221">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.85.0/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#223-467">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.85.0/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#223-467">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.85.0/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: 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-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/render_pass.rs.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,9 @@
583583
<a href="#582" id="582">582</a>
584584
<a href="#583" id="583">583</a>
585585
<a href="#584" id="584">584</a>
586-
<a href="#585" id="585">585</a></pre></div><pre class="rust"><code><span class="kw">use </span>core::ops::Range;
586+
<a href="#585" id="585">585</a>
587+
<a href="#586" id="586">586</a>
588+
<a href="#587" id="587">587</a></pre></div><pre class="rust"><code><span class="kw">use </span>core::ops::Range;
587589

588590
<span class="kw">use crate</span>::<span class="kw-2">*</span>;
589591
<span class="kw">pub use </span>wgt::{LoadOp, Operations, StoreOp};
@@ -693,6 +695,8 @@
693695
///
694696
/// Subsequent calls to [`draw`] and [`draw_indexed`] on this
695697
/// [`RenderPass`] will use `buffer` as one of the source vertex buffers.
698+
/// The format of the data in the buffer is specified by the [`VertexBufferLayout`] in the
699+
/// pipeline's [`VertexState`].
696700
///
697701
/// The `slot` refers to the index of the matching descriptor in
698702
/// [`VertexState::buffers`].

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

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,41 @@
153153
<a href="#152" id="152">152</a>
154154
<a href="#153" id="153">153</a>
155155
<a href="#154" id="154">154</a>
156-
<a href="#155" id="155">155</a></pre></div><pre class="rust"><code><span class="kw">use </span>core::num::NonZeroU32;
156+
<a href="#155" id="155">155</a>
157+
<a href="#156" id="156">156</a>
158+
<a href="#157" id="157">157</a>
159+
<a href="#158" id="158">158</a>
160+
<a href="#159" id="159">159</a>
161+
<a href="#160" id="160">160</a>
162+
<a href="#161" id="161">161</a>
163+
<a href="#162" id="162">162</a>
164+
<a href="#163" id="163">163</a>
165+
<a href="#164" id="164">164</a>
166+
<a href="#165" id="165">165</a>
167+
<a href="#166" id="166">166</a>
168+
<a href="#167" id="167">167</a>
169+
<a href="#168" id="168">168</a>
170+
<a href="#169" id="169">169</a>
171+
<a href="#170" id="170">170</a>
172+
<a href="#171" id="171">171</a>
173+
<a href="#172" id="172">172</a>
174+
<a href="#173" id="173">173</a>
175+
<a href="#174" id="174">174</a>
176+
<a href="#175" id="175">175</a>
177+
<a href="#176" id="176">176</a>
178+
<a href="#177" id="177">177</a>
179+
<a href="#178" id="178">178</a>
180+
<a href="#179" id="179">179</a>
181+
<a href="#180" id="180">180</a>
182+
<a href="#181" id="181">181</a>
183+
<a href="#182" id="182">182</a>
184+
<a href="#183" id="183">183</a>
185+
<a href="#184" id="184">184</a>
186+
<a href="#185" id="185">185</a>
187+
<a href="#186" id="186">186</a>
188+
<a href="#187" id="187">187</a>
189+
<a href="#188" id="188">188</a>
190+
<a href="#189" id="189">189</a></pre></div><pre class="rust"><code><span class="kw">use </span>core::num::NonZeroU32;
157191

158192
<span class="kw">use crate</span>::<span class="kw-2">*</span>;
159193

@@ -185,12 +219,42 @@
185219
}
186220
}
187221

188-
<span class="doccomment">/// Describes how the vertex buffer is interpreted.
222+
<span class="doccomment">/// Specifies an interpretation of the bytes of a vertex buffer as vertex attributes.
189223
///
190-
/// For use in [`VertexState`].
224+
/// Use this in a [`RenderPipelineDescriptor`] to describe the format of the vertex buffers that
225+
/// are passed to [`RenderPass::set_vertex_buffer()`].
191226
///
192227
/// Corresponds to [WebGPU `GPUVertexBufferLayout`](
193228
/// https://gpuweb.github.io/gpuweb/#dictdef-gpuvertexbufferlayout).
229+
///
230+
/// # Example
231+
///
232+
/// The following example defines a `struct` with three fields,
233+
/// and a [`VertexBufferLayout`] that contains [`VertexAttribute`]s for each field,
234+
/// using the [`vertex_attr_array!`] macro to compute attribute offsets:
235+
///
236+
/// ```
237+
/// #[repr(C, packed)]
238+
/// struct Vertex {
239+
/// foo: [f32; 2],
240+
/// bar: f32,
241+
/// baz: [u16; 4],
242+
/// }
243+
///
244+
/// impl Vertex {
245+
/// /// Layout to use with a buffer whose contents are a `[Vertex]`.
246+
/// pub const LAYOUT: wgpu::VertexBufferLayout&lt;'static&gt; = wgpu::VertexBufferLayout {
247+
/// array_stride: size_of::&lt;Self&gt;() as wgpu::BufferAddress,
248+
/// step_mode: wgpu::VertexStepMode::Vertex,
249+
/// attributes: &amp;wgpu::vertex_attr_array![
250+
/// 0 =&gt; Float32x2,
251+
/// 1 =&gt; Float32,
252+
/// 2 =&gt; Uint16x4,
253+
/// ],
254+
/// };
255+
/// }
256+
///
257+
/// # assert_eq!(Vertex::LAYOUT.attributes[2].offset, Vertex::LAYOUT.array_stride - 2 * 4);
194258
</span><span class="attr">#[derive(Clone, Debug, Hash, Eq, PartialEq)]
195259
</span><span class="kw">pub struct </span>VertexBufferLayout&lt;<span class="lifetime">'a</span>&gt; {
196260
<span class="doccomment">/// The stride, in bytes, between elements of this buffer (between vertices).
@@ -226,7 +290,11 @@
226290
///
227291
/// This implements `Default`, and for most users can be set to `Default::default()`
228292
</span><span class="kw">pub </span>compilation_options: PipelineCompilationOptions&lt;<span class="lifetime">'a</span>&gt;,
229-
<span class="doccomment">/// The format of any vertex buffers used with this pipeline.
293+
<span class="doccomment">/// The format of any vertex buffers used with this pipeline via
294+
/// [`RenderPass::set_vertex_buffer()`].
295+
///
296+
/// The attribute locations and types specified in this layout must match the
297+
/// locations and types of the inputs to the `entry_point` function.`
230298
</span><span class="kw">pub </span>buffers: <span class="kw-2">&amp;</span><span class="lifetime">'a </span>[VertexBufferLayout&lt;<span class="lifetime">'a</span>&gt;],
231299
}
232300
<span class="attr">#[cfg(send_sync)]

0 commit comments

Comments
 (0)