Skip to content

Commit bad2615

Browse files
committed
Deploying to master from @ 95408cd48b809044b26696abdf34e16a4d25ba80 🚀
1 parent 05ba483 commit bad2615

File tree

68 files changed

+265
-263
lines changed

Some content is hidden

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

68 files changed

+265
-263
lines changed

‎doc/src/wgpu/backend/direct.rs.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3569,7 +3569,7 @@
35693569
};
35703570
<span class="kw">let </span>parser = naga::front::spv::Parser::new(spv.iter().cloned(), <span class="kw-2">&amp;</span>options);
35713571
<span class="kw">let </span>module = parser.parse().unwrap();
3572-
wgc::pipeline::ShaderModuleSource::Naga(module)
3572+
wgc::pipeline::ShaderModuleSource::Naga(std::borrow::Cow::Owned(module))
35733573
}
35743574
<span class="attribute">#[cfg(feature = <span class="string">&quot;glsl&quot;</span>)]
35753575
</span>ShaderSource::Glsl {
@@ -3585,7 +3585,7 @@
35853585
<span class="kw">let </span><span class="kw-2">mut </span>parser = naga::front::glsl::Parser::default();
35863586
<span class="kw">let </span>module = parser.parse(<span class="kw-2">&amp;</span>options, shader).unwrap();
35873587

3588-
wgc::pipeline::ShaderModuleSource::Naga(module)
3588+
wgc::pipeline::ShaderModuleSource::Naga(std::borrow::Cow::Owned(module))
35893589
}
35903590
ShaderSource::Wgsl(<span class="kw-2">ref </span>code) =&gt; wgc::pipeline::ShaderModuleSource::Wgsl(Borrowed(code)),
35913591
<span class="attribute">#[cfg(feature = <span class="string">&quot;naga&quot;</span>)]

‎doc/src/wgpu/lib.rs.html‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3775,6 +3775,7 @@
37753775
<span id="3773">3773</span>
37763776
<span id="3774">3774</span>
37773777
<span id="3775">3775</span>
3778+
<span id="3776">3776</span>
37783779
</pre><pre class="rust"><code><span class="doccomment">//! A cross-platform graphics and compute library based on [WebGPU](https://gpuweb.github.io/gpuweb/).
37793780
//!
37803781
//! To start using the API, create an [`Instance`].
@@ -4612,7 +4613,8 @@
46124613
///
46134614
/// Any necessary shader translation (e.g. from WGSL to SPIR-V or vice versa)
46144615
/// will be done internally by wgpu.
4615-
</span><span class="attribute">#[non_exhaustive]
4616+
</span><span class="attribute">#[cfg_attr(feature = <span class="string">&quot;naga&quot;</span>, allow(clippy::large_enum_variant))]
4617+
#[non_exhaustive]
46164618
</span><span class="kw">pub enum </span>ShaderSource&lt;<span class="lifetime">&#39;a</span>&gt; {
46174619
<span class="doccomment">/// SPIR-V module represented as a slice of words.
46184620
///
@@ -4638,7 +4640,7 @@
46384640
<span class="doccomment">/// Naga module.
46394641
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;naga&quot;</span>)]
46404642
#[cfg_attr(docsrs, doc(cfg(feature = <span class="string">&quot;naga&quot;</span>)))]
4641-
</span>Naga(naga::Module),
4643+
</span>Naga(Cow&lt;<span class="lifetime">&#39;static</span>, naga::Module&gt;),
46424644
}
46434645
<span class="macro">static_assertions::assert_impl_all!</span>(ShaderSource: Send, Sync);
46444646

‎doc/src/wgpu_hal/lib.rs.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@
12921292
</span><span class="kw">pub use </span>vulkan::UpdateAfterBindTypes;
12931293

