mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
[core] Provide an explicit type for some CommandBuffer pointers. (#5512)
This commit is contained in:
parent
cc0ee7bcbd
commit
8289711b65
@ -36,6 +36,7 @@ use serde::Serialize;
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::{fmt, mem, str};
|
||||
|
||||
#[doc(hidden)]
|
||||
@ -365,7 +366,8 @@ impl Global {
|
||||
|
||||
let hub = A::hub(self);
|
||||
|
||||
let cmd_buf = CommandBuffer::get_encoder(hub, encoder_id).map_pass_err(pass_scope)?;
|
||||
let cmd_buf: Arc<CommandBuffer<A>> =
|
||||
CommandBuffer::get_encoder(hub, encoder_id).map_pass_err(pass_scope)?;
|
||||
let device = &cmd_buf.device;
|
||||
if !device.is_valid() {
|
||||
return Err(ComputePassErrorInner::InvalidDevice(
|
||||
|
@ -1343,7 +1343,8 @@ impl Global {
|
||||
|
||||
let hub = A::hub(self);
|
||||
|
||||
let cmd_buf = CommandBuffer::get_encoder(hub, encoder_id).map_pass_err(pass_scope)?;
|
||||
let cmd_buf: Arc<CommandBuffer<A>> =
|
||||
CommandBuffer::get_encoder(hub, encoder_id).map_pass_err(pass_scope)?;
|
||||
let device = &cmd_buf.device;
|
||||
let snatch_guard = device.snatchable_lock.read();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user