Skip to content

Commit a3b605d

Browse files
committed
Deploying to master from @ gfx-rs/wgpu@ed694ed 🚀
1 parent 6a08160 commit a3b605d

File tree

549 files changed

+3791
-3712
lines changed

Some content is hidden

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

549 files changed

+3791
-3712
lines changed

doc/src/wgpu_core/instance.rs.html

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -980,11 +980,36 @@
980980
<a href="#979" id="979">979</a>
981981
<a href="#980" id="980">980</a>
982982
<a href="#981" id="981">981</a>
983+
<a href="#982" id="982">982</a>
984+
<a href="#983" id="983">983</a>
985+
<a href="#984" id="984">984</a>
986+
<a href="#985" id="985">985</a>
987+
<a href="#986" id="986">986</a>
988+
<a href="#987" id="987">987</a>
989+
<a href="#988" id="988">988</a>
990+
<a href="#989" id="989">989</a>
991+
<a href="#990" id="990">990</a>
992+
<a href="#991" id="991">991</a>
993+
<a href="#992" id="992">992</a>
994+
<a href="#993" id="993">993</a>
995+
<a href="#994" id="994">994</a>
996+
<a href="#995" id="995">995</a>
997+
<a href="#996" id="996">996</a>
998+
<a href="#997" id="997">997</a>
999+
<a href="#998" id="998">998</a>
1000+
<a href="#999" id="999">999</a>
1001+
<a href="#1000" id="1000">1000</a>
1002+
<a href="#1001" id="1001">1001</a>
1003+
<a href="#1002" id="1002">1002</a>
1004+
<a href="#1003" id="1003">1003</a>
1005+
<a href="#1004" id="1004">1004</a>
1006+
<a href="#1005" id="1005">1005</a>
1007+
<a href="#1006" id="1006">1006</a>
9831008
</pre></div><pre class="rust"><code><span class="kw">use </span>std::sync::Arc;
9841009
<span class="kw">use </span>std::{borrow::Cow, collections::HashMap};
9851010

9861011
<span class="kw">use crate</span>::{
987-
api_log,
1012+
api_log, api_log_debug,
9881013
device::{queue::Queue, resource::Device, DeviceDescriptor, DeviceError},
9891014
global::Global,
9901015
hal_api::HalApi,
@@ -1287,7 +1312,7 @@
12871312
<span class="kw">let </span>hal_adapters = <span class="kw">unsafe </span>{ instance.enumerate_adapters(<span class="prelude-val">None</span>) };
12881313
<span class="kw">for </span>raw <span class="kw">in </span>hal_adapters {
12891314
<span class="kw">let </span>adapter = Adapter::new(raw);
1290-
<span class="macro">log::info!</span>(<span class="string">"Adapter {:?}"</span>, adapter.raw.info);
1315+
<span class="macro">api_log_debug!</span>(<span class="string">"Adapter {:?}"</span>, adapter.raw.info);
12911316
adapters.push(adapter);
12921317
}
12931318
}
@@ -1318,8 +1343,19 @@
13181343
backend_adapters.retain(|exposed| exposed.info.device_type == wgt::DeviceType::Cpu);
13191344
}
13201345
<span class="kw">if let </span><span class="prelude-val">Some</span>(surface) = desc.compatible_surface {
1321-
backend_adapters
1322-
.retain(|exposed| surface.get_capabilities_with_raw(exposed).is_ok());
1346+
backend_adapters.retain(|exposed| {
1347+
<span class="kw">let </span>capabilities = surface.get_capabilities_with_raw(exposed);
1348+
<span class="kw">if let </span><span class="prelude-val">Err</span>(err) = capabilities {
1349+
<span class="macro">log::debug!</span>(
1350+
<span class="string">"Adapter {:?} not compatible with surface: {}"</span>,
1351+
exposed.info,
1352+
err
1353+
);
1354+
<span class="bool-val">false
1355+
</span>} <span class="kw">else </span>{
1356+
<span class="bool-val">true
1357+
</span>}
1358+
});
13231359
}
13241360
adapters.extend(backend_adapters);
13251361
}
@@ -1360,8 +1396,22 @@
13601396
}
13611397
}
13621398

