mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +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)?;
|
.map_pass_err(scope)?;
|
||||||
}
|
}
|
||||||
ArcComputeCommand::SetPipeline(pipeline) => {
|
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)?;
|
set_pipeline(&mut state, cmd_buf, pipeline).map_pass_err(scope)?;
|
||||||
}
|
}
|
||||||
ArcComputeCommand::SetPushConstant {
|
ArcComputeCommand::SetPushConstant {
|
||||||
@ -1083,7 +1083,7 @@ impl Global {
|
|||||||
) -> Result<(), ComputePassError> {
|
) -> Result<(), ComputePassError> {
|
||||||
let redundant = pass.current_pipeline.set_and_check_redundant(pipeline_id);
|
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)?;
|
let base = pass.base_mut(scope)?;
|
||||||
if redundant {
|
if redundant {
|
||||||
|
@ -107,7 +107,7 @@ impl ComputeCommand {
|
|||||||
pipelines_guard
|
pipelines_guard
|
||||||
.get_owned(pipeline_id)
|
.get_owned(pipeline_id)
|
||||||
.map_err(|_| ComputePassError {
|
.map_err(|_| ComputePassError {
|
||||||
scope: PassErrorScope::SetPipelineCompute(pipeline_id),
|
scope: PassErrorScope::SetPipelineCompute,
|
||||||
inner: ComputePassErrorInner::InvalidPipeline(pipeline_id),
|
inner: ComputePassErrorInner::InvalidPipeline(pipeline_id),
|
||||||
})?,
|
})?,
|
||||||
),
|
),
|
||||||
|
@ -871,7 +871,7 @@ pub enum PassErrorScope {
|
|||||||
#[error("In a set_pipeline command")]
|
#[error("In a set_pipeline command")]
|
||||||
SetPipelineRender(id::RenderPipelineId),
|
SetPipelineRender(id::RenderPipelineId),
|
||||||
#[error("In a set_pipeline command")]
|
#[error("In a set_pipeline command")]
|
||||||
SetPipelineCompute(id::ComputePipelineId),
|
SetPipelineCompute,
|
||||||
#[error("In a set_push_constant command")]
|
#[error("In a set_push_constant command")]
|
||||||
SetPushConstant,
|
SetPushConstant,
|
||||||
#[error("In a set_vertex_buffer command")]
|
#[error("In a set_vertex_buffer command")]
|
||||||
@ -928,9 +928,6 @@ impl PrettyError for PassErrorScope {
|
|||||||
Self::SetPipelineRender(id) => {
|
Self::SetPipelineRender(id) => {
|
||||||
fmt.render_pipeline_label(&id);
|
fmt.render_pipeline_label(&id);
|
||||||
}
|
}
|
||||||
Self::SetPipelineCompute(id) => {
|
|
||||||
fmt.compute_pipeline_label(&id);
|
|
||||||
}
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user