mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
remove compute pipeline id from set compute pipeline scope
and make sure that we use `ResourceErrorIdent` in all relevant inner errors
This commit is contained in:
parent
400372ff57
commit
ab1fa7d96e
@ -615,7 +615,7 @@ impl Global {
|
||||
.map_pass_err(scope)?;
|
||||
}
|
||||
ArcComputeCommand::SetPipeline(pipeline) => {
|
||||
let scope = PassErrorScope::SetPipelineCompute(pipeline.as_info().id());
|
||||
let scope = PassErrorScope::SetPipelineCompute;
|
||||
set_pipeline(&mut state, cmd_buf, pipeline).map_pass_err(scope)?;
|
||||
}
|
||||
ArcComputeCommand::SetPushConstant {
|
||||
@ -1083,7 +1083,7 @@ impl Global {
|
||||
) -> Result<(), ComputePassError> {
|
||||
let redundant = pass.current_pipeline.set_and_check_redundant(pipeline_id);
|
||||
|
||||
let scope = PassErrorScope::SetPipelineCompute(pipeline_id);
|
||||
let scope = PassErrorScope::SetPipelineCompute;
|
||||
|
||||
let base = pass.base_mut(scope)?;
|
||||
if redundant {
|
||||
|
@ -107,7 +107,7 @@ impl ComputeCommand {
|
||||
pipelines_guard
|
||||
.get_owned(pipeline_id)
|
||||
.map_err(|_| ComputePassError {
|
||||
scope: PassErrorScope::SetPipelineCompute(pipeline_id),
|
||||
scope: PassErrorScope::SetPipelineCompute,
|
||||
inner: ComputePassErrorInner::InvalidPipeline(pipeline_id),
|
||||
})?,
|
||||
),
|
||||
|
@ -871,7 +871,7 @@ pub enum PassErrorScope {
|
||||
#[error("In a set_pipeline command")]
|
||||
SetPipelineRender(id::RenderPipelineId),
|
||||
#[error("In a set_pipeline command")]
|
||||
SetPipelineCompute(id::ComputePipelineId),
|
||||
SetPipelineCompute,
|
||||
#[error("In a set_push_constant command")]
|
||||
SetPushConstant,
|
||||
#[error("In a set_vertex_buffer command")]
|
||||
@ -928,9 +928,6 @@ impl PrettyError for PassErrorScope {
|
||||
Self::SetPipelineRender(id) => {
|
||||
fmt.render_pipeline_label(&id);
|
||||
}
|
||||
Self::SetPipelineCompute(id) => {
|
||||
fmt.compute_pipeline_label(&id);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user