mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
Update naga to bbfa9a0
, tweak DX12 debug output
This commit is contained in:
parent
a0bcd86207
commit
8dc4942431
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -932,7 +932,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "naga"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/gfx-rs/naga?rev=cc91c77#cc91c77f7ac7e22b615bf2e188f659ce623c1fe9"
|
||||
source = "git+https://github.com/gfx-rs/naga?rev=bbfa9a0#bbfa9a0f9e0599fe09ad9428bf359e6dea2664c6"
|
||||
dependencies = [
|
||||
"bit-set",
|
||||
"bitflags",
|
||||
|
@ -36,7 +36,7 @@ thiserror = "1"
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "cc91c77"
|
||||
rev = "bbfa9a0"
|
||||
features = ["wgsl-in"]
|
||||
|
||||
[dependencies.wgt]
|
||||
|
@ -65,11 +65,11 @@ core-graphics-types = "0.1"
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "cc91c77"
|
||||
rev = "bbfa9a0"
|
||||
|
||||
[dev-dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "cc91c77"
|
||||
rev = "bbfa9a0"
|
||||
features = ["wgsl-in"]
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -533,7 +533,7 @@ impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
|
||||
flags |= native::ClearFlags::STENCIL;
|
||||
}
|
||||
|
||||
if !ds_view.is_null() {
|
||||
if !ds_view.is_null() && !flags.is_empty() {
|
||||
list.clear_depth_stencil_view(
|
||||
*ds_view,
|
||||
flags,
|
||||
|
@ -37,22 +37,31 @@ unsafe extern "system" fn output_debug_string_handler(
|
||||
_ => return excpt::EXCEPTION_CONTINUE_SEARCH,
|
||||
};
|
||||
|
||||
let (message, level) = match message.strip_prefix("D3D12 ") {
|
||||
Some(msg) => {
|
||||
match MESSAGE_PREFIXES
|
||||
.iter()
|
||||
.find(|&&(prefix, _)| msg.starts_with(prefix))
|
||||
{
|
||||
Some(&(prefix, level)) => (&msg[prefix.len() + 2..], level),
|
||||
None => (msg, log::Level::Debug),
|
||||
}
|
||||
}
|
||||
let message = match message.strip_prefix("D3D12 ") {
|
||||
Some(msg) => msg
|
||||
.trim_end_matches("\n\0")
|
||||
.trim_end_matches("[ STATE_CREATION WARNING #0: UNKNOWN]"),
|
||||
None => return excpt::EXCEPTION_CONTINUE_SEARCH,
|
||||
};
|
||||
|
||||
log::log!(level, "{}", message.trim_end_matches("\n\0"));
|
||||
let (message, level) = match MESSAGE_PREFIXES
|
||||
.iter()
|
||||
.find(|&&(prefix, _)| message.starts_with(prefix))
|
||||
{
|
||||
Some(&(prefix, level)) => (&message[prefix.len() + 2..], level),
|
||||
None => (message, log::Level::Debug),
|
||||
};
|
||||
|
||||
if level == log::Level::Warn && message.contains("#82") {
|
||||
// This is are useless spammy warnings (#820, #821):
|
||||
// "The application did not pass any clear value to resource creation"
|
||||
return excpt::EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
log::log!(level, "{}", message);
|
||||
|
||||
if cfg!(debug_assertions) && level == log::Level::Error {
|
||||
// Panicking behind FFI is UB, so we just exit.
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
|
@ -75,13 +75,13 @@ env_logger = "0.8"
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "cc91c77"
|
||||
rev = "bbfa9a0"
|
||||
optional = true
|
||||
|
||||
# used to test all the example shaders
|
||||
[dev-dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "cc91c77"
|
||||
rev = "bbfa9a0"
|
||||
features = ["wgsl-in"]
|
||||
|
||||
[[example]]
|
||||
|
Loading…
Reference in New Issue
Block a user