mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 10:03:58 +01:00
[wgpu-core] use Fallible for BindGroup
This commit is contained in:
1 parent
2ea314e978
commit
b42500ee40
8 files changed
+114
-119
No files matched your search
@@ -129,9 +129,7 @@ impl RenderCommand {
|
||||
hub: &crate::hub::Hub,
|
||||
commands: &[RenderCommand],
|
||||
) -> Result<Vec<ArcRenderCommand>, super::RenderPassError> {
|
||||
use super::{
|
||||
DrawKind, PassErrorScope, RenderCommandError, RenderPassError, RenderPassErrorInner,
|
||||
};
|
||||
use super::{DrawKind, PassErrorScope, RenderCommandError, RenderPassError};
|
||||
|
||||
let buffers_guard = hub.buffers.read();
|
||||
let bind_group_guard = hub.bind_groups.read();
|
||||
@@ -157,12 +155,13 @@ impl RenderCommand {
|
||||
}
|
||||
|
||||
let bind_group_id = bind_group_id.unwrap();
|
||||
let bg = bind_group_guard.get_owned(bind_group_id).map_err(|_| {
|
||||
RenderPassError {
|
||||
let bg = bind_group_guard
|
||||
.strict_get(bind_group_id)
|
||||
.get()
|
||||
.map_err(|e| RenderPassError {
|
||||
scope: PassErrorScope::SetBindGroup,
|
||||
inner: RenderPassErrorInner::InvalidBindGroupId(bind_group_id),
|
||||
}
|
||||
})?;
|
||||
inner: e.into(),
|
||||
})?;
|
||||
|
||||
ArcRenderCommand::SetBindGroup {
|
||||
index,
|
||||
|
||||
Reference in new issue
Block a user