Skip to content

Commit 39e586e

Browse files
committed
Deploying to master from @ gfx-rs/wgpu@1509512 🚀
1 parent e2112ba commit 39e586e

File tree

265 files changed

+1208
-1180
lines changed

Some content is hidden

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

265 files changed

+1208
-1180
lines changed

doc/naga/proc/struct.ConstantEvaluator.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
expressions - to the arena. See the <a href="struct.ConstantEvaluator.html#method.try_eval_and_append" title="method naga::proc::ConstantEvaluator::try_eval_and_append"><code>try_eval_and_append</code></a> method for details.</p>
99
<p>A <code>ConstantEvaluator</code> also holds whatever information we need to carry out
1010
that evaluation: types, other constants, and so on.</p>
11-
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ConstantEvaluator%3C'a%3E" class="impl"><a class="src rightside" href="../../src/naga/proc/constant_evaluator.rs.html#589-2167">source</a><a href="#impl-ConstantEvaluator%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="struct" href="struct.ConstantEvaluator.html" title="struct naga::proc::ConstantEvaluator">ConstantEvaluator</a>&lt;'a&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.for_wgsl_module" class="method"><a class="src rightside" href="../../src/naga/proc/constant_evaluator.rs.html#594-608">source</a><h4 class="code-header">pub fn <a href="#method.for_wgsl_module" class="fn">for_wgsl_module</a>(
11+
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-ConstantEvaluator%3C'a%3E" class="impl"><a class="src rightside" href="../../src/naga/proc/constant_evaluator.rs.html#589-2181">source</a><a href="#impl-ConstantEvaluator%3C'a%3E" class="anchor">§</a><h3 class="code-header">impl&lt;'a&gt; <a class="struct" href="struct.ConstantEvaluator.html" title="struct naga::proc::ConstantEvaluator">ConstantEvaluator</a>&lt;'a&gt;</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.for_wgsl_module" class="method"><a class="src rightside" href="../../src/naga/proc/constant_evaluator.rs.html#594-608">source</a><h4 class="code-header">pub fn <a href="#method.for_wgsl_module" class="fn">for_wgsl_module</a>(
1212
module: &amp;'a mut <a class="struct" href="../struct.Module.html" title="struct naga::Module">Module</a>,
1313
global_expression_kind_tracker: &amp;'a mut <a class="struct" href="struct.ExpressionKindTracker.html" title="struct naga::proc::ExpressionKindTracker">ExpressionKindTracker</a>,
1414
in_override_ctx: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>

doc/src/naga/proc/constant_evaluator.rs.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2964,6 +2964,20 @@
29642964
<a href="#2963" id="2963">2963</a>
29652965
<a href="#2964" id="2964">2964</a>
29662966
<a href="#2965" id="2965">2965</a>
2967+
<a href="#2966" id="2966">2966</a>
2968+
<a href="#2967" id="2967">2967</a>
2969+
<a href="#2968" id="2968">2968</a>
2970+
<a href="#2969" id="2969">2969</a>
2971+
<a href="#2970" id="2970">2970</a>
2972+
<a href="#2971" id="2971">2971</a>
2973+
<a href="#2972" id="2972">2972</a>
2974+
<a href="#2973" id="2973">2973</a>
2975+
<a href="#2974" id="2974">2974</a>
2976+
<a href="#2975" id="2975">2975</a>
2977+
<a href="#2976" id="2976">2976</a>
2978+
<a href="#2977" id="2977">2977</a>
2979+
<a href="#2978" id="2978">2978</a>
2980+
<a href="#2979" id="2979">2979</a>
29672981
</pre></div><pre class="rust"><code><span class="kw">use </span>std::iter;
29682982

29692983
<span class="kw">use </span>arrayvec::ArrayVec;
@@ -4847,6 +4861,20 @@
48474861
BinaryOperator::Modulo =&gt; a % b,
48484862
<span class="kw">_ </span>=&gt; <span class="kw">return </span><span class="prelude-val">Err</span>(ConstantEvaluatorError::InvalidBinaryOpArgs),
48494863
}),
4864+
(Literal::AbstractInt(a), Literal::U32(b)) =&gt; {
4865+
Literal::AbstractInt(<span class="kw">match </span>op {
4866+
BinaryOperator::ShiftLeft =&gt; {
4867+
<span class="kw">if </span>(<span class="kw">if </span>a.is_negative() { !a } <span class="kw">else </span>{ a }).leading_zeros() &lt;= b {
4868+
<span class="kw">return </span><span class="prelude-val">Err</span>(ConstantEvaluatorError::Overflow(
4869+
<span class="string">"&lt;&lt;"</span>.to_string(),
4870+
));
4871+
}
4872+
a.checked_shl(b).unwrap_or(<span class="number">0</span>)
4873+
}
4874+
BinaryOperator::ShiftRight =&gt; a.checked_shr(b).unwrap_or(<span class="number">0</span>),
4875+
<span class="kw">_ </span>=&gt; <span class="kw">return </span><span class="prelude-val">Err</span>(ConstantEvaluatorError::InvalidBinaryOpArgs),
4876+
})
4877+
}
48504878
(Literal::AbstractInt(a), Literal::AbstractInt(b)) =&gt; {
48514879
Literal::AbstractInt(<span class="kw">match </span>op {
48524880
BinaryOperator::Add =&gt; a.checked_add(b).ok_or_else(|| {

doc/trait.impl/core/convert/trait.From.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/type.impl/wgpu_types/struct.BufferDescriptor.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/type.impl/wgpu_types/struct.CopyExternalImageDestInfo.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/type.impl/wgpu_types/struct.CreateBlasDescriptor.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/type.impl/wgpu_types/struct.CreateTlasDescriptor.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/type.impl/wgpu_types/struct.DeviceDescriptor.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/type.impl/wgpu_types/struct.QuerySetDescriptor.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/type.impl/wgpu_types/struct.RenderBundleDescriptor.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.

0 commit comments

Comments
 (0)