12941294
<span class="kw">use </span>std::{
1295-
borrow::Borrow,
1295+
borrow::{Borrow, Cow},
12961296
fmt,
12971297
num::{NonZeroU32, NonZeroU8},
12981298
ops::{Range, RangeInclusive},
@@ -2149,7 +2149,7 @@
21492149
<span class="doccomment">/// Naga shader module.
21502150
</span><span class="kw">pub struct </span>NagaShader {
21512151
<span class="doccomment">/// Shader module IR.
2152-
</span><span class="kw">pub </span>module: naga::Module,
2152+
</span><span class="kw">pub </span>module: Cow&lt;<span class="lifetime">&#39;static</span>, naga::Module&gt;,
21532153
<span class="doccomment">/// Analysis information of the module.
21542154
</span><span class="kw">pub </span>info: naga::valid::ModuleInfo,
21552155
}

‎doc/wgpu/enum.BindingResource.html‎

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

‎doc/wgpu/enum.Error.html‎

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

‎doc/wgpu/enum.LoadOp.html‎

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

‎doc/wgpu/enum.MapMode.html‎

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

‎doc/wgpu/enum.ShaderSource.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of a shader module."><meta name="keywords" content="rust, rustlang, rust-lang, ShaderSource"><title>ShaderSource in wgpu - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../normalize.css"><link rel="stylesheet" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../ayu.css" disabled><link rel="stylesheet" href="../dark.css" disabled><link rel="stylesheet" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../main.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../wgpu/index.html"><div class="logo-container"><img src="https://raw.githubusercontent.com/gfx-rs/wgpu/master/logo.png" alt="logo"></div></a><h2 class="location"></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../wgpu/index.html"><div class="logo-container">
22
<img src="https://raw.githubusercontent.com/gfx-rs/wgpu/master/logo.png" alt="logo"></div></a><h2 class="location"><a href="#">ShaderSource</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><ul><li><a href="#variant.Wgsl">Wgsl</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><a href="#impl-RefUnwindSafe-for-ShaderSource%3C%27a%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ShaderSource%3C%27a%3E">Send</a></li><li><a href="#impl-Sync-for-ShaderSource%3C%27a%3E">Sync</a></li><li><a href="#impl-Unpin-for-ShaderSource%3C%27a%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ShaderSource%3C%27a%3E">UnwindSafe</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><ul><li><a href="#impl-Any-for-ShaderSource%3C%27a%3E">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-ShaderSource%3C%27a%3E">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-ShaderSource%3C%27a%3E">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-Downcast%3CT%3E-for-ShaderSource%3C%27a%3E">Downcast&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-ShaderSource%3C%27a%3E">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-ShaderSource%3C%27a%3E">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-ShaderSource%3C%27a%3E">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-ShaderSource%3C%27a%3E">TryInto&lt;U&gt;</a></li><li><a href="#impl-Upcast%3CT%3E-for-ShaderSource%3C%27a%3E">Upcast&lt;T&gt;</a></li></ul></div></section><h2 class="location"><a href="index.html">In wgpu</a></h2></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../wgpu/index.html">
3-
<img src="https://raw.githubusercontent.com/gfx-rs/wgpu/master/logo.png" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Enum <a href="index.html">wgpu</a>::<wbr><a class="enum" href="#">ShaderSource</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/wgpu/lib.rs.html#839-865">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust enum"><code>#[non_exhaustive]
3+
<img src="https://raw.githubusercontent.com/gfx-rs/wgpu/master/logo.png" alt="logo"></a><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><button type="button">?</button></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></div></form></nav></div><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn"><span class="in-band">Enum <a href="index.html">wgpu</a>::<wbr><a class="enum" href="#">ShaderSource</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/wgpu/lib.rs.html#840-866">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="docblock item-decl"><pre class="rust enum"><code>#[non_exhaustive]
44
pub enum ShaderSource&lt;'a&gt; {
55
Wgsl(<a class="enum" href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html" title="enum alloc::borrow::Cow">Cow</a>&lt;'a, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;),
66
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Source of a shader module.</p>

‎doc/wgpu/enum.SurfaceError.html‎

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)