mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[rs] Format PassErrorScope pipelines
This commit is contained in:
@@ -26,20 +26,20 @@ webgl = ["wgc"]
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ae3e5057aff64a8e6f13e75be661c0f8a98abcd5"
|
||||
rev = "c788b1cef630fa5b5f0a86132fe84551d4149fb6"
|
||||
features = ["raw-window-handle"]
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ae3e5057aff64a8e6f13e75be661c0f8a98abcd5"
|
||||
rev = "c788b1cef630fa5b5f0a86132fe84551d4149fb6"
|
||||
features = ["raw-window-handle"]
|
||||
optional = true
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ae3e5057aff64a8e6f13e75be661c0f8a98abcd5"
|
||||
rev = "c788b1cef630fa5b5f0a86132fe84551d4149fb6"
|
||||
|
||||
[dependencies]
|
||||
arrayvec = "0.5"
|
||||
|
||||
@@ -317,6 +317,22 @@ impl PrettyError for wgc::command::PassErrorScope {
|
||||
let name = wgc::gfx_select!(id => global.buffer_label(id));
|
||||
format_label_line("buffer", &name)
|
||||
}
|
||||
Self::Draw { pipeline, .. } => {
|
||||
if let Some(id) = pipeline {
|
||||
let name = wgc::gfx_select!(id => global.render_pipeline_label(id));
|
||||
format_label_line("render pipeline", &name)
|
||||
} else {
|
||||
String::new()
|
||||
}
|
||||
}
|
||||
Self::Dispatch { pipeline, .. } => {
|
||||
if let Some(id) = pipeline {
|
||||
let name = wgc::gfx_select!(id => global.compute_pipeline_label(id));
|
||||
format_label_line("compute pipeline", &name)
|
||||
} else {
|
||||
String::new()
|
||||
}
|
||||
}
|
||||
_ => String::new(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user