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:
teoxoy 2024-06-26 12:07:52 +02:00 committed by Teodor Tanasoaia
parent 400372ff57
commit ab1fa7d96e
3 changed files with 4 additions and 7 deletions

View File

@ -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 {

View File

@ -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),
})?,
),

View File

@ -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);
}
_ => {}
}
}