mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 07:51:08 +01:00
[wgpu-core] use Fallible for ComputePipeline
This commit is contained in:
1 parent
b42500ee40
commit
82ce2ea747
6 files changed
+21
-19
No files matched your search
@@ -74,7 +74,7 @@ impl ComputeCommand {
|
||||
hub: &crate::hub::Hub,
|
||||
commands: &[ComputeCommand],
|
||||
) -> Result<Vec<ArcComputeCommand>, super::ComputePassError> {
|
||||
use super::{ComputePassError, ComputePassErrorInner, PassErrorScope};
|
||||
use super::{ComputePassError, PassErrorScope};
|
||||
|
||||
let buffers_guard = hub.buffers.read();
|
||||
let bind_group_guard = hub.bind_groups.read();
|
||||
@@ -114,12 +114,12 @@ impl ComputeCommand {
|
||||
}
|
||||
}
|
||||
ComputeCommand::SetPipeline(pipeline_id) => ArcComputeCommand::SetPipeline(
|
||||
pipelines_guard
|
||||
.get_owned(pipeline_id)
|
||||
.map_err(|_| ComputePassError {
|
||||
pipelines_guard.strict_get(pipeline_id).get().map_err(|e| {
|
||||
ComputePassError {
|
||||
scope: PassErrorScope::SetPipelineCompute,
|
||||
inner: ComputePassErrorInner::InvalidPipelineId(pipeline_id),
|
||||
})?,
|
||||
inner: e.into(),
|
||||
}
|
||||
})?,
|
||||
),
|
||||
|
||||
ComputeCommand::SetPushConstant {
|
||||
|
||||
Reference in new issue
Block a user