Skip to content

Commit 83fa52c

Browse files
committed
Deploying to master from @ b13bb468cb20b54d348b35fc3d11d7ee50786626 🚀
1 parent 5b71522 commit 83fa52c

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

‎doc/src/wgpu_hal/gles/adapter.rs.html

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,14 @@
883883
<span id="883">883</span>
884884
<span id="884">884</span>
885885
<span id="885">885</span>
886+
<span id="886">886</span>
887+
<span id="887">887</span>
888+
<span id="888">888</span>
889+
<span id="889">889</span>
890+
<span id="890">890</span>
891+
<span id="891">891</span>
892+
<span id="892">892</span>
893+
<span id="893">893</span>
886894
</pre><pre class="rust"><code><span class="kw">use </span>glow::HasContext;
887895
<span class="kw">use </span>std::sync::Arc;
888896
<span class="kw">use </span>wgt::AstcChannel;
@@ -1670,21 +1678,29 @@
16701678
<span class="kw-2">&amp;</span><span class="self">self</span>,
16711679
surface: <span class="kw-2">&amp;</span><span class="kw">super</span>::Surface,
16721680
) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw">crate</span>::SurfaceCapabilities&gt; {
1681+
<span class="kw">let </span><span class="kw-2">mut </span>formats = <span class="kw">if </span>surface.supports_srgb() {
1682+
<span class="macro">vec!</span>[
1683+
wgt::TextureFormat::Rgba8UnormSrgb,
1684+
<span class="attribute">#[cfg(not(target_arch = <span class="string">&quot;wasm32&quot;</span>))]
1685+
</span>wgt::TextureFormat::Bgra8UnormSrgb,
1686+
]
1687+
} <span class="kw">else </span>{
1688+
<span class="macro">vec!</span>[
1689+
wgt::TextureFormat::Rgba8Unorm,
1690+
<span class="attribute">#[cfg(not(target_arch = <span class="string">&quot;wasm32&quot;</span>))]
1691+
</span>wgt::TextureFormat::Bgra8Unorm,
1692+
]
1693+
};
1694+
<span class="kw">if </span><span class="self">self
1695+
</span>.shared
1696+
.private_caps
1697+
.contains(<span class="kw">super</span>::PrivateCapabilities::COLOR_BUFFER_HALF_FLOAT)
1698+
{
1699+
formats.push(wgt::TextureFormat::Rgba16Float)
1700+
}
16731701
<span class="kw">if </span>surface.presentable {
16741702
<span class="prelude-val">Some</span>(<span class="kw">crate</span>::SurfaceCapabilities {
1675-
formats: <span class="kw">if </span>surface.supports_srgb() {
1676-
<span class="macro">vec!</span>[
1677-
wgt::TextureFormat::Rgba8UnormSrgb,
1678-
<span class="attribute">#[cfg(not(target_arch = <span class="string">&quot;wasm32&quot;</span>))]
1679-
</span>wgt::TextureFormat::Bgra8UnormSrgb,
1680-
]
1681-
} <span class="kw">else </span>{
1682-
<span class="macro">vec!</span>[
1683-
wgt::TextureFormat::Rgba8Unorm,
1684-
<span class="attribute">#[cfg(not(target_arch = <span class="string">&quot;wasm32&quot;</span>))]
1685-
</span>wgt::TextureFormat::Bgra8Unorm,
1686-
]
1687-
},
1703+
formats,
16881704
present_modes: <span class="macro">vec!</span>[wgt::PresentMode::Fifo], <span class="comment">//TODO
16891705
</span>composite_alpha_modes: <span class="macro">vec!</span>[wgt::CompositeAlphaMode::Opaque], <span class="comment">//TODO
16901706
</span>swap_chain_sizes: <span class="number">2</span>..=<span class="number">2</span>,

0 commit comments

Comments
 (0)