diff --git a/crates/metal2vulkan-runtime/src/submit_failure.rs b/crates/metal2vulkan-runtime/src/submit_failure.rs index f34f4a6a3..176c7edb6 100644 --- a/crates/metal2vulkan-runtime/src/submit_failure.rs +++ b/crates/metal2vulkan-runtime/src/submit_failure.rs @@ -346,7 +346,9 @@ pub(crate) fn warn(device: &Device, id_name: &str, text: String) { }, id_name: id_name.to_owned(), id: 0, - text, + // The text ends in its id name, as a degrade notice's does, so a consumer that writes the + // text alone still lets a reader find the line by id. + text: format!("{text} [{id_name}]"), degradation: None, }; match device.shared().instance.sink() { diff --git a/crates/metal2vulkan-runtime/src/tests/submit_failure_device.rs b/crates/metal2vulkan-runtime/src/tests/submit_failure_device.rs index 2b4da9679..5117f717e 100644 --- a/crates/metal2vulkan-runtime/src/tests/submit_failure_device.rs +++ b/crates/metal2vulkan-runtime/src/tests/submit_failure_device.rs @@ -106,4 +106,5 @@ fn a_failed_submission_logs_one_line_naming_what_it_held() { assert!(line.contains(expected), "{expected:?} missing from {line}"); } assert!(!line.contains("submit-failure-next"), "{line}"); + assert!(line.ends_with(" [metal2vulkan-submit-failed]"), "{line}"); } diff --git a/docs/API.md b/docs/API.md index 8737cfb16..b87387c61 100644 --- a/docs/API.md +++ b/docs/API.md @@ -2055,8 +2055,9 @@ detached now. It names at most 8 infos, 8 waits and 8 signals of each, 32 `VkCom command buffers and 32 resources, and counts the rest; state another thread holds at that moment reads as busy, and a submission that succeeds does none of it. A command buffer whose recording fails with a Vulkan result or the runtime's own error (`CommandBufferError::Internal` for both) logs -that error (id name `metal2vulkan-recording-failed`, `Warning` severity). That text is for people, -not a contract. +that error (id name `metal2vulkan-recording-failed`, `Warning` severity). Each of the two lines ends +in its id name in brackets, as a degrade notice does, so a consumer that writes the text alone still +leaves it findable by id. That text is for people, not a contract. Each entry below gives the code, its category, the `Degradation` kind (or the `PrecisionNote`) and what triggers it; a runtime kind's cost follows. The kind's rustdoc states the trigger, cost and