1399+
<span class="comment">// `request_adapter` can be a bit of a black box.
1400+
// Shine some light on its decision in debug log.
1401+
</span><span class="kw">if </span>adapters.is_empty() {
1402+
<span class="macro">log::debug!</span>(<span class="string">"Request adapter didn't find compatible adapters."</span>);
1403+
} <span class="kw">else </span>{
1404+
<span class="macro">log::debug!</span>(
1405+
<span class="string">"Found {} compatible adapters. Sorted by preference:"</span>,
1406+
adapters.len()
1407+
);
1408+
<span class="kw">for </span>adapter <span class="kw">in </span><span class="kw-2">&amp;</span>adapters {
1409+
<span class="macro">log::debug!</span>(<span class="string">"* {:?}"</span>, adapter.info);
1410+
}
1411+
}
1412+
13631413
<span class="kw">if let </span><span class="prelude-val">Some</span>(adapter) = adapters.into_iter().next() {
1364-
<span class="macro">log::info!</span>(<span class="string">"Adapter {:?}"</span>, adapter.info);
1414+
<span class="macro">api_log_debug!</span>(<span class="string">"Request adapter result {:?}"</span>, adapter.info);
13651415
<span class="kw">let </span>adapter = Adapter::new(adapter);
13661416
<span class="prelude-val">Ok</span>(adapter)
13671417
} <span class="kw">else </span>{

doc/src/wgpu_core/lib.rs.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,17 @@
213213
<a href="#212" id="212">212</a>
214214
<a href="#213" id="213">213</a>
215215
<a href="#214" id="214">214</a>
216+
<a href="#215" id="215">215</a>
217+
<a href="#216" id="216">216</a>
218+
<a href="#217" id="217">217</a>
219+
<a href="#218" id="218">218</a>
220+
<a href="#219" id="219">219</a>
221+
<a href="#220" id="220">220</a>
222+
<a href="#221" id="221">221</a>
223+
<a href="#222" id="222">222</a>
224+
<a href="#223" id="223">223</a>
225+
<a href="#224" id="224">224</a>
226+
<a href="#225" id="225">225</a>
216227
</pre></div><pre class="rust"><code><span class="doccomment">//! This library safely implements WebGPU on native platforms.
217228
//! It is designed for integration into browsers, as well as wrapping
218229
//! into other language-specific user-friendly libraries.
@@ -377,7 +388,18 @@
377388
</span><span class="macro">macro_rules! </span>api_log {
378389
($(<span class="macro-nonterminal">$arg</span>:tt)+) =&gt; (<span class="macro">log::trace!</span>($(<span class="macro-nonterminal">$arg</span>)+))
379390
}
391+
392+
<span class="attr">#[cfg(feature = <span class="string">"api_log_info"</span>)]
393+
</span><span class="macro">macro_rules! </span>api_log_debug {
394+
($(<span class="macro-nonterminal">$arg</span>:tt)+) =&gt; (<span class="macro">log::info!</span>($(<span class="macro-nonterminal">$arg</span>)+))
395+
}
396+
<span class="attr">#[cfg(not(feature = <span class="string">"api_log_info"</span>))]
397+
</span><span class="macro">macro_rules! </span>api_log_debug {
398+
($(<span class="macro-nonterminal">$arg</span>:tt)+) =&gt; (<span class="macro">log::debug!</span>($(<span class="macro-nonterminal">$arg</span>)+))
399+
}
400+
380401
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>api_log;
402+
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">use </span>api_log_debug;
381403

382404
<span class="attr">#[cfg(feature = <span class="string">"resource_log_info"</span>)]
383405
</span><span class="macro">macro_rules! </span>resource_log {

doc/src/wgpu_hal/vulkan/instance.rs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,11 +1463,11 @@
14631463
callback_data: debug_utils_create_info.callback_data,
14641464
})
14651465
} <span class="kw">else </span>{
1466-
<span class="macro">log::info!</span>(<span class="string">"Debug utils not enabled: extension not listed"</span>);
1466+
<span class="macro">log::debug!</span>(<span class="string">"Debug utils not enabled: extension not listed"</span>);
14671467
<span class="prelude-val">None
14681468
</span>}
14691469
} <span class="kw">else </span>{
1470-
<span class="macro">log::info!</span>(
1470+
<span class="macro">log::debug!</span>(
14711471
<span class="string">"Debug utils not enabled: \
14721472
debug_utils_user_data not passed to Instance::from_raw"
14731473
</span>);

doc/src/wgpu_types/lib.rs.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7797,6 +7797,7 @@
77977797
<a href="#7796" id="7796">7796</a>
77987798
<a href="#7797" id="7797">7797</a>
77997799
<a href="#7798" id="7798">7798</a>
7800+
<a href="#7799" id="7799">7799</a>
78007801
</pre></div><pre class="rust"><code><span class="doccomment">//! This library describes the API surface of WebGPU that is agnostic of the backend.
78017802
//! This API is used for targeting both Web and Native.
78027803

@@ -7979,6 +7980,7 @@
79797980
</span><span class="kw">pub </span>force_fallback_adapter: bool,
79807981
<span class="doccomment">/// Surface that is required to be presentable with the requested adapter. This does not
79817982
/// create the surface, only guarantees that the adapter can present to said surface.
7983+
/// For WebGL, this is strictly required, as an adapter can not be created without a surface.
79827984
</span><span class="kw">pub </span>compatible_surface: <span class="prelude-ty">Option</span>&lt;S&gt;,
79837985
}
79847986

0 commit comments

Comments
 (0)